Commit c6e13630 by Jason Merrill Committed by Jason Merrill

cp-demangle.c: s/new_abi/v3/.

        * cp-demangle.c: s/new_abi/v3/.
        * cplus-dem.c: Likewise.
        (current_demangling_style): Now auto_demangling.
        (cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
        (main): Use standard symbol chars for auto_demangling.

From-SVN: r38002
parent c55d0e0d
2000-12-04 Jason Merrill <jason@redhat.com>
* cp-demangle.c: s/new_abi/v3/.
* cplus-dem.c: Likewise.
(current_demangling_style): Now auto_demangling.
(cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
(main): Use standard symbol chars for auto_demangling.
2000-11-26 Mark Mitchell <mark@codesourcery.com> 2000-11-26 Mark Mitchell <mark@codesourcery.com>
* hashtab.c (higher_prime_number): Use a table, rather than a * hashtab.c (higher_prime_number): Use a table, rather than a
......
/* Demangler for IA64 / g++ standard C++ ABI. /* Demangler for IA64 / g++ V3 ABI.
Copyright (C) 2000 Free Software Foundation, Inc. Copyright (C) 2000 Free Software Foundation, Inc.
Written by Alex Samuel <samuel@codesourcery.com>. Written by Alex Samuel <samuel@codesourcery.com>.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
/* This file implements demangling of C++ names mangled according to /* This file implements demangling of C++ names mangled according to
the IA64 / g++ standard C++ ABI. Use the cp_demangle function to the IA64 / g++ V3 ABI. Use the cp_demangle function to
demangle a mangled name, or compile with the preprocessor macro demangle a mangled name, or compile with the preprocessor macro
STANDALONE_DEMANGLER defined to create a demangling filter STANDALONE_DEMANGLER defined to create a demangling filter
executable (functionally similar to c++filt, but includes this executable (functionally similar to c++filt, but includes this
...@@ -3483,7 +3483,7 @@ cp_demangle_type (type_name, result) ...@@ -3483,7 +3483,7 @@ cp_demangle_type (type_name, result)
extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *)); extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *));
/* ABI-mandated entry point in the C++ runtime library for performing /* ia64 ABI-mandated entry point in the C++ runtime library for performing
demangling. MANGLED_NAME is a NUL-terminated character string demangling. MANGLED_NAME is a NUL-terminated character string
containing the name to be demangled. containing the name to be demangled.
...@@ -3597,7 +3597,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status) ...@@ -3597,7 +3597,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
If the demangling failes, returns NULL. */ If the demangling failes, returns NULL. */
char * char *
cplus_demangle_new_abi (mangled) cplus_demangle_v3 (mangled)
const char* mangled; const char* mangled;
{ {
/* Create a dyn_string to hold the demangled name. */ /* Create a dyn_string to hold the demangled name. */
......
...@@ -101,7 +101,7 @@ mystrstr (s1, s2) ...@@ -101,7 +101,7 @@ mystrstr (s1, s2)
#define CPLUS_MARKER '$' #define CPLUS_MARKER '$'
#endif #endif
enum demangling_styles current_demangling_style = gnu_demangling; enum demangling_styles current_demangling_style = auto_demangling;
static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' }; static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' };
...@@ -294,9 +294,9 @@ struct demangler_engine libiberty_demanglers[] = ...@@ -294,9 +294,9 @@ struct demangler_engine libiberty_demanglers[] =
} }
, ,
{ {
GNU_NEW_ABI_DEMANGLING_STYLE_STRING, GNU_V3_DEMANGLING_STYLE_STRING,
gnu_new_abi_demangling, gnu_v3_demangling,
"GNU (g++) new-ABI-style demangling" "GNU (g++) V3 ABI-style demangling"
} }
, ,
{ {
...@@ -913,9 +913,13 @@ cplus_demangle (mangled, options) ...@@ -913,9 +913,13 @@ cplus_demangle (mangled, options)
if ((work->options & DMGL_STYLE_MASK) == 0) if ((work->options & DMGL_STYLE_MASK) == 0)
work->options |= (int) current_demangling_style & DMGL_STYLE_MASK; work->options |= (int) current_demangling_style & DMGL_STYLE_MASK;
/* The new-ABI demangling is implemented elsewhere. */ /* The V3 ABI demangling is implemented elsewhere. */
if (GNU_NEW_ABI_DEMANGLING) if (GNU_V3_DEMANGLING || AUTO_DEMANGLING)
return cplus_demangle_new_abi (mangled); {
ret = cplus_demangle_v3 (mangled);
if (ret || GNU_V3_DEMANGLING)
return ret;
}
if (GNAT_DEMANGLING) if (GNAT_DEMANGLING)
return ada_demangle(mangled,options); return ada_demangle(mangled,options);
...@@ -4968,7 +4972,7 @@ static const char * ...@@ -4968,7 +4972,7 @@ static const char *
hp_symbol_characters PARAMS ((void)); hp_symbol_characters PARAMS ((void));
static const char * static const char *
gnu_new_abi_symbol_characters PARAMS ((void)); gnu_v3_symbol_characters PARAMS ((void));
/* Return the string of non-alnum characters that may occur /* Return the string of non-alnum characters that may occur
as a valid symbol component, in the standard assembler symbol as a valid symbol component, in the standard assembler symbol
...@@ -5019,11 +5023,11 @@ hp_symbol_characters () ...@@ -5019,11 +5023,11 @@ hp_symbol_characters ()
/* Return the string of non-alnum characters that may occur /* Return the string of non-alnum characters that may occur
as a valid symbol component in the GNU standard C++ ABI mangling as a valid symbol component in the GNU C++ V3 ABI mangling
scheme. */ scheme. */
static const char * static const char *
gnu_new_abi_symbol_characters () gnu_v3_symbol_characters ()
{ {
return "_$."; return "_$.";
} }
...@@ -5100,13 +5104,14 @@ main (argc, argv) ...@@ -5100,13 +5104,14 @@ main (argc, argv)
case java_demangling: case java_demangling:
case edg_demangling: case edg_demangling:
case gnat_demangling: case gnat_demangling:
case auto_demangling:
valid_symbols = standard_symbol_characters (); valid_symbols = standard_symbol_characters ();
break; break;
case hp_demangling: case hp_demangling:
valid_symbols = hp_symbol_characters (); valid_symbols = hp_symbol_characters ();
break; break;
case gnu_new_abi_demangling: case gnu_v3_demangling:
valid_symbols = gnu_new_abi_symbol_characters (); valid_symbols = gnu_v3_symbol_characters ();
break; break;
default: default:
/* Folks should explicitly indicate the appropriate alphabet for /* Folks should explicitly indicate the appropriate alphabet for
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment