Changed the line and column parameter of DwarfUtils::GetDeclarationLocation()

to int32&. The DWARF indices are one-based with 0 as invalid/no value, but we
subtract one to get real indices and -1 as special value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31384 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-07-03 09:39:42 +00:00
parent 3dc97aa3fb
commit b619e1873c
3 changed files with 6 additions and 6 deletions

View File

@ -229,8 +229,8 @@ printf(" %ld compilation units\n", fFile->CountCompilationUnits());
// get the source location
const char* directoryPath = NULL;
const char* fileName = NULL;
uint32 line = ~0U;
uint32 column = ~0U;
int32 line = -1;
int32 column = -1;
DwarfUtils::GetDeclarationLocation(fFile, subprogramEntry,
directoryPath, fileName, line, column);

View File

@ -85,7 +85,7 @@ DwarfUtils::GetFullyQualifiedDIEName(const DebugInfoEntry* entry,
/*static*/ bool
DwarfUtils::GetDeclarationLocation(DwarfFile* dwarfFile,
const DebugInfoEntry* entry, const char*& _directory, const char*& _file,
uint32& _line, uint32& _column)
int32& _line, int32& _column)
{
uint32 file;
uint32 line;
@ -128,7 +128,7 @@ DwarfUtils::GetDeclarationLocation(DwarfFile* dwarfFile,
_directory = directoryName;
_file = fileName;
_line = line - 1;
_column = column - 1;
_line = (int32)line - 1;
_column = (int32)column - 1;
return true;
}

View File

@ -27,7 +27,7 @@ public:
const DebugInfoEntry* entry,
const char*& _directory,
const char*& _file,
uint32& _line, uint32& _column);
int32& _line, int32& _column);
};