merge from gcc

This commit is contained in:
DJ Delorie
2012-11-11 22:37:30 +00:00
parent 416a7dc4fa
commit 1f3de044c6
7 changed files with 83 additions and 24 deletions

View File

@ -1,3 +1,16 @@
2012-11-09 Jason Merrill <jason@redhat.com>
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_TAGGED_NAME.
2012-10-29 Sterling Augustine <saugustine@google.com>
Cary Coutant <ccoutant@google.com>
* dwarf2.h (dwarf_location_list_entry_type): New enum with fields
DW_LLE_GNU_end_of_list_entry, DW_LLE_GNU_base_address_selection_entry,
DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry.
2012-10-26 Shinichiro Hamaji <shinichiro.hamaji@gmail.com> 2012-10-26 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
* dwarf2.h (DW_AT_APPLE_optimized, DW_AT_APPLE_flags) * dwarf2.h (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)

View File

@ -420,6 +420,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_NONTRANSACTION_CLONE, DEMANGLE_COMPONENT_NONTRANSACTION_CLONE,
/* A pack expansion. */ /* A pack expansion. */
DEMANGLE_COMPONENT_PACK_EXPANSION, DEMANGLE_COMPONENT_PACK_EXPANSION,
/* A name with an ABI tag. */
DEMANGLE_COMPONENT_TAGGED_NAME,
/* A cloned function. */ /* A cloned function. */
DEMANGLE_COMPONENT_CLONE DEMANGLE_COMPONENT_CLONE
}; };

View File

@ -403,20 +403,6 @@ DW_AT (DW_AT_upc_threads_scaled, 0x3210)
DW_AT (DW_AT_PGI_lbase, 0x3a00) DW_AT (DW_AT_PGI_lbase, 0x3a00)
DW_AT (DW_AT_PGI_soffset, 0x3a01) DW_AT (DW_AT_PGI_soffset, 0x3a01)
DW_AT (DW_AT_PGI_lstride, 0x3a02) DW_AT (DW_AT_PGI_lstride, 0x3a02)
/* Apple extensions. */
DW_AT (DW_AT_APPLE_optimized, 0x3fe1)
DW_AT (DW_AT_APPLE_flags, 0x3fe2)
DW_AT (DW_AT_APPLE_isa, 0x3fe3)
DW_AT (DW_AT_APPLE_block, 0x3fe4)
DW_AT (DW_AT_APPLE_major_runtime_vers, 0x3fe5)
DW_AT (DW_AT_APPLE_runtime_class, 0x3fe6)
DW_AT (DW_AT_APPLE_omit_frame_ptr, 0x3fe7)
DW_AT (DW_AT_APPLE_property_name, 0x3fe8)
DW_AT (DW_AT_APPLE_property_getter, 0x3fe9)
DW_AT (DW_AT_APPLE_property_setter, 0x3fea)
DW_AT (DW_AT_APPLE_property_attribute, 0x3feb)
DW_AT (DW_AT_APPLE_objc_complete_type, 0x3fec)
DW_AT (DW_AT_APPLE_property, 0x3fed)
DW_END_AT DW_END_AT
DW_FIRST_OP (DW_OP_addr, 0x03) DW_FIRST_OP (DW_OP_addr, 0x03)

View File

@ -259,6 +259,17 @@ enum dwarf_line_number_hp_sfc_ops
DW_LNE_HP_SFC_associate = 3 DW_LNE_HP_SFC_associate = 3
}; };
/* Type codes for location list entries.
Extension for Fission. See http://gcc.gnu.org/wiki/DebugFission. */
enum dwarf_location_list_entry_type
{
DW_LLE_GNU_end_of_list_entry = 0,
DW_LLE_GNU_base_address_selection_entry = 1,
DW_LLE_GNU_start_end_entry = 2,
DW_LLE_GNU_start_length_entry = 3
};
#define DW_CIE_ID 0xffffffff #define DW_CIE_ID 0xffffffff
#define DW64_CIE_ID 0xffffffffffffffffULL #define DW64_CIE_ID 0xffffffffffffffffULL
#define DW_CIE_VERSION 1 #define DW_CIE_VERSION 1

View File

@ -1,3 +1,15 @@
2012-11-10 Jason Merrill <jason@redhat.com>
* cp-demangle.c (d_unqualified_name): Handle abi tags here.
(d_name): Not here.
2012-11-09 Jason Merrill <jason@redhat.com>
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_TAGGED_NAME.
(d_make_comp, d_find_pack, d_print_comp): Likewise.
(d_abi_tags): New.
(d_name): Call it.
2012-10-08 Jason Merrill <jason@redhat.com> 2012-10-08 Jason Merrill <jason@redhat.com>
* cp-demangle.c (d_special_name, d_dump): Handle TH and TW. * cp-demangle.c (d_special_name, d_dump): Handle TH and TW.

View File

@ -508,6 +508,11 @@ d_dump (struct demangle_component *dc, int indent)
case DEMANGLE_COMPONENT_NAME: case DEMANGLE_COMPONENT_NAME:
printf ("name '%.*s'\n", dc->u.s_name.len, dc->u.s_name.s); printf ("name '%.*s'\n", dc->u.s_name.len, dc->u.s_name.s);
return; return;
case DEMANGLE_COMPONENT_TAGGED_NAME:
printf ("tagged name\n");
d_dump (dc->u.s_binary.left, indent + 2);
d_dump (dc->u.s_binary.right, indent + 2);
return;
case DEMANGLE_COMPONENT_TEMPLATE_PARAM: case DEMANGLE_COMPONENT_TEMPLATE_PARAM:
printf ("template parameter %ld\n", dc->u.s_number.number); printf ("template parameter %ld\n", dc->u.s_number.number);
return; return;
@ -809,6 +814,7 @@ d_make_comp (struct d_info *di, enum demangle_component_type type,
case DEMANGLE_COMPONENT_QUAL_NAME: case DEMANGLE_COMPONENT_QUAL_NAME:
case DEMANGLE_COMPONENT_LOCAL_NAME: case DEMANGLE_COMPONENT_LOCAL_NAME:
case DEMANGLE_COMPONENT_TYPED_NAME: case DEMANGLE_COMPONENT_TYPED_NAME:
case DEMANGLE_COMPONENT_TAGGED_NAME:
case DEMANGLE_COMPONENT_TEMPLATE: case DEMANGLE_COMPONENT_TEMPLATE:
case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE: case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
@ -1202,6 +1208,23 @@ d_encoding (struct d_info *di, int top_level)
} }
} }
/* <tagged-name> ::= <name> B <source-name> */
static struct demangle_component *
d_abi_tags (struct d_info *di, struct demangle_component *dc)
{
char peek;
while (peek = d_peek_char (di),
peek == 'B')
{
struct demangle_component *tag;
d_advance (di, 1);
tag = d_source_name (di);
dc = d_make_comp (di, DEMANGLE_COMPONENT_TAGGED_NAME, dc, tag);
}
return dc;
}
/* <name> ::= <nested-name> /* <name> ::= <nested-name>
::= <unscoped-name> ::= <unscoped-name>
::= <unscoped-template-name> <template-args> ::= <unscoped-template-name> <template-args>
@ -1416,15 +1439,14 @@ d_prefix (struct d_info *di)
static struct demangle_component * static struct demangle_component *
d_unqualified_name (struct d_info *di) d_unqualified_name (struct d_info *di)
{ {
struct demangle_component *ret;
char peek; char peek;
peek = d_peek_char (di); peek = d_peek_char (di);
if (IS_DIGIT (peek)) if (IS_DIGIT (peek))
return d_source_name (di); ret = d_source_name (di);
else if (IS_LOWER (peek)) else if (IS_LOWER (peek))
{ {
struct demangle_component *ret;
ret = d_operator_name (di); ret = d_operator_name (di);
if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR) if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR)
{ {
@ -1433,14 +1455,11 @@ d_unqualified_name (struct d_info *di)
ret = d_make_comp (di, DEMANGLE_COMPONENT_UNARY, ret, ret = d_make_comp (di, DEMANGLE_COMPONENT_UNARY, ret,
d_source_name (di)); d_source_name (di));
} }
return ret;
} }
else if (peek == 'C' || peek == 'D') else if (peek == 'C' || peek == 'D')
return d_ctor_dtor_name (di); ret = d_ctor_dtor_name (di);
else if (peek == 'L') else if (peek == 'L')
{ {
struct demangle_component * ret;
d_advance (di, 1); d_advance (di, 1);
ret = d_source_name (di); ret = d_source_name (di);
@ -1448,22 +1467,27 @@ d_unqualified_name (struct d_info *di)
return NULL; return NULL;
if (! d_discriminator (di)) if (! d_discriminator (di))
return NULL; return NULL;
return ret;
} }
else if (peek == 'U') else if (peek == 'U')
{ {
switch (d_peek_next_char (di)) switch (d_peek_next_char (di))
{ {
case 'l': case 'l':
return d_lambda (di); ret = d_lambda (di);
break;
case 't': case 't':
return d_unnamed_type (di); ret = d_unnamed_type (di);
break;
default: default:
return NULL; return NULL;
} }
} }
else else
return NULL; return NULL;
if (d_peek_char (di) == 'B')
ret = d_abi_tags (di, ret);
return ret;
} }
/* <source-name> ::= <(positive length) number> <identifier> */ /* <source-name> ::= <(positive length) number> <identifier> */
@ -3745,6 +3769,7 @@ d_find_pack (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_LAMBDA: case DEMANGLE_COMPONENT_LAMBDA:
case DEMANGLE_COMPONENT_NAME: case DEMANGLE_COMPONENT_NAME:
case DEMANGLE_COMPONENT_TAGGED_NAME:
case DEMANGLE_COMPONENT_OPERATOR: case DEMANGLE_COMPONENT_OPERATOR:
case DEMANGLE_COMPONENT_BUILTIN_TYPE: case DEMANGLE_COMPONENT_BUILTIN_TYPE:
case DEMANGLE_COMPONENT_SUB_STD: case DEMANGLE_COMPONENT_SUB_STD:
@ -3830,6 +3855,13 @@ d_print_comp (struct d_print_info *dpi, int options,
d_print_java_identifier (dpi, dc->u.s_name.s, dc->u.s_name.len); d_print_java_identifier (dpi, dc->u.s_name.s, dc->u.s_name.len);
return; return;
case DEMANGLE_COMPONENT_TAGGED_NAME:
d_print_comp (dpi, options, d_left (dc));
d_append_string (dpi, "[abi:");
d_print_comp (dpi, options, d_right (dc));
d_append_char (dpi, ']');
return;
case DEMANGLE_COMPONENT_QUAL_NAME: case DEMANGLE_COMPONENT_QUAL_NAME:
case DEMANGLE_COMPONENT_LOCAL_NAME: case DEMANGLE_COMPONENT_LOCAL_NAME:
d_print_comp (dpi, options, d_left (dc)); d_print_comp (dpi, options, d_left (dc));

View File

@ -4084,6 +4084,9 @@ auto& f<int>(int const&, int)
--format=gnu-v3 --format=gnu-v3
_Z1gILi1EEvR1AIXT_EER1BIXscbT_EE _Z1gILi1EEvR1AIXT_EER1BIXscbT_EE
void g<1>(A<1>&, B<static_cast<bool>(1)>&) void g<1>(A<1>&, B<static_cast<bool>(1)>&)
--format=gnu-v3
_ZNKSt7complexIiE4realB5cxx11Ev
std::complex<int>::real[abi:cxx11]() const
# #
# Ada (GNAT) tests. # Ada (GNAT) tests.
# #