00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #if !defined (DEMANGLE_H)
00021 #define DEMANGLE_H
00022
00023 #ifdef IN_GCC
00024 #include "gansidecl.h"
00025 #define PARAMS(ARGS) PROTO(ARGS)
00026 #else
00027 #include <ansidecl.h>
00028 #endif
00029
00030
00031
00032 #define DMGL_NO_OPTS 0
00033 #define DMGL_PARAMS (1 << 0)
00034 #define DMGL_ANSI (1 << 1)
00035 #define DMGL_JAVA (1 << 2)
00036
00037 #define DMGL_AUTO (1 << 8)
00038 #define DMGL_GNU (1 << 9)
00039 #define DMGL_LUCID (1 << 10)
00040 #define DMGL_ARM (1 << 11)
00041
00042 #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM)
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 extern enum demangling_styles
00053 {
00054 unknown_demangling = 0,
00055 auto_demangling = DMGL_AUTO,
00056 gnu_demangling = DMGL_GNU,
00057 lucid_demangling = DMGL_LUCID,
00058 arm_demangling = DMGL_ARM
00059 } current_demangling_style;
00060
00061
00062
00063 #define AUTO_DEMANGLING_STYLE_STRING "auto"
00064 #define GNU_DEMANGLING_STYLE_STRING "gnu"
00065 #define LUCID_DEMANGLING_STYLE_STRING "lucid"
00066 #define ARM_DEMANGLING_STYLE_STRING "arm"
00067
00068
00069
00070 #define CURRENT_DEMANGLING_STYLE current_demangling_style
00071 #define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
00072 #define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
00073 #define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
00074 #define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM)
00075
00076 extern char *
00077 cplus_demangle PARAMS ((const char *mangled, int options));
00078
00079 extern int
00080 cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
00081
00082 extern const char *
00083 cplus_mangle_opname PARAMS ((const char *opname, int options));
00084
00085
00086
00087 extern void
00088 set_cplus_marker_for_demangling PARAMS ((int ch));
00089
00090 #endif