mirror of
https://review.haiku-os.org/haiku
synced 2025-02-22 21:48:35 +01:00
Debugger: Handle some more v4 attributes.
- DIECompileUnit can also be marked with DW_AT_main_subprogram to indicate that the main program resides within that particular unit. - DIEBaseType and DIEMember now have the additional attribute DW_AT_data_bit_offset which defines the offset in a somewhat different manner than DWARF2/3's DW_AT_bit_offset, and deprecates the latter. Unused/untested for the moment, as gcc 4.7.3 doesn't yet appear to be generating either of the above attributes.
This commit is contained in:
parent
6dbd3ed18c
commit
8e80ec6aaa
@ -28,7 +28,8 @@ DIECompileUnitBase::DIECompileUnitBase()
|
||||
fBaseTypesUnit(NULL),
|
||||
fLanguage(0),
|
||||
fIdentifierCase(0),
|
||||
fUseUTF8(true)
|
||||
fUseUTF8(true),
|
||||
fContainsMainSubprogram(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -190,6 +191,15 @@ DIECompileUnitBase::AddAttribute_ranges(uint16 attributeName,
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DIECompileUnitBase::AddAttribute_main_subprogram(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
fContainsMainSubprogram = true;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - DIEType
|
||||
|
||||
|
||||
@ -1069,6 +1079,14 @@ DIEMember::AddAttribute_bit_offset(uint16 attributeName,
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DIEMember::AddAttribute_data_bit_offset(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
return SetDynamicAttributeValue(fDataBitOffset, value);
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - DIEPointerType
|
||||
|
||||
|
||||
@ -1645,6 +1663,14 @@ DIEBaseType::AddAttribute_bit_offset(uint16 attributeName,
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DIEBaseType::AddAttribute_data_bit_offset(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
return SetDynamicAttributeValue(fDataBitOffset, value);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DIEBaseType::AddAttribute_endianity(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
|
@ -161,6 +161,9 @@ public:
|
||||
off_t StatementListOffset() const
|
||||
{ return fStatementListOffset; }
|
||||
|
||||
bool ContainsMainSubprogram() const
|
||||
{ return fContainsMainSubprogram; }
|
||||
|
||||
virtual status_t AddChild(DebugInfoEntry* child);
|
||||
|
||||
virtual status_t AddAttribute_name(uint16 attributeName,
|
||||
@ -188,6 +191,9 @@ public:
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_ranges(uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_main_subprogram(
|
||||
uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
|
||||
//TODO:
|
||||
// virtual status_t AddAttribute_segment(uint16 attributeName,
|
||||
@ -209,6 +215,7 @@ protected:
|
||||
uint16 fLanguage;
|
||||
uint8 fIdentifierCase;
|
||||
bool fUseUTF8;
|
||||
bool fContainsMainSubprogram;
|
||||
};
|
||||
|
||||
|
||||
@ -669,6 +676,8 @@ public:
|
||||
{ return &fByteSize; }
|
||||
const DynamicAttributeValue* BitOffset() const
|
||||
{ return &fBitOffset; }
|
||||
const DynamicAttributeValue* DataBitOffset() const
|
||||
{ return &fDataBitOffset; }
|
||||
const DynamicAttributeValue* BitSize() const
|
||||
{ return &fBitSize; }
|
||||
const MemberLocation* Location() const
|
||||
@ -682,6 +691,9 @@ public:
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_bit_offset(uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_data_bit_offset(
|
||||
uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_data_member_location(
|
||||
uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
@ -693,6 +705,7 @@ private:
|
||||
DIEType* fType;
|
||||
DynamicAttributeValue fByteSize;
|
||||
DynamicAttributeValue fBitOffset;
|
||||
DynamicAttributeValue fDataBitOffset;
|
||||
DynamicAttributeValue fBitSize;
|
||||
MemberLocation fLocation;
|
||||
};
|
||||
@ -1041,6 +1054,8 @@ public:
|
||||
virtual const DynamicAttributeValue* ByteSize() const;
|
||||
const DynamicAttributeValue* BitOffset() const
|
||||
{ return &fBitOffset; }
|
||||
const DynamicAttributeValue* DataBitOffset() const
|
||||
{ return &fDataBitOffset; }
|
||||
const DynamicAttributeValue* BitSize() const
|
||||
{ return &fBitSize; }
|
||||
uint8 Encoding() const { return fEncoding; }
|
||||
@ -1054,6 +1069,9 @@ public:
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_bit_offset(uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_data_bit_offset(
|
||||
uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_endianity(uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
|
||||
@ -1069,6 +1087,7 @@ public:
|
||||
private:
|
||||
DynamicAttributeValue fByteSize;
|
||||
DynamicAttributeValue fBitOffset;
|
||||
DynamicAttributeValue fDataBitOffset;
|
||||
DynamicAttributeValue fBitSize;
|
||||
uint8 fEncoding;
|
||||
uint8 fEndianity;
|
||||
|
Loading…
x
Reference in New Issue
Block a user