aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-29 13:51:13 -0600
committerTom Tromey <tom@tromey.com>2023-03-31 08:55:55 -0600
commit9497d69fc0eeca8682cc09360fb822ced6b4670f (patch)
treeddefa0ba7514d91b246dfcf521900c802b95fe50 /gdb/utils.c
parent6f214d0f399847b13f979651c3b46befcbb42140 (diff)
downloadgdb-9497d69fc0eeca8682cc09360fb822ced6b4670f.zip
gdb-9497d69fc0eeca8682cc09360fb822ced6b4670f.tar.gz
gdb-9497d69fc0eeca8682cc09360fb822ced6b4670f.tar.bz2
Remove language_demangle
I noticed that language_demangle shadows the global "current_language". When I went to fix this, though, I then saw that language_demangle is only called in two places, and has a comment saying it should be removed. This patch removes it. Note that the NULL check in language_demangle is not needed by either of the existing callers. Regression tested on x86-64 Fedora 36. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 4c7d665..6ec1cc0 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1909,7 +1909,7 @@ fprintf_symbol (struct ui_file *stream, const char *name,
else
{
gdb::unique_xmalloc_ptr<char> demangled
- = language_demangle (language_def (lang), name, arg_mode);
+ = language_def (lang)->demangle_symbol (name, arg_mode);
gdb_puts (demangled ? demangled.get () : name, stream);
}
}