Implement parsing of DW_AT_calling_convention.
Will be used later in order to determine if a given call obeys the standard calling convention, in order to determine if we can safely attempt to retrieve its return value.
This commit is contained in:
@@ -1837,7 +1837,8 @@ DIESubprogram::DIESubprogram()
|
||||
fAddressClass(0),
|
||||
fPrototyped(false),
|
||||
fInline(DW_INL_not_inlined),
|
||||
fArtificial(false)
|
||||
fArtificial(false),
|
||||
fCallingConvention(DW_CC_normal)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2005,6 +2006,15 @@ DIESubprogram::AddAttribute_artificial(uint16 attributeName,
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DIESubprogram::AddAttribute_calling_convention(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
fCallingConvention = value.constant;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - DIETemplateTypeParameter
|
||||
|
||||
|
||||
|
||||
@@ -1225,6 +1225,8 @@ public:
|
||||
bool IsPrototyped() const { return fPrototyped; }
|
||||
uint8 Inline() const { return fInline; }
|
||||
bool IsArtificial() const { return fArtificial; }
|
||||
uint8 CallingConvention() const
|
||||
{ return fCallingConvention; }
|
||||
|
||||
DIEType* ReturnType() const { return fReturnType; }
|
||||
|
||||
@@ -1255,6 +1257,9 @@ public:
|
||||
virtual status_t AddAttribute_artificial(
|
||||
uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
virtual status_t AddAttribute_calling_convention(
|
||||
uint16 attributeName,
|
||||
const AttributeValue& value);
|
||||
|
||||
protected:
|
||||
DebugInfoEntryList fParameters;
|
||||
@@ -1273,9 +1278,9 @@ protected:
|
||||
bool fPrototyped;
|
||||
uint8 fInline;
|
||||
bool fArtificial;
|
||||
uint8 fCallingConvention;
|
||||
|
||||
// TODO:
|
||||
// DW_AT_calling_convention
|
||||
// DW_AT_elemental
|
||||
// DW_AT_entry_pc
|
||||
// DW_AT_explicit
|
||||
|
||||
Reference in New Issue
Block a user