|
|
1.1 root 1: /* Defs for interface to demanglers.
2: Copyright 1992 Free Software Foundation, Inc.
3:
4: This program is free software; you can redistribute it and/or modify
5: it under the terms of the GNU General Public License as published by
6: the Free Software Foundation; either version 2, or (at your option)
7: any later version.
8:
9: This program is distributed in the hope that it will be useful,
10: but WITHOUT ANY WARRANTY; without even the implied warranty of
11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: GNU General Public License for more details.
13:
14: You should have received a copy of the GNU General Public License
15: along with this program; if not, write to the Free Software
16: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17:
18:
19: #include <ansidecl.h>
20:
21: /* Options passed to cplus_demangle (in 2nd parameter). */
22:
23: #define DMGL_PARAMS (1 << 0) /* Include function args */
24: #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
25:
26: #define DMGL_AUTO (1 << 8)
27: #define DMGL_GNU (1 << 9)
28: #define DMGL_LUCID (1 << 10)
29: #define DMGL_CFRONT (1 << 11)
30: /* If none of these are set, use 'current_demangling_style' as the default. */
31: #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_CFRONT)
32:
33: /* Enumeration of possible demangling styles.
34:
35: Lucid and cfront styles are still kept logically distinct, even though
36: they now both behave identically. The resulting style is actual the
37: union of both. I.E. either style recognizes both "__pt__" and "__rf__"
38: for operator "->", even though the first is lucid style and the second
39: is cfront/ARM style. (FIXME?) */
40:
41: extern enum demangling_styles
42: {
43: unknown_demangling = 0,
44: auto_demangling = DMGL_AUTO,
45: gnu_demangling = DMGL_GNU,
46: lucid_demangling = DMGL_LUCID,
47: cfront_demangling = DMGL_CFRONT
48: } current_demangling_style;
49:
50: /* Define string names for the various demangling styles. */
51:
52: #define AUTO_DEMANGLING_STYLE_STRING "auto"
53: #define GNU_DEMANGLING_STYLE_STRING "gnu"
54: #define LUCID_DEMANGLING_STYLE_STRING "lucid"
55: #define CFRONT_DEMANGLING_STYLE_STRING "cfront"
56:
57: /* Some macros to test what demangling style is active. */
58:
59: #define CURRENT_DEMANGLING_STYLE current_demangling_style
60: #define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
61: #define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
62: #define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
63: #define CFRONT_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_CFRONT)
64:
65: extern char *
66: cplus_demangle PARAMS ((CONST char *mangled, int options));
67:
68: /* Note: This sets global state. FIXME if you care about multi-threading. */
69:
70: extern void
71: set_cplus_marker_for_demangling PARAMS ((int ch));
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.