diff options
author | John Gilmore <gnu@cygnus> | 1993-04-15 09:41:59 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1993-04-15 09:41:59 +0000 |
commit | 65ce5df44f4afe44894bca3064a7aa685b7d6039 (patch) | |
tree | 025e54c0d6c6770cbaaadf3ed029bd079eedb183 /gdb/utils.c | |
parent | 4d7f562d49fb955a55771b2ca09e8952ab5f8ada (diff) | |
download | gdb-65ce5df44f4afe44894bca3064a7aa685b7d6039.zip gdb-65ce5df44f4afe44894bca3064a7aa685b7d6039.tar.gz gdb-65ce5df44f4afe44894bca3064a7aa685b7d6039.tar.bz2 |
* dbxread.c (unknown_symchar_complaint): Add new complaint.
* stabsread.c: Declare it.
* partial-stab.h: Use it.
* utils.c (malloc_botch): Don't forward-declare if NO_MMALLOC.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 111 |
1 files changed, 38 insertions, 73 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 895a62a..b69b214 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -38,12 +38,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Prototypes for local functions */ -#if !defined (NO_MALLOC_CHECK) +#if defined (NO_MMALLOC) || defined (NO_MMALLOC_CHECK) +#else static void malloc_botch PARAMS ((void)); -#endif /* NO_MALLOC_CHECK */ +#endif /* NO_MMALLOC, etc */ static void fatal_dump_core (); /* Can't prototype with <varargs.h> usage... */ @@ -1135,53 +1136,6 @@ fputs_filtered (linebuffer, stream) } } - -/* fputs_demangled attempts to demangle NAME, a symbol in language LANG, using - demangling args ARG_MODE, and print it filtered to STREAM. If the name is - not mangled, or the language for the name is unknown, or demangling is off, - the name is printed in its "raw" form. */ - -void -fputs_demangled (name, stream, arg_mode, lang) - char *name; - FILE *stream; - int arg_mode; - enum language lang; -{ - char *demangled; - - if (name != NULL) - { - /* If user wants to see raw output, no problem. */ - if (!demangle) - { - fputs_filtered (name, stream); - } - else - { - switch (lang) - { - case language_cplus: - demangled = cplus_demangle (name, arg_mode); - break; - /* start-sanitize-chill */ - case language_chill: - demangled = chill_demangle (name); - break; - /* end-sanitize-chill */ - default: - demangled = NULL; - break; - } - fputs_filtered (demangled ? demangled : name, stream); - if (demangled != NULL) - { - free (demangled); - } - } - } -} - /* Print a variable number of ARGS using format FORMAT. If this information is going to put the amount written (since the last call to REINITIALIZE_MORE_FILTER or the last page break) over the page size, @@ -1366,38 +1320,49 @@ print_spaces_filtered (n, stream) /* C++ demangler stuff. */ -/* Print NAME on STREAM, demangling if necessary. */ +/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language + LANG, using demangling args ARG_MODE, and print it filtered to STREAM. + If the name is not mangled, or the language for the name is unknown, or + demangling is off, the name is printed in its "raw" form. */ + void -fprint_symbol (stream, name) +fprintf_symbol_filtered (stream, name, lang, arg_mode) FILE *stream; char *name; + enum language lang; + int arg_mode; { - char *demangled = NULL; + char *demangled; - if (demangle) + if (name != NULL) { - /* Lacking a better method of knowing what demangler to use, pick - one appropriate for whatever the current language is. (FIXME) */ - switch (current_language -> la_language) + /* If user wants to see raw output, no problem. */ + if (!demangle) { - case language_cplus: - demangled = cplus_demangle (name, DMGL_PARAMS | DMGL_ANSI); - break; - /* start-sanitize-chill */ - case language_chill: - demangled = chill_demangle (name); - break; - /* end-sanitize-chill */ + fputs_filtered (name, stream); + } + else + { + switch (lang) + { + case language_cplus: + demangled = cplus_demangle (name, arg_mode); + break; + /* start-sanitize-chill */ + case language_chill: + demangled = chill_demangle (name); + break; + /* end-sanitize-chill */ + default: + demangled = NULL; + break; + } + fputs_filtered (demangled ? demangled : name, stream); + if (demangled != NULL) + { + free (demangled); + } } - } - if (demangled == NULL) - { - fputs_filtered (name, stream); - } - else - { - fputs_filtered (demangled, stream); - free (demangled); } } |