diff options
author | DJ Delorie <dj@redhat.com> | 2013-02-15 02:48:33 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2013-02-15 02:48:33 +0000 |
commit | a9c3ecea79443c7f4b357b2ea3591d6b3960b27e (patch) | |
tree | 5a537dfb0fce6ed95e91d6a9e419f3dadda6ea4c /libiberty/cp-demangle.c | |
parent | 886f4b6d96a7ec0b9ba1b562ad154419128d75f2 (diff) | |
download | gdb-a9c3ecea79443c7f4b357b2ea3591d6b3960b27e.zip gdb-a9c3ecea79443c7f4b357b2ea3591d6b3960b27e.tar.gz gdb-a9c3ecea79443c7f4b357b2ea3591d6b3960b27e.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r-- | libiberty/cp-demangle.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 913d4bf..39be031 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -707,6 +707,14 @@ d_dump (struct demangle_component *dc, int indent) case DEMANGLE_COMPONENT_TLS_WRAPPER: printf ("tls wrapper function\n"); break; + case DEMANGLE_COMPONENT_DEFAULT_ARG: + printf ("default argument %d\n", dc->u.s_unary_num.num); + d_dump (dc->u.s_unary_num.sub, indent+2); + return; + case DEMANGLE_COMPONENT_LAMBDA: + printf ("lambda %d\n", dc->u.s_unary_num.num); + d_dump (dc->u.s_unary_num.sub, indent+2); + return; } d_dump (d_left (dc), indent + 2); @@ -3168,6 +3176,7 @@ d_expr_primary (struct d_info *di) /* <local-name> ::= Z <(function) encoding> E <(entity) name> [<discriminator>] ::= Z <(function) encoding> E s [<discriminator>] + ::= Z <(function) encoding> E d [<parameter> number>] _ <entity name> */ static struct demangle_component * @@ -3869,7 +3878,17 @@ d_print_comp (struct d_print_info *dpi, int options, d_append_string (dpi, "::"); else d_append_char (dpi, '.'); - d_print_comp (dpi, options, d_right (dc)); + { + struct demangle_component *local_name = d_right (dc); + if (local_name->type == DEMANGLE_COMPONENT_DEFAULT_ARG) + { + d_append_string (dpi, "{default arg#"); + d_append_num (dpi, local_name->u.s_unary_num.num + 1); + d_append_string (dpi, "}::"); + local_name = local_name->u.s_unary_num.sub; + } + d_print_comp (dpi, options, local_name); + } return; case DEMANGLE_COMPONENT_TYPED_NAME: |