From e3eda50984d0ffd12330094fd84838d5baf30222 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 18 Jul 2009 23:16:51 +0000 Subject: [PATCH] Made ByteSize() a virtual method in DIEType and implemented in all subclasses that potentially have that attribute. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31633 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/dwarf/DebugInfoEntries.cpp | 63 ++++++++++++++++++++ src/apps/debugger/dwarf/DebugInfoEntries.h | 19 +++++- 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.cpp b/src/apps/debugger/dwarf/DebugInfoEntries.cpp index 9fcb8d3117..300e10dca1 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.cpp +++ b/src/apps/debugger/dwarf/DebugInfoEntries.cpp @@ -215,6 +215,13 @@ DIEType::Name() const } +const DynamicAttributeValue* +DIEType::ByteSize() const +{ + return NULL; +} + + status_t DIEType::AddAttribute_name(uint16 attributeName, const AttributeValue& value) @@ -394,6 +401,13 @@ DIECompoundType::Specification() const } +const DynamicAttributeValue* +DIECompoundType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIECompoundType::AddChild(DebugInfoEntry* child) { @@ -618,6 +632,13 @@ DIEArrayType::Specification() const } +const DynamicAttributeValue* +DIEArrayType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIEArrayType::AddChild(DebugInfoEntry* child) { @@ -728,6 +749,13 @@ DIEEnumerationType::Specification() const } +const DynamicAttributeValue* +DIEEnumerationType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIEEnumerationType::AddChild(DebugInfoEntry* child) { @@ -980,6 +1008,13 @@ DIEStringType::Tag() const } +const DynamicAttributeValue* +DIEStringType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIEStringType::AddAttribute_byte_size(uint16 attributeName, const AttributeValue& value) @@ -1269,6 +1304,13 @@ DIESetType::Tag() const } +const DynamicAttributeValue* +DIESetType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIESetType::AddAttribute_byte_size(uint16 attributeName, const AttributeValue& value) @@ -1294,6 +1336,13 @@ DIESubrangeType::Tag() const } +const DynamicAttributeValue* +DIESubrangeType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIESubrangeType::AddAttribute_bit_stride(uint16 attributeName, const AttributeValue& value) @@ -1417,6 +1466,13 @@ DIEBaseType::Tag() const } +const DynamicAttributeValue* +DIEBaseType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIEBaseType::AddAttribute_encoding(uint16 attributeName, const AttributeValue& value) @@ -1561,6 +1617,13 @@ DIEFileType::Tag() const } +const DynamicAttributeValue* +DIEFileType::ByteSize() const +{ + return &fByteSize; +} + + status_t DIEFileType::AddAttribute_byte_size(uint16 attributeName, const AttributeValue& value) diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.h b/src/apps/debugger/dwarf/DebugInfoEntries.h index f538984ace..6451106ab2 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.h +++ b/src/apps/debugger/dwarf/DebugInfoEntries.h @@ -219,6 +219,8 @@ public: virtual const char* Name() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddAttribute_name(uint16 attributeName, const AttributeValue& value); virtual status_t AddAttribute_allocated(uint16 attributeName, @@ -321,6 +323,8 @@ public: virtual DebugInfoEntry* Specification() const; + virtual const DynamicAttributeValue* ByteSize() const; + const DebugInfoEntryList& DataMembers() const { return fDataMembers; } @@ -428,6 +432,8 @@ public: virtual DebugInfoEntry* Specification() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddChild(DebugInfoEntry* child); virtual status_t AddAttribute_ordering(uint16 attributeName, @@ -487,6 +493,8 @@ public: virtual DebugInfoEntry* Specification() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddChild(DebugInfoEntry* child); virtual status_t AddAttribute_bit_stride(uint16 attributeName, @@ -647,6 +655,8 @@ public: virtual uint16 Tag() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddAttribute_byte_size(uint16 attributeName, const AttributeValue& value); @@ -847,6 +857,8 @@ public: virtual uint16 Tag() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddAttribute_byte_size(uint16 attributeName, const AttributeValue& value); @@ -861,6 +873,8 @@ public: virtual uint16 Tag() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddAttribute_bit_stride(uint16 attributeName, const AttributeValue& value); virtual status_t AddAttribute_byte_size(uint16 attributeName, @@ -930,8 +944,7 @@ public: virtual uint16 Tag() const; - const DynamicAttributeValue* ByteSize() const - { return &fByteSize; } + virtual const DynamicAttributeValue* ByteSize() const; const DynamicAttributeValue* BitOffset() const { return &fBitOffset; } const DynamicAttributeValue* BitSize() const @@ -1041,6 +1054,8 @@ public: virtual uint16 Tag() const; + virtual const DynamicAttributeValue* ByteSize() const; + virtual status_t AddAttribute_byte_size(uint16 attributeName, const AttributeValue& value);