hrev43439 adds 1 changeset to branch 'master' old head: a5c547971089f4a3ed5441063f6c9f33006d9b28 new head: 6066a80794e6bc6e37f8e6241033714ef382ad73 ---------------------------------------------------------------------------- 6066a80: Fix handling of variable specifications. In the case of variables that refer to static members of compound types, the specification will be a reference to a DIEMember rather than a DIEVariable in DWARF3. Relax our restrictions accordingly. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev43439 Commit: 6066a80794e6bc6e37f8e6241033714ef382ad73 URL: http://cgit.haiku-os.org/haiku/commit/?id=6066a80 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Thu Dec 8 21:20:35 2011 UTC ---------------------------------------------------------------------------- 2 files changed, 8 insertions(+), 1 deletions(-) src/apps/debugger/dwarf/DebugInfoEntries.cpp | 7 +++++++ src/apps/debugger/dwarf/DebugInfoEntries.h | 2 +- ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.cpp b/src/apps/debugger/dwarf/DebugInfoEntries.cpp index dbc7509..34b0b4c 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.cpp +++ b/src/apps/debugger/dwarf/DebugInfoEntries.cpp @@ -1,5 +1,6 @@ /* * Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxxx + * Copyright 2011, Rene Gollent, rene@xxxxxxxxxxxx * Distributed under the terms of the MIT License. */ @@ -2169,6 +2170,12 @@ DIEVariable::AddAttribute_specification(uint16 attributeName, const AttributeValue& value) { fSpecification = dynamic_cast<DIEVariable*>(value.reference); + // in the case of static variables declared within a compound type, + // the specification may point to a member entry rather than + // a variable entry + if (fSpecification == NULL) + fSpecification = dynamic_cast<DIEMember*>(value.reference); + return fSpecification != NULL ? B_OK : B_BAD_DATA; } diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.h b/src/apps/debugger/dwarf/DebugInfoEntries.h index dbbc0b8..6f7d904 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.h +++ b/src/apps/debugger/dwarf/DebugInfoEntries.h @@ -1413,7 +1413,7 @@ private: LocationDescription fLocationDescription; ConstantAttributeValue fValue; DIEType* fType; - DIEVariable* fSpecification; + DebugInfoEntry* fSpecification; DIEVariable* fAbstractOrigin; uint64 fStartScope; };