From 8a07918f6d4b1f910972dd41594b3b9212843159 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 3 Jul 2009 10:03:27 +0000 Subject: [PATCH] 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 --- src/apps/debugger/dwarf/DwarfFile.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 8fb4dbefcc..342109b652 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -570,8 +570,14 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, attributeValue.SetToReference(_ResolveReference(value, localReference)); 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: " - "%s (%#lx) %s (%#lx): value: %llu\n", + "%s (%#lx) %s (%#lx): value: %llu\n", get_attribute_name_name(attributeName), attributeName, get_attribute_form_name(attributeForm),