* utils.c (fputs_demangled, fprint_symbol): Remove.

* utils.c (fprintf_symbol_filtered):  New function which combines
	the functionality of fputs_demangled and fprint_symbol.  Uses a
	caller provided language parameter to select the appropriate
	demangler, and caller provided args to pass to the demangler.
	* defs.h (fputs_demangled, fprint_symbol):  Remove prototypes.
	* defs.h (fprintf_symbol_filtered):  Add prototype.
	* c-typeprint.c (cp_type_print_method_args):  Replace calls to
	fputs_demangled with call to fprintf_symbol_filtered.
	* cp-valprint.c (demangle.h):  Include
	* cp-valprint.c (cp_print_value_fields):  Replace calls to
	fprint_symbol with calls to fprintf_symbol_filtered.
	* printcmd.c (print_frame_args):  Replace call to fprint_symbol
	with call to fprintf_symbol_filtered.
	* stack.c (print_frame_info, frame_info):  Add language variable
	to pass to fprintf_symbol_demangled and initialize it from the
	symbol's language.  Replace calls to fputs_demangled with calls
	to fprintf_symbol_filtered.
	* symtab.c (find_methods):  Replace call to fputs_demangled with
	call to fprintf_symbol_filtered.
	**** start-sanitize-chill ****
	* ch-valprint.c (demangle.h):  Include.
	* ch-valprint.c (chill_print_value_fields):  Replace call to
	fprint_symbol with call to new fprintf_symbol_filtered.
	**** end-sanitize-chill ****
This commit is contained in:
Fred Fish
1993-03-11 19:27:51 +00:00
parent 4a3df10afd
commit 5e81259d23
6 changed files with 45 additions and 20 deletions

View File

@@ -25,6 +25,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "value.h"
#include "command.h"
#include "gdbcmd.h"
#include "demangle.h"
int vtblprint; /* Controls printing of vtbl's */
int objectprint; /* Controls looking up an object's derived type
@@ -259,14 +260,20 @@ cp_print_value_fields (type, valaddr, stream, format, recurse, pretty,
fputs_filtered ("\"( ptr \"", stream);
else
fputs_filtered ("\"( nodef \"", stream);
fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
language_cplus,
DMGL_PARAMS | DMGL_ANSI);
fputs_filtered ("\" \"", stream);
fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
language_cplus,
DMGL_PARAMS | DMGL_ANSI);
fputs_filtered ("\") \"", stream);
}
else
{
fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
language_cplus,
DMGL_PARAMS | DMGL_ANSI);
fputs_filtered (" = ", stream);
}
if (TYPE_FIELD_PACKED (type, i))