summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-05-13 22:07:32 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-05-13 22:07:32 +0000
commit7e0049914cd4c9eb6f5dcffefaac344b5ea5a2a9 (patch)
treeee3a60ab0d9952ca041948d363bbc09936f5440e /gnu
parent391fe18e516952de4c9b7ba6130479a46d157107 (diff)
pull some demangler changes as with the libiberty counterpart to please
binutils; actually both files should be the same.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/include/demangle.h54
1 files changed, 35 insertions, 19 deletions
diff --git a/gnu/usr.bin/binutils/include/demangle.h b/gnu/usr.bin/binutils/include/demangle.h
index e36d9e7d9e2..644161116cd 100644
--- a/gnu/usr.bin/binutils/include/demangle.h
+++ b/gnu/usr.bin/binutils/include/demangle.h
@@ -1,6 +1,5 @@
/* Defs for interface to demanglers.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
- Free Software Foundation, Inc.
+ Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,18 +24,19 @@
/* Options passed to cplus_demangle (in 2nd parameter). */
-#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++. */
+#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++. */
-#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)
+#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)
/* If none of these are set, use 'current_demangling_style' as the default. */
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG)
@@ -62,12 +62,12 @@ extern enum demangling_styles
/* Define string names for the various demangling styles. */
-#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"
+#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"
/* Some macros to test what demangling style is active. */
@@ -79,6 +79,16 @@ extern enum demangling_styles
#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
+/* Provide information about the available demangle styles. This code is
+ pulled from gdb into libiberty because it is useful to binutils also. */
+
+extern struct demangler_engine
+{
+ const char *demangling_style_name;
+ enum demangling_styles demangling_style;
+ const char *demangling_style_doc;
+} libiberty_demanglers[];
+
extern char *
cplus_demangle PARAMS ((const char *mangled, int options));
@@ -93,4 +103,10 @@ cplus_mangle_opname PARAMS ((const char *opname, int options));
extern void
set_cplus_marker_for_demangling PARAMS ((int ch));
+extern enum demangling_styles
+cplus_demangle_set_style PARAMS ((enum demangling_styles style));
+
+extern enum demangling_styles
+cplus_demangle_name_to_style PARAMS ((const char *name));
+
#endif /* DEMANGLE_H */