Work-around for gcc 2 output. It can produce DW_AT_sibling attributes

pointing to the end of the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31386 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-07-03 10:03:27 +00:00
parent c93db3c16a
commit 8a07918f6d
1 changed files with 7 additions and 1 deletions

View File

@ -570,6 +570,12 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader,
attributeValue.SetToReference(_ResolveReference(value, attributeValue.SetToReference(_ResolveReference(value,
localReference)); localReference));
if (attributeValue.reference == NULL) { if (attributeValue.reference == NULL) {
// gcc 2 apparently somtimes produces DW_AT_sibling
// attributes pointing to the end of the sibling list.
// Just ignore those.
if (attributeName == DW_AT_sibling)
continue;
fprintf(stderr, "Failed to resolve reference: " fprintf(stderr, "Failed to resolve reference: "
"%s (%#lx) %s (%#lx): value: %llu\n", "%s (%#lx) %s (%#lx): value: %llu\n",
get_attribute_name_name(attributeName), get_attribute_name_name(attributeName),