Add the compilation unit's compilation dir to the directories for the

compilation unit. It can be referenced by the file entries in the line info
header, too (index 0).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31331 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-06-30 14:35:00 +00:00
parent d68a0c6f4f
commit 7413cddee6

View File

@ -398,6 +398,12 @@ printf("entry %p at %lu\n", entry, offset);
}
}
// add compilation dir to directory list
const char* compilationDir = unit->UnitEntry()->CompilationDir();
if (!unit->AddDirectory(compilationDir != NULL ? compilationDir : "."))
return B_NO_MEMORY;
// parse line info header
if (fDebugLineSection != NULL)
_ParseLineInfo(unit);
@ -692,7 +698,7 @@ printf("DwarfFile::_ParseLineInfo(%p), offset: %lu\n", unit, offset);
printf(" \"%s\", dir index: %llu, mtime: %llu, length: %llu\n", file,
dirIndex, modificationTime, fileLength);
if (!unit->AddFile(file, dirIndex - 1))
if (!unit->AddFile(file, dirIndex))
return B_NO_MEMORY;
}