From f5334fd1a3a16ddf7216df10df2be0730b015ec6 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 14 Jun 2009 14:18:55 +0000 Subject: [PATCH] Support for DW_AT_{accessibility,declaration,abstract_origin} attributes for types. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31051 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/DebugInfoEntries.cpp | 31 ++++++++++++++++++++++++++ src/apps/debugger/DebugInfoEntries.h | 19 +++++++++++----- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/apps/debugger/DebugInfoEntries.cpp b/src/apps/debugger/DebugInfoEntries.cpp index 178e5a36fb..fbb23d1f15 100644 --- a/src/apps/debugger/DebugInfoEntries.cpp +++ b/src/apps/debugger/DebugInfoEntries.cpp @@ -269,6 +269,10 @@ DIEAddressingType::AddAttribute_address_class(uint16 attributeName, DIEDeclaredType::DIEDeclaredType() + : + fAbstractOrigin(NULL), + fAccessibility(0), + fDeclaration(false) { } @@ -300,6 +304,33 @@ DIEDeclaredType::AddAttribute_decl_column(uint16 attributeName, } +status_t +DIEDeclaredType::AddAttribute_accessibility(uint16 attributeName, + const AttributeValue& value) +{ + fAccessibility = value.constant; + return B_OK; +} + + +status_t +DIEDeclaredType::AddAttribute_declaration(uint16 attributeName, + const AttributeValue& value) +{ + fDeclaration = value.flag; + return B_OK; +} + + +status_t +DIEDeclaredType::AddAttribute_abstract_origin(uint16 attributeName, + const AttributeValue& value) +{ + fAbstractOrigin = value.reference; + return B_OK; +} + + // #pragma mark - DIEDerivedType diff --git a/src/apps/debugger/DebugInfoEntries.h b/src/apps/debugger/DebugInfoEntries.h index 89446dd786..0692467ba4 100644 --- a/src/apps/debugger/DebugInfoEntries.h +++ b/src/apps/debugger/DebugInfoEntries.h @@ -252,16 +252,26 @@ public: const AttributeValue& value); virtual status_t AddAttribute_decl_column(uint16 attributeName, const AttributeValue& value); + virtual status_t AddAttribute_accessibility(uint16 attributeName, + const AttributeValue& value); + // TODO: !file, !pointer to member + virtual status_t AddAttribute_declaration(uint16 attributeName, + const AttributeValue& value); + // TODO: !file + virtual status_t AddAttribute_abstract_origin( + uint16 attributeName, + const AttributeValue& value); + // TODO: !interface // TODO: -// DW_AT_accessibility // !file, !pointer to member -// DW_AT_declaration // !file -// DW_AT_abstract_origin // !interface // DW_AT_description // !interface // DW_AT_visibility // !interface protected: DeclarationLocation fDeclarationLocation; + DebugInfoEntry* fAbstractOrigin; + uint8 fAccessibility; + bool fDeclaration; }; @@ -272,9 +282,6 @@ public: virtual status_t AddAttribute_type(uint16 attributeName, const AttributeValue& value); -// TODO: -// DW_AT_type - protected: DIEType* fType; };