From: Roland McGrath Date: Tue, 22 Jun 2010 07:10:54 +0000 (-0700) Subject: Add some missing DWARF constants and readelf support for them. X-Git-Tag: elfutils-0.148~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=474cb48063bd86483f8a399605d3c7516aca6bcb;p=thirdparty%2Felfutils.git Add some missing DWARF constants and readelf support for them. --- diff --git a/libdw/ChangeLog b/libdw/ChangeLog index dff21fa7d..c87634fd0 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,5 +1,7 @@ 2010-06-21 Roland McGrath + * dwarf.h: Add DW_TAG_GNU_* constants. + * memory-access.h (get_sleb128_rest_return): Fix sign extension for 10-byte case. diff --git a/libdw/dwarf.h b/libdw/dwarf.h index fa7635c69..dbf56e914 100644 --- a/libdw/dwarf.h +++ b/libdw/dwarf.h @@ -122,6 +122,13 @@ enum DW_TAG_function_template = 0x4102, DW_TAG_class_template = 0x4103, + DW_TAG_GNU_BINCL = 0x4104, + DW_TAG_GNU_EINCL = 0x4105, + + DW_TAG_GNU_template_template_param = 0x4106, + DW_TAG_GNU_template_parameter_pack = 0x4107, + DW_TAG_GNU_formal_parameter_pack = 0x4108, + DW_TAG_hi_user = 0xffff }; diff --git a/src/ChangeLog b/src/ChangeLog index bcb97292e..e7cbffab8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2010-06-21 Roland McGrath * readelf.c (dwarf_tag_string): Handle new v4 tags. + (dwarf_attr_string): Add new attributes. + (dwarf_tag_string): Handle DW_TAG_GNU_*. * readelf.c (print_ops): Use 64-bit types for LEB128 operands. (print_cfa_program): Likewise. diff --git a/src/readelf.c b/src/readelf.c index 76b4fe4f1..08b85abd4 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -3259,6 +3259,26 @@ dwarf_tag_string (unsigned int tag) result = "class_template"; break; + case DW_TAG_GNU_BINCL: + result = "GNU_BINCL"; + break; + + case DW_TAG_GNU_EINCL: + result = "GNU_EINCL"; + break; + + case DW_TAG_GNU_template_template_param: + result = "GNU_template_template_param"; + break; + + case DW_TAG_GNU_template_parameter_pack: + result = "GNU_template_parameter_pack"; + break; + + case DW_TAG_GNU_formal_parameter_pack: + result = "GNU_formal_parameter_pack"; + break; + default: if (tag < DW_TAG_lo_user) snprintf (buf, sizeof buf, gettext ("unknown tag %hx"), tag); @@ -3366,6 +3386,12 @@ dwarf_attr_string (unsigned int attrnum) [DW_AT_elemental] = "elemental", [DW_AT_pure] = "pure", [DW_AT_recursive] = "recursive", + [DW_AT_signature] = "signature", + [DW_AT_main_subprogram] = "main_subprogram", + [DW_AT_data_bit_offset] = "data_bit_offset", + [DW_AT_const_expr] = "const_expr", + [DW_AT_enum_class] = "enum_class", + [DW_AT_linkage_name] = "linkage_name", }; const unsigned int nknown_attrs = (sizeof (known_attrs) / sizeof (known_attrs[0]));