From a326afa3fca2ccb841b8e8ff6b7a8663eec1dc83 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 20 Jul 2013 17:33:10 -0400 Subject: [PATCH] Debugger: Rework DIETypeUnit. DIETypeUnit now inherits from DIECompileUnitBase in order to handle things like setting the language info properly. This was previously missing and would lead to occasional crashes with DWARF4. --- src/apps/debugger/dwarf/DebugInfoEntries.cpp | 11 ----------- src/apps/debugger/dwarf/DebugInfoEntries.h | 10 +--------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.cpp b/src/apps/debugger/dwarf/DebugInfoEntries.cpp index 93ff1dc999..1f8a08b4a7 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.cpp +++ b/src/apps/debugger/dwarf/DebugInfoEntries.cpp @@ -2536,8 +2536,6 @@ DIESharedType::AddAttribute_decl_column(uint16 attributeName, DIETypeUnit::DIETypeUnit() - : - fLanguage(0) { } @@ -2549,15 +2547,6 @@ DIETypeUnit::Tag() const } -status_t -DIETypeUnit::AddAttribute_language(uint16 attributeName, - const AttributeValue& value) -{ - fLanguage = value.constant; - return B_OK; -} - - // #pragma mark - DIETemplateTypeParameterPack diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.h b/src/apps/debugger/dwarf/DebugInfoEntries.h index 66b481883c..0b8b700624 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.h +++ b/src/apps/debugger/dwarf/DebugInfoEntries.h @@ -1606,19 +1606,11 @@ private: }; -class DIETypeUnit : public DebugInfoEntry { +class DIETypeUnit : public DIECompileUnitBase { public: DIETypeUnit(); virtual uint16 Tag() const; - - uint16 Language() const { return fLanguage; } - - virtual status_t AddAttribute_language(uint16 attributeName, - const AttributeValue& value); - -private: - uint16 fLanguage; };