1997-08-22 00:57:35 +02:00
|
|
|
/* Defs for interface to demanglers.
|
2004-01-12 20:46:31 +01:00
|
|
|
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
|
2011-01-03 21:52:22 +01:00
|
|
|
2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
1997-08-22 00:57:35 +02:00
|
|
|
|
2007-04-26 04:59:13 +02:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
In addition to the permissions in the GNU Library General Public
|
|
|
|
License, the Free Software Foundation gives you unlimited
|
|
|
|
permission to link the compiled version of this file into
|
|
|
|
combinations with other programs, and to distribute those
|
|
|
|
combinations without any restriction coming from the use of this
|
|
|
|
file. (The Library Public License restrictions do apply in other
|
|
|
|
respects; for example, they cover modification of the file, and
|
|
|
|
distribution when not linked into a combined executable.)
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
|
|
|
02110-1301, USA. */
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
#if !defined (DEMANGLE_H)
|
|
|
|
#define DEMANGLE_H
|
|
|
|
|
2004-01-13 04:06:13 +01:00
|
|
|
#include "libiberty.h"
|
2004-01-13 02:49:16 +01:00
|
|
|
|
2003-07-06 23:45:37 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1997-08-22 00:57:35 +02:00
|
|
|
/* Options passed to cplus_demangle (in 2nd parameter). */
|
|
|
|
|
2000-06-05 04:28:41 +02:00
|
|
|
#define DMGL_NO_OPTS 0 /* For readability... */
|
|
|
|
#define DMGL_PARAMS (1 << 0) /* Include function args */
|
|
|
|
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
|
|
|
|
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
|
2002-02-05 17:33:31 +01:00
|
|
|
#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
|
|
|
|
#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
|
2005-12-11 02:34:02 +01:00
|
|
|
#define DMGL_RET_POSTFIX (1 << 5) /* Print function return types (when
|
2011-06-14 00:32:40 +02:00
|
|
|
present) after function signature.
|
|
|
|
It applies only to the toplevel
|
|
|
|
function type. */
|
|
|
|
#define DMGL_RET_DROP (1 << 6) /* Suppress printing function return
|
|
|
|
types, even if present. It applies
|
|
|
|
only to the toplevel function type.
|
|
|
|
*/
|
2000-06-05 04:28:41 +02:00
|
|
|
|
|
|
|
#define DMGL_AUTO (1 << 8)
|
|
|
|
#define DMGL_GNU (1 << 9)
|
|
|
|
#define DMGL_LUCID (1 << 10)
|
|
|
|
#define DMGL_ARM (1 << 11)
|
|
|
|
#define DMGL_HP (1 << 12) /* For the HP aCC compiler;
|
|
|
|
same as ARM except for
|
|
|
|
template arguments, etc. */
|
|
|
|
#define DMGL_EDG (1 << 13)
|
2000-12-05 00:46:57 +01:00
|
|
|
#define DMGL_GNU_V3 (1 << 14)
|
2000-11-15 12:52:30 +01:00
|
|
|
#define DMGL_GNAT (1 << 15)
|
1998-12-08 00:32:23 +01:00
|
|
|
|
1997-08-22 00:57:35 +02:00
|
|
|
/* If none of these are set, use 'current_demangling_style' as the default. */
|
2000-12-05 00:46:57 +01:00
|
|
|
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
/* Enumeration of possible demangling styles.
|
|
|
|
|
|
|
|
Lucid and ARM styles are still kept logically distinct, even though
|
|
|
|
they now both behave identically. The resulting style is actual the
|
|
|
|
union of both. I.E. either style recognizes both "__pt__" and "__rf__"
|
|
|
|
for operator "->", even though the first is lucid style and the second
|
|
|
|
is ARM style. (FIXME?) */
|
|
|
|
|
|
|
|
extern enum demangling_styles
|
|
|
|
{
|
2001-12-06 22:56:15 +01:00
|
|
|
no_demangling = -1,
|
1997-08-22 00:57:35 +02:00
|
|
|
unknown_demangling = 0,
|
|
|
|
auto_demangling = DMGL_AUTO,
|
|
|
|
gnu_demangling = DMGL_GNU,
|
|
|
|
lucid_demangling = DMGL_LUCID,
|
1998-12-08 00:32:23 +01:00
|
|
|
arm_demangling = DMGL_ARM,
|
|
|
|
hp_demangling = DMGL_HP,
|
2000-06-05 04:28:41 +02:00
|
|
|
edg_demangling = DMGL_EDG,
|
2000-12-05 00:46:57 +01:00
|
|
|
gnu_v3_demangling = DMGL_GNU_V3,
|
2000-11-15 12:52:30 +01:00
|
|
|
java_demangling = DMGL_JAVA,
|
|
|
|
gnat_demangling = DMGL_GNAT
|
1997-08-22 00:57:35 +02:00
|
|
|
} current_demangling_style;
|
|
|
|
|
|
|
|
/* Define string names for the various demangling styles. */
|
|
|
|
|
2001-12-06 22:56:15 +01:00
|
|
|
#define NO_DEMANGLING_STYLE_STRING "none"
|
2000-06-05 04:28:41 +02:00
|
|
|
#define AUTO_DEMANGLING_STYLE_STRING "auto"
|
|
|
|
#define GNU_DEMANGLING_STYLE_STRING "gnu"
|
|
|
|
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
|
|
|
|
#define ARM_DEMANGLING_STYLE_STRING "arm"
|
|
|
|
#define HP_DEMANGLING_STYLE_STRING "hp"
|
|
|
|
#define EDG_DEMANGLING_STYLE_STRING "edg"
|
2000-12-05 00:46:57 +01:00
|
|
|
#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
|
2000-11-15 12:52:30 +01:00
|
|
|
#define JAVA_DEMANGLING_STYLE_STRING "java"
|
|
|
|
#define GNAT_DEMANGLING_STYLE_STRING "gnat"
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
/* Some macros to test what demangling style is active. */
|
|
|
|
|
|
|
|
#define CURRENT_DEMANGLING_STYLE current_demangling_style
|
|
|
|
#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
|
|
|
|
#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
|
|
|
|
#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
|
1998-12-08 00:32:23 +01:00
|
|
|
#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
|
|
|
|
#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
|
|
|
|
#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
|
2000-12-05 00:46:57 +01:00
|
|
|
#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
|
2000-11-15 12:52:30 +01:00
|
|
|
#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
|
|
|
|
#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
|
1997-08-22 00:57:35 +02:00
|
|
|
|
2000-04-29 00:22:22 +02:00
|
|
|
/* Provide information about the available demangle styles. This code is
|
|
|
|
pulled from gdb into libiberty because it is useful to binutils also. */
|
|
|
|
|
2001-10-07 16:45:04 +02:00
|
|
|
extern const struct demangler_engine
|
2000-04-29 00:22:22 +02:00
|
|
|
{
|
2001-10-07 16:45:04 +02:00
|
|
|
const char *const demangling_style_name;
|
|
|
|
const enum demangling_styles demangling_style;
|
|
|
|
const char *const demangling_style_doc;
|
2000-04-29 00:22:22 +02:00
|
|
|
} libiberty_demanglers[];
|
|
|
|
|
1997-08-22 00:57:35 +02:00
|
|
|
extern char *
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle (const char *mangled, int options);
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_opname (const char *opname, char *result, int options);
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
extern const char *
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_mangle_opname (const char *opname, int options);
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
/* Note: This sets global state. FIXME if you care about multi-threading. */
|
|
|
|
|
|
|
|
extern void
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
set_cplus_marker_for_demangling (int ch);
|
1997-08-22 00:57:35 +02:00
|
|
|
|
2000-04-29 00:22:22 +02:00
|
|
|
extern enum demangling_styles
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_set_style (enum demangling_styles style);
|
2000-04-29 00:22:22 +02:00
|
|
|
|
|
|
|
extern enum demangling_styles
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_name_to_style (const char *name);
|
2000-06-05 04:28:41 +02:00
|
|
|
|
demangle.h: New cplus_demangle_print_callback...
include/:
* demangle.h: New cplus_demangle_print_callback,
cplus_demangle_v3_callback, and java_demangle_v3_callback function
prototypes, and demangle_callbackref type definition.
libiberty/:
* cp-demangle.h (cplus_demangle_operators): External definition
suppressed if not building for libstdc++.
* cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface
to demangling, provides a malloc-less version of __cxa_demangle.
(cplus_demangle_print_callback): Public callback version of
cplus_demangle_print.
(struct d_growable_string): New growable string structure.
(d_growable_string_init): New function, provides support for
growable strings separate from print info.
(d_growable_string_resize): Likewise.
(d_growable_string_append_buffer): Likewise.
(d_growable_string_callback_adapter):): Likewise.
(d_print_init): New print info initialization function.
(d_print_error): Macro replace by inline function.
(d_print_saw_error): Likewise.
(d_append_char): Likewise.
(d_append_buffer): Likewise.
(d_append_string): New inline function, replaces the
d_append_string_constant macro.
(d_flush_buffer): New function, flushes buffer to callback.
(d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback
for unsupported dynamic arrays replaced by alloca().
(d_demangle): Return string length estimating removed.
(d_dump): Moved error case handling from call site into function.
(d_print_resize): Function removed.
(d_print_append_char): Likewise.
(d_print_append_buffer): Likewise.
(d_print_error): Likewise.
(d_print_comp): Added special case handling for Java arrays.
(java_demangle_v3): Removed string post-processing for Java arrays,
now replaced by special case handling in d_print_comp.
(cplus_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of cplus_demangle_v3.
(java_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of java_demangle_v3.
From-SVN: r121305
2007-01-29 21:07:49 +01:00
|
|
|
/* Callback typedef for allocation-less demangler interfaces. */
|
|
|
|
typedef void (*demangle_callbackref) (const char *, size_t, void *);
|
|
|
|
|
|
|
|
/* V3 ABI demangling entry points, defined in cp-demangle.c. Callback
|
|
|
|
variants return non-zero on success, zero on error. char* variants
|
|
|
|
return a string allocated by malloc on success, NULL on error. */
|
|
|
|
extern int
|
|
|
|
cplus_demangle_v3_callback (const char *mangled, int options,
|
|
|
|
demangle_callbackref callback, void *opaque);
|
2002-02-03 04:59:23 +01:00
|
|
|
|
2001-02-02 01:27:39 +01:00
|
|
|
extern char*
|
demangle.h: New cplus_demangle_print_callback...
include/:
* demangle.h: New cplus_demangle_print_callback,
cplus_demangle_v3_callback, and java_demangle_v3_callback function
prototypes, and demangle_callbackref type definition.
libiberty/:
* cp-demangle.h (cplus_demangle_operators): External definition
suppressed if not building for libstdc++.
* cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface
to demangling, provides a malloc-less version of __cxa_demangle.
(cplus_demangle_print_callback): Public callback version of
cplus_demangle_print.
(struct d_growable_string): New growable string structure.
(d_growable_string_init): New function, provides support for
growable strings separate from print info.
(d_growable_string_resize): Likewise.
(d_growable_string_append_buffer): Likewise.
(d_growable_string_callback_adapter):): Likewise.
(d_print_init): New print info initialization function.
(d_print_error): Macro replace by inline function.
(d_print_saw_error): Likewise.
(d_append_char): Likewise.
(d_append_buffer): Likewise.
(d_append_string): New inline function, replaces the
d_append_string_constant macro.
(d_flush_buffer): New function, flushes buffer to callback.
(d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback
for unsupported dynamic arrays replaced by alloca().
(d_demangle): Return string length estimating removed.
(d_dump): Moved error case handling from call site into function.
(d_print_resize): Function removed.
(d_print_append_char): Likewise.
(d_print_append_buffer): Likewise.
(d_print_error): Likewise.
(d_print_comp): Added special case handling for Java arrays.
(java_demangle_v3): Removed string post-processing for Java arrays,
now replaced by special case handling in d_print_comp.
(cplus_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of cplus_demangle_v3.
(java_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of java_demangle_v3.
From-SVN: r121305
2007-01-29 21:07:49 +01:00
|
|
|
cplus_demangle_v3 (const char *mangled, int options);
|
2001-02-02 01:27:39 +01:00
|
|
|
|
demangle.h: New cplus_demangle_print_callback...
include/:
* demangle.h: New cplus_demangle_print_callback,
cplus_demangle_v3_callback, and java_demangle_v3_callback function
prototypes, and demangle_callbackref type definition.
libiberty/:
* cp-demangle.h (cplus_demangle_operators): External definition
suppressed if not building for libstdc++.
* cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface
to demangling, provides a malloc-less version of __cxa_demangle.
(cplus_demangle_print_callback): Public callback version of
cplus_demangle_print.
(struct d_growable_string): New growable string structure.
(d_growable_string_init): New function, provides support for
growable strings separate from print info.
(d_growable_string_resize): Likewise.
(d_growable_string_append_buffer): Likewise.
(d_growable_string_callback_adapter):): Likewise.
(d_print_init): New print info initialization function.
(d_print_error): Macro replace by inline function.
(d_print_saw_error): Likewise.
(d_append_char): Likewise.
(d_append_buffer): Likewise.
(d_append_string): New inline function, replaces the
d_append_string_constant macro.
(d_flush_buffer): New function, flushes buffer to callback.
(d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback
for unsupported dynamic arrays replaced by alloca().
(d_demangle): Return string length estimating removed.
(d_dump): Moved error case handling from call site into function.
(d_print_resize): Function removed.
(d_print_append_char): Likewise.
(d_print_append_buffer): Likewise.
(d_print_error): Likewise.
(d_print_comp): Added special case handling for Java arrays.
(java_demangle_v3): Removed string post-processing for Java arrays,
now replaced by special case handling in d_print_comp.
(cplus_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of cplus_demangle_v3.
(java_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of java_demangle_v3.
From-SVN: r121305
2007-01-29 21:07:49 +01:00
|
|
|
extern int
|
|
|
|
java_demangle_v3_callback (const char *mangled,
|
|
|
|
demangle_callbackref callback, void *opaque);
|
|
|
|
|
|
|
|
extern char*
|
|
|
|
java_demangle_v3 (const char *mangled);
|
2001-03-21 20:37:53 +01:00
|
|
|
|
2010-01-11 12:38:35 +01:00
|
|
|
char *
|
|
|
|
ada_demangle (const char *mangled, int options);
|
|
|
|
|
2001-03-21 20:37:53 +01:00
|
|
|
enum gnu_v3_ctor_kinds {
|
|
|
|
gnu_v3_complete_object_ctor = 1,
|
|
|
|
gnu_v3_base_object_ctor,
|
2011-11-08 12:13:41 +01:00
|
|
|
gnu_v3_complete_object_allocating_ctor,
|
|
|
|
gnu_v3_object_ctor_group
|
2001-03-21 20:37:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Return non-zero iff NAME is the mangled form of a constructor name
|
|
|
|
in the G++ V3 ABI demangling style. Specifically, return an `enum
|
|
|
|
gnu_v3_ctor_kinds' value indicating what kind of constructor
|
|
|
|
it is. */
|
2001-05-08 08:13:58 +02:00
|
|
|
extern enum gnu_v3_ctor_kinds
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
is_gnu_v3_mangled_ctor (const char *name);
|
2001-03-21 20:37:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
enum gnu_v3_dtor_kinds {
|
|
|
|
gnu_v3_deleting_dtor = 1,
|
|
|
|
gnu_v3_complete_object_dtor,
|
2011-11-08 12:13:41 +01:00
|
|
|
gnu_v3_base_object_dtor,
|
|
|
|
gnu_v3_object_dtor_group
|
2001-03-21 20:37:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Return non-zero iff NAME is the mangled form of a destructor name
|
|
|
|
in the G++ V3 ABI demangling style. Specifically, return an `enum
|
|
|
|
gnu_v3_dtor_kinds' value, indicating what kind of destructor
|
|
|
|
it is. */
|
2001-05-08 08:13:58 +02:00
|
|
|
extern enum gnu_v3_dtor_kinds
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
is_gnu_v3_mangled_dtor (const char *name);
|
2001-03-21 20:37:53 +01:00
|
|
|
|
2004-01-12 20:46:31 +01:00
|
|
|
/* The V3 demangler works in two passes. The first pass builds a tree
|
|
|
|
representation of the mangled name, and the second pass turns the
|
|
|
|
tree representation into a demangled string. Here we define an
|
|
|
|
interface to permit a caller to build their own tree
|
|
|
|
representation, which they can pass to the demangler to get a
|
|
|
|
demangled string. This can be used to canonicalize user input into
|
|
|
|
something which the demangler might output. It could also be used
|
|
|
|
by other demanglers in the future. */
|
|
|
|
|
|
|
|
/* These are the component types which may be found in the tree. Many
|
|
|
|
component types have one or two subtrees, referred to as left and
|
|
|
|
right (a component type with only one subtree puts it in the left
|
|
|
|
subtree). */
|
|
|
|
|
|
|
|
enum demangle_component_type
|
|
|
|
{
|
|
|
|
/* A name, with a length and a pointer to a string. */
|
|
|
|
DEMANGLE_COMPONENT_NAME,
|
|
|
|
/* A qualified name. The left subtree is a class or namespace or
|
|
|
|
some such thing, and the right subtree is a name qualified by
|
|
|
|
that class. */
|
|
|
|
DEMANGLE_COMPONENT_QUAL_NAME,
|
|
|
|
/* A local name. The left subtree describes a function, and the
|
|
|
|
right subtree is a name which is local to that function. */
|
|
|
|
DEMANGLE_COMPONENT_LOCAL_NAME,
|
|
|
|
/* A typed name. The left subtree is a name, and the right subtree
|
|
|
|
describes that name as a function. */
|
|
|
|
DEMANGLE_COMPONENT_TYPED_NAME,
|
|
|
|
/* A template. The left subtree is a template name, and the right
|
|
|
|
subtree is a template argument list. */
|
|
|
|
DEMANGLE_COMPONENT_TEMPLATE,
|
|
|
|
/* A template parameter. This holds a number, which is the template
|
|
|
|
parameter index. */
|
|
|
|
DEMANGLE_COMPONENT_TEMPLATE_PARAM,
|
2009-03-18 00:31:18 +01:00
|
|
|
/* A function parameter. This holds a number, which is the index. */
|
|
|
|
DEMANGLE_COMPONENT_FUNCTION_PARAM,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* A constructor. This holds a name and the kind of
|
|
|
|
constructor. */
|
|
|
|
DEMANGLE_COMPONENT_CTOR,
|
|
|
|
/* A destructor. This holds a name and the kind of destructor. */
|
|
|
|
DEMANGLE_COMPONENT_DTOR,
|
|
|
|
/* A vtable. This has one subtree, the type for which this is a
|
|
|
|
vtable. */
|
|
|
|
DEMANGLE_COMPONENT_VTABLE,
|
|
|
|
/* A VTT structure. This has one subtree, the type for which this
|
|
|
|
is a VTT. */
|
|
|
|
DEMANGLE_COMPONENT_VTT,
|
|
|
|
/* A construction vtable. The left subtree is the type for which
|
|
|
|
this is a vtable, and the right subtree is the derived type for
|
|
|
|
which this vtable is built. */
|
|
|
|
DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
|
|
|
|
/* A typeinfo structure. This has one subtree, the type for which
|
|
|
|
this is the tpeinfo structure. */
|
|
|
|
DEMANGLE_COMPONENT_TYPEINFO,
|
|
|
|
/* A typeinfo name. This has one subtree, the type for which this
|
|
|
|
is the typeinfo name. */
|
|
|
|
DEMANGLE_COMPONENT_TYPEINFO_NAME,
|
|
|
|
/* A typeinfo function. This has one subtree, the type for which
|
|
|
|
this is the tpyeinfo function. */
|
|
|
|
DEMANGLE_COMPONENT_TYPEINFO_FN,
|
|
|
|
/* A thunk. This has one subtree, the name for which this is a
|
|
|
|
thunk. */
|
|
|
|
DEMANGLE_COMPONENT_THUNK,
|
|
|
|
/* A virtual thunk. This has one subtree, the name for which this
|
|
|
|
is a virtual thunk. */
|
|
|
|
DEMANGLE_COMPONENT_VIRTUAL_THUNK,
|
|
|
|
/* A covariant thunk. This has one subtree, the name for which this
|
|
|
|
is a covariant thunk. */
|
|
|
|
DEMANGLE_COMPONENT_COVARIANT_THUNK,
|
|
|
|
/* A Java class. This has one subtree, the type. */
|
|
|
|
DEMANGLE_COMPONENT_JAVA_CLASS,
|
|
|
|
/* A guard variable. This has one subtree, the name for which this
|
|
|
|
is a guard variable. */
|
|
|
|
DEMANGLE_COMPONENT_GUARD,
|
2012-10-08 16:45:37 +02:00
|
|
|
/* The init and wrapper functions for C++11 thread_local variables. */
|
|
|
|
DEMANGLE_COMPONENT_TLS_INIT,
|
|
|
|
DEMANGLE_COMPONENT_TLS_WRAPPER,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* A reference temporary. This has one subtree, the name for which
|
|
|
|
this is a temporary. */
|
|
|
|
DEMANGLE_COMPONENT_REFTEMP,
|
2005-05-26 01:29:54 +02:00
|
|
|
/* A hidden alias. This has one subtree, the encoding for which it
|
|
|
|
is providing alternative linkage. */
|
|
|
|
DEMANGLE_COMPONENT_HIDDEN_ALIAS,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* A standard substitution. This holds the name of the
|
|
|
|
substitution. */
|
|
|
|
DEMANGLE_COMPONENT_SUB_STD,
|
|
|
|
/* The restrict qualifier. The one subtree is the type which is
|
|
|
|
being qualified. */
|
|
|
|
DEMANGLE_COMPONENT_RESTRICT,
|
|
|
|
/* The volatile qualifier. The one subtree is the type which is
|
|
|
|
being qualified. */
|
|
|
|
DEMANGLE_COMPONENT_VOLATILE,
|
|
|
|
/* The const qualifier. The one subtree is the type which is being
|
|
|
|
qualified. */
|
|
|
|
DEMANGLE_COMPONENT_CONST,
|
|
|
|
/* The restrict qualifier modifying a member function. The one
|
|
|
|
subtree is the type which is being qualified. */
|
|
|
|
DEMANGLE_COMPONENT_RESTRICT_THIS,
|
|
|
|
/* The volatile qualifier modifying a member function. The one
|
|
|
|
subtree is the type which is being qualified. */
|
|
|
|
DEMANGLE_COMPONENT_VOLATILE_THIS,
|
|
|
|
/* The const qualifier modifying a member function. The one subtree
|
|
|
|
is the type which is being qualified. */
|
|
|
|
DEMANGLE_COMPONENT_CONST_THIS,
|
2013-04-03 19:24:12 +02:00
|
|
|
/* C++11 A reference modifying a member function. The one subtree is the
|
|
|
|
type which is being referenced. */
|
|
|
|
DEMANGLE_COMPONENT_REFERENCE_THIS,
|
|
|
|
/* C++11: An rvalue reference modifying a member function. The one
|
|
|
|
subtree is the type which is being referenced. */
|
|
|
|
DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* A vendor qualifier. The left subtree is the type which is being
|
|
|
|
qualified, and the right subtree is the name of the
|
|
|
|
qualifier. */
|
|
|
|
DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
|
|
|
|
/* A pointer. The one subtree is the type which is being pointed
|
|
|
|
to. */
|
|
|
|
DEMANGLE_COMPONENT_POINTER,
|
|
|
|
/* A reference. The one subtree is the type which is being
|
|
|
|
referenced. */
|
|
|
|
DEMANGLE_COMPONENT_REFERENCE,
|
2007-08-31 21:15:26 +02:00
|
|
|
/* C++0x: An rvalue reference. The one subtree is the type which is
|
|
|
|
being referenced. */
|
|
|
|
DEMANGLE_COMPONENT_RVALUE_REFERENCE,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* A complex type. The one subtree is the base type. */
|
|
|
|
DEMANGLE_COMPONENT_COMPLEX,
|
|
|
|
/* An imaginary type. The one subtree is the base type. */
|
|
|
|
DEMANGLE_COMPONENT_IMAGINARY,
|
|
|
|
/* A builtin type. This holds the builtin type information. */
|
|
|
|
DEMANGLE_COMPONENT_BUILTIN_TYPE,
|
|
|
|
/* A vendor's builtin type. This holds the name of the type. */
|
|
|
|
DEMANGLE_COMPONENT_VENDOR_TYPE,
|
|
|
|
/* A function type. The left subtree is the return type. The right
|
|
|
|
subtree is a list of ARGLIST nodes. Either or both may be
|
|
|
|
NULL. */
|
|
|
|
DEMANGLE_COMPONENT_FUNCTION_TYPE,
|
|
|
|
/* An array type. The left subtree is the dimension, which may be
|
|
|
|
NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an
|
|
|
|
expression. The right subtree is the element type. */
|
|
|
|
DEMANGLE_COMPONENT_ARRAY_TYPE,
|
|
|
|
/* A pointer to member type. The left subtree is the class type,
|
|
|
|
and the right subtree is the member type. CV-qualifiers appear
|
|
|
|
on the latter. */
|
|
|
|
DEMANGLE_COMPONENT_PTRMEM_TYPE,
|
2008-12-10 23:11:44 +01:00
|
|
|
/* A fixed-point type. */
|
|
|
|
DEMANGLE_COMPONENT_FIXED_TYPE,
|
2010-02-03 21:42:35 +01:00
|
|
|
/* A vector type. The left subtree is the number of elements,
|
|
|
|
the right subtree is the element type. */
|
|
|
|
DEMANGLE_COMPONENT_VECTOR_TYPE,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* An argument list. The left subtree is the current argument, and
|
|
|
|
the right subtree is either NULL or another ARGLIST node. */
|
|
|
|
DEMANGLE_COMPONENT_ARGLIST,
|
|
|
|
/* A template argument list. The left subtree is the current
|
|
|
|
template argument, and the right subtree is either NULL or
|
|
|
|
another TEMPLATE_ARGLIST node. */
|
|
|
|
DEMANGLE_COMPONENT_TEMPLATE_ARGLIST,
|
re PR c++/6057 (expression mangling doesn't work for operator new)
PR c++/6057
PR c++/48051
PR c++/50855
PR c++/51322
gcc/cp/
* mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
PREDECREMENT_EXPR.
(write_template_arg): Fix mangling of class-scope functions and
argument packs.
(mangle_decl): Update suggested -fabi-version argument.
* operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
* tree.c (dependent_name): No longer static.
* cp-tree.h: Declare it.
* pt.c (unify): Defer handling of unconverted functions.
include/
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY.
libiberty/
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and
DEMANGLE_COMPONENT_INITIALIZER_LIST.
(d_make_comp): Likewise. Allow null right arg for
DEMANGLE_COMPONENT_TRINARY_ARG2.
(cplus_demangle_operators): Adjust new/delete; add .*, :: and throw.
(d_template_args, d_template_arg): Handle 'J' for argument packs.
(d_exprlist): Add terminator parm.
(d_expression, d_print_comp): Handle initializer lists, nullary
expressions, prefix/suffix operators, and new.
(d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME
and DEMANGLE_COMPONENT_INITIALIZER_LIST.
* testsuite/demangle-expected: Add tests.
From-SVN: r182970
2012-01-06 22:39:43 +01:00
|
|
|
/* An initializer list. The left subtree is either an explicit type or
|
|
|
|
NULL, and the right subtree is a DEMANGLE_COMPONENT_ARGLIST. */
|
|
|
|
DEMANGLE_COMPONENT_INITIALIZER_LIST,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* An operator. This holds information about a standard
|
|
|
|
operator. */
|
|
|
|
DEMANGLE_COMPONENT_OPERATOR,
|
|
|
|
/* An extended operator. This holds the number of arguments, and
|
|
|
|
the name of the extended operator. */
|
|
|
|
DEMANGLE_COMPONENT_EXTENDED_OPERATOR,
|
|
|
|
/* A typecast, represented as a unary operator. The one subtree is
|
|
|
|
the type to which the argument should be cast. */
|
|
|
|
DEMANGLE_COMPONENT_CAST,
|
re PR c++/6057 (expression mangling doesn't work for operator new)
PR c++/6057
PR c++/48051
PR c++/50855
PR c++/51322
gcc/cp/
* mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
PREDECREMENT_EXPR.
(write_template_arg): Fix mangling of class-scope functions and
argument packs.
(mangle_decl): Update suggested -fabi-version argument.
* operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
* tree.c (dependent_name): No longer static.
* cp-tree.h: Declare it.
* pt.c (unify): Defer handling of unconverted functions.
include/
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY.
libiberty/
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and
DEMANGLE_COMPONENT_INITIALIZER_LIST.
(d_make_comp): Likewise. Allow null right arg for
DEMANGLE_COMPONENT_TRINARY_ARG2.
(cplus_demangle_operators): Adjust new/delete; add .*, :: and throw.
(d_template_args, d_template_arg): Handle 'J' for argument packs.
(d_exprlist): Add terminator parm.
(d_expression, d_print_comp): Handle initializer lists, nullary
expressions, prefix/suffix operators, and new.
(d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME
and DEMANGLE_COMPONENT_INITIALIZER_LIST.
* testsuite/demangle-expected: Add tests.
From-SVN: r182970
2012-01-06 22:39:43 +01:00
|
|
|
/* A nullary expression. The left subtree is the operator. */
|
|
|
|
DEMANGLE_COMPONENT_NULLARY,
|
2004-01-12 20:46:31 +01:00
|
|
|
/* A unary expression. The left subtree is the operator, and the
|
|
|
|
right subtree is the single argument. */
|
|
|
|
DEMANGLE_COMPONENT_UNARY,
|
|
|
|
/* A binary expression. The left subtree is the operator, and the
|
|
|
|
right subtree is a BINARY_ARGS. */
|
|
|
|
DEMANGLE_COMPONENT_BINARY,
|
|
|
|
/* Arguments to a binary expression. The left subtree is the first
|
|
|
|
argument, and the right subtree is the second argument. */
|
|
|
|
DEMANGLE_COMPONENT_BINARY_ARGS,
|
|
|
|
/* A trinary expression. The left subtree is the operator, and the
|
|
|
|
right subtree is a TRINARY_ARG1. */
|
|
|
|
DEMANGLE_COMPONENT_TRINARY,
|
|
|
|
/* Arguments to a trinary expression. The left subtree is the first
|
|
|
|
argument, and the right subtree is a TRINARY_ARG2. */
|
|
|
|
DEMANGLE_COMPONENT_TRINARY_ARG1,
|
|
|
|
/* More arguments to a trinary expression. The left subtree is the
|
|
|
|
second argument, and the right subtree is the third argument. */
|
|
|
|
DEMANGLE_COMPONENT_TRINARY_ARG2,
|
|
|
|
/* A literal. The left subtree is the type, and the right subtree
|
|
|
|
is the value, represented as a DEMANGLE_COMPONENT_NAME. */
|
|
|
|
DEMANGLE_COMPONENT_LITERAL,
|
|
|
|
/* A negative literal. Like LITERAL, but the value is negated.
|
|
|
|
This is a minor hack: the NAME used for LITERAL points directly
|
|
|
|
to the mangled string, but since negative numbers are mangled
|
|
|
|
using 'n' instead of '-', we want a way to indicate a negative
|
|
|
|
number which involves neither modifying the mangled string nor
|
|
|
|
allocating a new copy of the literal in memory. */
|
2008-01-27 07:01:00 +01:00
|
|
|
DEMANGLE_COMPONENT_LITERAL_NEG,
|
|
|
|
/* A libgcj compiled resource. The left subtree is the name of the
|
|
|
|
resource. */
|
|
|
|
DEMANGLE_COMPONENT_JAVA_RESOURCE,
|
|
|
|
/* A name formed by the concatenation of two parts. The left
|
|
|
|
subtree is the first part and the right subtree the second. */
|
|
|
|
DEMANGLE_COMPONENT_COMPOUND_NAME,
|
|
|
|
/* A name formed by a single character. */
|
2008-09-09 19:38:10 +02:00
|
|
|
DEMANGLE_COMPONENT_CHARACTER,
|
2010-02-03 21:42:35 +01:00
|
|
|
/* A number. */
|
|
|
|
DEMANGLE_COMPONENT_NUMBER,
|
2008-09-09 19:38:10 +02:00
|
|
|
/* A decltype type. */
|
2008-10-07 00:29:42 +02:00
|
|
|
DEMANGLE_COMPONENT_DECLTYPE,
|
2009-07-17 21:09:54 +02:00
|
|
|
/* Global constructors keyed to name. */
|
|
|
|
DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS,
|
|
|
|
/* Global destructors keyed to name. */
|
|
|
|
DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS,
|
2009-09-30 05:01:30 +02:00
|
|
|
/* A lambda closure type. */
|
|
|
|
DEMANGLE_COMPONENT_LAMBDA,
|
|
|
|
/* A default argument scope. */
|
|
|
|
DEMANGLE_COMPONENT_DEFAULT_ARG,
|
|
|
|
/* An unnamed type. */
|
|
|
|
DEMANGLE_COMPONENT_UNNAMED_TYPE,
|
2011-11-08 12:13:41 +01:00
|
|
|
/* A transactional clone. This has one subtree, the encoding for
|
|
|
|
which it is providing alternative linkage. */
|
|
|
|
DEMANGLE_COMPONENT_TRANSACTION_CLONE,
|
|
|
|
/* A non-transactional clone entry point. In the i386/x86_64 abi,
|
|
|
|
the unmangled symbol of a tm_callable becomes a thunk and the
|
|
|
|
non-transactional function version is mangled thus. */
|
|
|
|
DEMANGLE_COMPONENT_NONTRANSACTION_CLONE,
|
2008-10-07 00:29:42 +02:00
|
|
|
/* A pack expansion. */
|
2011-09-23 23:39:10 +02:00
|
|
|
DEMANGLE_COMPONENT_PACK_EXPANSION,
|
2012-11-09 17:14:37 +01:00
|
|
|
/* A name with an ABI tag. */
|
|
|
|
DEMANGLE_COMPONENT_TAGGED_NAME,
|
2011-09-23 23:39:10 +02:00
|
|
|
/* A cloned function. */
|
|
|
|
DEMANGLE_COMPONENT_CLONE
|
2004-01-12 20:46:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Types which are only used internally. */
|
|
|
|
|
|
|
|
struct demangle_operator_info;
|
|
|
|
struct demangle_builtin_type_info;
|
|
|
|
|
|
|
|
/* A node in the tree representation is an instance of a struct
|
|
|
|
demangle_component. Note that the field names of the struct are
|
|
|
|
not well protected against macros defined by the file including
|
|
|
|
this one. We can fix this if it ever becomes a problem. */
|
|
|
|
|
|
|
|
struct demangle_component
|
|
|
|
{
|
|
|
|
/* The type of this component. */
|
|
|
|
enum demangle_component_type type;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
/* For DEMANGLE_COMPONENT_NAME. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* A pointer to the name (which need not NULL terminated) and
|
|
|
|
its length. */
|
|
|
|
const char *s;
|
|
|
|
int len;
|
|
|
|
} s_name;
|
|
|
|
|
|
|
|
/* For DEMANGLE_COMPONENT_OPERATOR. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Operator. */
|
|
|
|
const struct demangle_operator_info *op;
|
|
|
|
} s_operator;
|
|
|
|
|
|
|
|
/* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Number of arguments. */
|
|
|
|
int args;
|
|
|
|
/* Name. */
|
|
|
|
struct demangle_component *name;
|
|
|
|
} s_extended_operator;
|
|
|
|
|
2008-12-10 23:11:44 +01:00
|
|
|
/* For DEMANGLE_COMPONENT_FIXED_TYPE. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* The length, indicated by a C integer type name. */
|
|
|
|
struct demangle_component *length;
|
|
|
|
/* _Accum or _Fract? */
|
|
|
|
short accum;
|
|
|
|
/* Saturating or not? */
|
|
|
|
short sat;
|
|
|
|
} s_fixed;
|
|
|
|
|
2004-01-12 20:46:31 +01:00
|
|
|
/* For DEMANGLE_COMPONENT_CTOR. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Kind of constructor. */
|
|
|
|
enum gnu_v3_ctor_kinds kind;
|
|
|
|
/* Name. */
|
|
|
|
struct demangle_component *name;
|
|
|
|
} s_ctor;
|
|
|
|
|
|
|
|
/* For DEMANGLE_COMPONENT_DTOR. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Kind of destructor. */
|
|
|
|
enum gnu_v3_dtor_kinds kind;
|
|
|
|
/* Name. */
|
|
|
|
struct demangle_component *name;
|
|
|
|
} s_dtor;
|
|
|
|
|
|
|
|
/* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Builtin type. */
|
|
|
|
const struct demangle_builtin_type_info *type;
|
|
|
|
} s_builtin;
|
|
|
|
|
|
|
|
/* For DEMANGLE_COMPONENT_SUB_STD. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Standard substitution string. */
|
|
|
|
const char* string;
|
|
|
|
/* Length of string. */
|
|
|
|
int len;
|
|
|
|
} s_string;
|
|
|
|
|
2009-03-18 00:31:18 +01:00
|
|
|
/* For DEMANGLE_COMPONENT_*_PARAM. */
|
2004-01-12 20:46:31 +01:00
|
|
|
struct
|
|
|
|
{
|
2009-03-18 00:31:18 +01:00
|
|
|
/* Parameter index. */
|
2004-01-12 20:46:31 +01:00
|
|
|
long number;
|
|
|
|
} s_number;
|
|
|
|
|
2008-01-27 07:01:00 +01:00
|
|
|
/* For DEMANGLE_COMPONENT_CHARACTER. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int character;
|
|
|
|
} s_character;
|
|
|
|
|
2004-01-12 20:46:31 +01:00
|
|
|
/* For other types. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* Left (or only) subtree. */
|
|
|
|
struct demangle_component *left;
|
|
|
|
/* Right subtree. */
|
|
|
|
struct demangle_component *right;
|
|
|
|
} s_binary;
|
|
|
|
|
2009-09-30 05:01:30 +02:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* subtree, same place as d_left. */
|
|
|
|
struct demangle_component *sub;
|
|
|
|
/* integer. */
|
|
|
|
int num;
|
|
|
|
} s_unary_num;
|
|
|
|
|
2004-01-12 20:46:31 +01:00
|
|
|
} u;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* People building mangled trees are expected to allocate instances of
|
|
|
|
struct demangle_component themselves. They can then call one of
|
|
|
|
the following functions to fill them in. */
|
|
|
|
|
|
|
|
/* Fill in most component types with a left subtree and a right
|
|
|
|
subtree. Returns non-zero on success, zero on failure, such as an
|
|
|
|
unrecognized or inappropriate component type. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_component (struct demangle_component *fill,
|
|
|
|
enum demangle_component_type,
|
|
|
|
struct demangle_component *left,
|
|
|
|
struct demangle_component *right);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success,
|
|
|
|
zero for bad arguments. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_name (struct demangle_component *fill,
|
|
|
|
const char *, int);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the
|
|
|
|
builtin type (e.g., "int", etc.). Returns non-zero on success,
|
|
|
|
zero if the type is not recognized. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_builtin_type (struct demangle_component *fill,
|
|
|
|
const char *type_name);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
|
|
|
|
operator and the number of arguments which it takes (the latter is
|
|
|
|
used to disambiguate operators which can be both binary and unary,
|
|
|
|
such as '-'). Returns non-zero on success, zero if the operator is
|
|
|
|
not recognized. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_operator (struct demangle_component *fill,
|
|
|
|
const char *opname, int args);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the
|
|
|
|
number of arguments and the name. Returns non-zero on success,
|
|
|
|
zero for bad arguments. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_extended_operator (struct demangle_component *fill,
|
|
|
|
int numargs,
|
|
|
|
struct demangle_component *nm);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success,
|
|
|
|
zero for bad arguments. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_ctor (struct demangle_component *fill,
|
|
|
|
enum gnu_v3_ctor_kinds kind,
|
|
|
|
struct demangle_component *name);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success,
|
|
|
|
zero for bad arguments. */
|
|
|
|
|
|
|
|
extern int
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_fill_dtor (struct demangle_component *fill,
|
|
|
|
enum gnu_v3_dtor_kinds kind,
|
|
|
|
struct demangle_component *name);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* This function translates a mangled name into a struct
|
|
|
|
demangle_component tree. The first argument is the mangled name.
|
|
|
|
The second argument is DMGL_* options. This returns a pointer to a
|
|
|
|
tree on success, or NULL on failure. On success, the third
|
|
|
|
argument is set to a block of memory allocated by malloc. This
|
|
|
|
block should be passed to free when the tree is no longer
|
|
|
|
needed. */
|
|
|
|
|
|
|
|
extern struct demangle_component *
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_v3_components (const char *mangled, int options, void **mem);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
|
|
|
/* This function takes a struct demangle_component tree and returns
|
|
|
|
the corresponding demangled string. The first argument is DMGL_*
|
|
|
|
options. The second is the tree to demangle. The third is a guess
|
|
|
|
at the length of the demangled string, used to initially allocate
|
|
|
|
the return buffer. The fourth is a pointer to a size_t. On
|
|
|
|
success, this function returns a buffer allocated by malloc(), and
|
|
|
|
sets the size_t pointed to by the fourth argument to the size of
|
|
|
|
the allocated buffer (not the length of the returned string). On
|
|
|
|
failure, this function returns NULL, and sets the size_t pointed to
|
|
|
|
by the fourth argument to 0 for an invalid tree, or to 1 for a
|
|
|
|
memory allocation error. */
|
|
|
|
|
|
|
|
extern char *
|
demangle.h: Remove uses of PARAMS.
include/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
* libiberty.h (ANSI_PROTOTYPES): Remove guard since
ANSI_PROTOTYPES is always assumed.
Remove uses of PARAMS throughout.
libiberty/
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 2/n.
* cp-demangle.h: Remove uses of PARAMS.
* cp-demangle.c: Likewise.
(d_dump, cplus_demangle_fill_name,
cplus_demangle_fill_extended_operator,
cplus_demangle_fill_ctor,
cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
d_make_name,
d_make_builtin_type, d_make_operator,
d_make_extended_operator,
d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
cplus_demangle_mangled_name, has_return_type,
is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
d_prefix, d_unqualified_name, d_source_name, d_number,
d_identifier, d_operator_name, d_special_name, d_call_offset,
d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
d_function_type, d_bare_function_type, d_class_enum_type,
d_array_type, d_pointer_to_member_type, d_template_param,
d_template_args, d_template_arg, d_expression, d_expr_primary,
d_local_name, d_discriminator, d_add_substitution,
d_substitution, d_print_resize, d_print_append_char,
d_print_append_buffer, d_print_error, cplus_demangle_print,
d_print_comp, d_print_java_identifier, d_print_mod_list,
d_print_mod, d_print_function_type, d_print_array_type,
d_print_expr_op, d_print_cast, cplus_demangle_init_info,
d_demangle, __cxa_demangle, cplus_demangle_v3,
java_demangle_v3,
is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor,
print_usage, main):
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to ISO C prototype style 1/n.
* _doprnt.c: Remove conditional #include <varargs.h> on
ANSI_PROTOTYPES as the latter is always assumed.
(_doprnt, checkit, main): Use ISO C prototype.
* alloca.c (find_stack_direction, C_alloca): Use ISO C
prototype.
* argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
(dupargv, freeargv, buildargv, main): Use ISO C prototype.
* atexit.c (atexit): Likewise
* asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
(asprintf): Use ISO C prototype.
* basename.c (basename): Likewise
* bcmp.c (bcmp): Likewise.
* bcopy.c (bcopy): Likewise.
* bzero.c (bzero): Likewise.
* bsearch.c (bsearch): Likewise. Improve const-correctness.
* choose-temp.c (choose_temp_base): Likewise.
* calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
(calloc): Use ISO C prototype.
* clock.c (clock): Likewise.
* concat.c: Remove conditional #include on ANSI_PROTOTYPES.
(vconcat_length, vconcat_copy, concat_length, concat_copy,
concat_copy2, concat, reconcat, main): Use ISO C prototype.
* copysign.c (copysign): Likewise.
From-SVN: r97085
2005-03-26 20:24:33 +01:00
|
|
|
cplus_demangle_print (int options,
|
|
|
|
const struct demangle_component *tree,
|
|
|
|
int estimated_length,
|
|
|
|
size_t *p_allocated_size);
|
2004-01-12 20:46:31 +01:00
|
|
|
|
demangle.h: New cplus_demangle_print_callback...
include/:
* demangle.h: New cplus_demangle_print_callback,
cplus_demangle_v3_callback, and java_demangle_v3_callback function
prototypes, and demangle_callbackref type definition.
libiberty/:
* cp-demangle.h (cplus_demangle_operators): External definition
suppressed if not building for libstdc++.
* cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface
to demangling, provides a malloc-less version of __cxa_demangle.
(cplus_demangle_print_callback): Public callback version of
cplus_demangle_print.
(struct d_growable_string): New growable string structure.
(d_growable_string_init): New function, provides support for
growable strings separate from print info.
(d_growable_string_resize): Likewise.
(d_growable_string_append_buffer): Likewise.
(d_growable_string_callback_adapter):): Likewise.
(d_print_init): New print info initialization function.
(d_print_error): Macro replace by inline function.
(d_print_saw_error): Likewise.
(d_append_char): Likewise.
(d_append_buffer): Likewise.
(d_append_string): New inline function, replaces the
d_append_string_constant macro.
(d_flush_buffer): New function, flushes buffer to callback.
(d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback
for unsupported dynamic arrays replaced by alloca().
(d_demangle): Return string length estimating removed.
(d_dump): Moved error case handling from call site into function.
(d_print_resize): Function removed.
(d_print_append_char): Likewise.
(d_print_append_buffer): Likewise.
(d_print_error): Likewise.
(d_print_comp): Added special case handling for Java arrays.
(java_demangle_v3): Removed string post-processing for Java arrays,
now replaced by special case handling in d_print_comp.
(cplus_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of cplus_demangle_v3.
(java_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of java_demangle_v3.
From-SVN: r121305
2007-01-29 21:07:49 +01:00
|
|
|
/* This function takes a struct demangle_component tree and passes back
|
|
|
|
a demangled string in one or more calls to a callback function.
|
|
|
|
The first argument is DMGL_* options. The second is the tree to
|
|
|
|
demangle. The third is a pointer to a callback function; on each call
|
|
|
|
this receives an element of the demangled string, its length, and an
|
|
|
|
opaque value. The fourth is the opaque value passed to the callback.
|
|
|
|
The callback is called once or more to return the full demangled
|
|
|
|
string. The demangled element string is always nul-terminated, though
|
|
|
|
its length is also provided for convenience. In contrast to
|
|
|
|
cplus_demangle_print(), this function does not allocate heap memory
|
|
|
|
to grow output strings (except perhaps where alloca() is implemented
|
|
|
|
by malloc()), and so is normally safe for use where the heap has been
|
|
|
|
corrupted. On success, this function returns 1; on failure, 0. */
|
|
|
|
|
|
|
|
extern int
|
|
|
|
cplus_demangle_print_callback (int options,
|
|
|
|
const struct demangle_component *tree,
|
|
|
|
demangle_callbackref callback, void *opaque);
|
|
|
|
|
2003-07-06 23:45:37 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1997-08-22 00:57:35 +02:00
|
|
|
#endif /* DEMANGLE_H */
|