Debugger: Handle DW_TAG_GNU_template_template_param.
This is a GNU extension for identifying the case of a template parameter that is itself a template. We don't currently make use of it, but this allows us to parse/skip it correctly. With this change, webcore is loadable/debuggable on x86-64 when built with -gdwarf-4, with the caveat that ~3-4GB of RAM are currently required.
This commit is contained in:
@@ -2573,6 +2573,39 @@ DIETypeUnit::Tag() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - DIETemplateTemplateParameter
|
||||||
|
|
||||||
|
|
||||||
|
DIETemplateTemplateParameter::DIETemplateTemplateParameter()
|
||||||
|
:
|
||||||
|
fName(NULL)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint16
|
||||||
|
DIETemplateTemplateParameter::Tag() const
|
||||||
|
{
|
||||||
|
return DW_TAG_GNU_template_template_param;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char*
|
||||||
|
DIETemplateTemplateParameter::Name() const
|
||||||
|
{
|
||||||
|
return fName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
DIETemplateTemplateParameter::AddAttribute_name(uint16 attributeName,
|
||||||
|
const AttributeValue& value)
|
||||||
|
{
|
||||||
|
fName = value.string;
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - DIETemplateTypeParameterPack
|
// #pragma mark - DIETemplateTypeParameterPack
|
||||||
|
|
||||||
|
|
||||||
@@ -2936,6 +2969,9 @@ DebugInfoEntryFactory::CreateDebugInfoEntry(uint16 tag, DebugInfoEntry*& _entry)
|
|||||||
case DW_TAG_type_unit:
|
case DW_TAG_type_unit:
|
||||||
entry = new(std::nothrow) DIETypeUnit;
|
entry = new(std::nothrow) DIETypeUnit;
|
||||||
break;
|
break;
|
||||||
|
case DW_TAG_GNU_template_template_param:
|
||||||
|
entry = new(std::nothrow) DIETemplateTemplateParameter;
|
||||||
|
break;
|
||||||
case DW_TAG_GNU_template_parameter_pack:
|
case DW_TAG_GNU_template_parameter_pack:
|
||||||
entry = new(std::nothrow) DIETemplateTypeParameterPack;
|
entry = new(std::nothrow) DIETemplateTypeParameterPack;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1633,6 +1633,22 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class DIETemplateTemplateParameter : public DIEDeclaredBase {
|
||||||
|
public:
|
||||||
|
DIETemplateTemplateParameter();
|
||||||
|
|
||||||
|
virtual uint16 Tag() const;
|
||||||
|
|
||||||
|
virtual const char* Name() const;
|
||||||
|
|
||||||
|
virtual status_t AddAttribute_name(uint16 attributeName,
|
||||||
|
const AttributeValue& value);
|
||||||
|
|
||||||
|
private:
|
||||||
|
const char* fName;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class DIETemplateTypeParameterPack : public DIEDeclaredBase {
|
class DIETemplateTypeParameterPack : public DIEDeclaredBase {
|
||||||
public:
|
public:
|
||||||
DIETemplateTypeParameterPack();
|
DIETemplateTypeParameterPack();
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ enum {
|
|||||||
DW_TAG_rvalue_reference_type = 0x42,
|
DW_TAG_rvalue_reference_type = 0x42,
|
||||||
DW_TAG_template_alias = 0x43,
|
DW_TAG_template_alias = 0x43,
|
||||||
DW_TAG_lo_user = 0x4080,
|
DW_TAG_lo_user = 0x4080,
|
||||||
|
DW_TAG_GNU_template_template_param
|
||||||
|
= 0x4106,
|
||||||
DW_TAG_GNU_template_parameter_pack
|
DW_TAG_GNU_template_parameter_pack
|
||||||
= 0x4107,
|
= 0x4107,
|
||||||
DW_TAG_GNU_formal_parameter_pack
|
DW_TAG_GNU_formal_parameter_pack
|
||||||
|
|||||||
Reference in New Issue
Block a user