diff options
author | Tom Tromey <tromey@adacore.com> | 2021-07-08 11:45:55 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-08-02 10:48:29 -0600 |
commit | 9698f7141065f5eaea44a17331b3f29ae712a79e (patch) | |
tree | 1682e3ac88d8901feaab0815899c56f7b3e312dc /gdb/printcmd.c | |
parent | ba8694b650b60c29126fd958575ffa1ca4f6c415 (diff) | |
download | gdb-9698f7141065f5eaea44a17331b3f29ae712a79e.zip gdb-9698f7141065f5eaea44a17331b3f29ae712a79e.tar.gz gdb-9698f7141065f5eaea44a17331b3f29ae712a79e.tar.bz2 |
Remove uses of fprintf_symbol_filtered
I believe that many calls to fprintf_symbol_filtered are incorrect.
In particular, there are some that pass a symbol's print name, like:
fprintf_symbol_filtered (gdb_stdout, sym->print_name (),
current_language->la_language, DMGL_ANSI);
fprintf_symbol_filtered uses the "demangle" global to decide whether
or not to demangle -- but print_name does this as well. This can lead
to double-demangling. Normally this could be innocuous, except I also
plan to change Ada demangling in a way that causes this to fail.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 416b87c..2fe3f4b 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1683,8 +1683,7 @@ info_address_command (const char *exp, int from_tty) } printf_filtered ("Symbol \""); - fprintf_symbol_filtered (gdb_stdout, sym->print_name (), - current_language->la_language, DMGL_ANSI); + fputs_filtered (sym->print_name (), gdb_stdout); printf_filtered ("\" is "); val = SYMBOL_VALUE (sym); if (SYMBOL_OBJFILE_OWNED (sym)) |