From fe06b6968b5d88aa4785716043233a864774f374 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Fri, 9 Jun 2000 18:55:36 +0000 Subject: [PATCH] cp-demangle.c (demangle_operator_name): Add spaces before names beginning with a letter... * cp-demangle.c (demangle_operator_name): Add spaces before names beginning with a letter: delete, delete[], new, new[], sizeof. (demangle_special_name): Handle TF and TJ . From-SVN: r34477 --- libiberty/ChangeLog | 7 +++++++ libiberty/cp-demangle.c | 30 +++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 872d26212f4..e7bac6d4758 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2000-06-09 Zack Weinberg + + * cp-demangle.c (demangle_operator_name): Add spaces before + names beginning with a letter: delete, delete[], new, new[], + sizeof. + (demangle_special_name): Handle TF and TJ . + Thu Jun 8 18:52:24 2000 Philippe De Muyter * cp-demangle.c (template_arg_list_new): Revert previous PARAMS patch. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index fc961d81a83..b1c405549ec 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1327,9 +1327,9 @@ demangle_operator_name (dm, short_name, num_args) { "cm", "," , 2 }, { "co", "~" , 1 }, { "dV", "/=" , 2 }, - { "da", "delete[]" , 1 }, + { "da", " delete[]", 1 }, { "de", "*" , 1 }, - { "dl", "delete" , 1 }, + { "dl", " delete" , 1 }, { "dv", "/" , 2 }, { "eO", "^=" , 2 }, { "eo", "^" , 2 }, @@ -1346,11 +1346,11 @@ demangle_operator_name (dm, short_name, num_args) { "mi", "-" , 2 }, { "ml", "*" , 2 }, { "mm", "--" , 1 }, - { "na", "new[]" , 1 }, + { "na", " new[]" , 1 }, { "ne", "!=" , 2 }, { "ng", "-" , 1 }, { "nt", "!" , 1 }, - { "nw", "new" , 1 }, + { "nw", " new" , 1 }, { "oR", "|=" , 2 }, { "oo", "||" , 2 }, { "or", "|" , 2 }, @@ -1364,7 +1364,7 @@ demangle_operator_name (dm, short_name, num_args) { "rS", ">>=" , 2 }, { "rm", "%" , 2 }, { "rs", ">>" , 2 }, - { "sz", "sizeof" , 1 } + { "sz", " sizeof" , 1 } }; const int num_operators = @@ -1439,10 +1439,12 @@ demangle_operator_name (dm, short_name, num_args) ::= TI # typeinfo structure ::= TS # typeinfo name - Also demangles the special g++ mangling, + Also demangles the special g++ manglings, ::= CT _ - # construction vtable */ + # construction vtable + ::= TF # typeinfo function (old ABI only) + ::= TJ # java Class structure */ static status_t demangle_special_name (dm) @@ -1490,6 +1492,13 @@ demangle_special_name (dm) RETURN_IF_ERROR (demangle_type (dm)); break; + case 'F': + /* Typeinfo function. Used only in old ABI with new mangling. */ + advance_char (dm); + result_append (dm, "typeinfo fn for "); + RETURN_IF_ERROR (demangle_type (dm)); + break; + case 'S': /* Character string containing type name, used in typeinfo. */ advance_char (dm); @@ -1497,6 +1506,13 @@ demangle_special_name (dm) RETURN_IF_ERROR (demangle_type (dm)); break; + case 'J': + /* The java Class variable corresponding to a C++ class. */ + advance_char (dm); + result_append (dm, "java Class for "); + RETURN_IF_ERROR (demangle_type (dm)); + break; + case 'h': /* Non-virtual thunk. */ advance_char (dm);