mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
gdb: Rename language_defn::demangle
GDB already has a global symbol `demangle` (a boolean), having a language method called `demangle` is not a good idea as we often want to reference `demangle` the control variable inside `demangle` the member function. This commit renames `demangle` the member function to `demangle_symbol`. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language::demangle): Rename to... (ada_language::demangle_symbol): ...this. * c-lang.c (cplus_language::demangle): Rename to... (cplus_language::demangle_symbol): ...this. * d-lang.c (d_language::demangle): Rename to... (d_language::demangle_symbol): ...this. * f-lang.c (f_language::demangle): Rename to... (f_language::demangle_symbol): ...this. * go-lang.c (go_language::demangle): Rename to... (go_language::demangle_symbol): ...this. * language.c (language_demangle): Update call to demangle_symbol. (auto_or_unknown_language::demangle): Rename to... (auto_or_unknown_language::demangle_symbol): ...this. * language.h (language_defn::demangle): Rename to... (language_defn::demangle_symbol): ...this. * objc-lang.c (objc_language::demangle): Rename to... (objc_language::demangle_symbol): ...this. * rust-lang.c (rust_language::demangle): Rename to... (rust_language::demangle_symbol): ...this.
This commit is contained in:
parent
4b2f86ef2a
commit
5399db93c5
@ -1,3 +1,25 @@
|
||||
2020-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* ada-lang.c (ada_language::demangle): Rename to...
|
||||
(ada_language::demangle_symbol): ...this.
|
||||
* c-lang.c (cplus_language::demangle): Rename to...
|
||||
(cplus_language::demangle_symbol): ...this.
|
||||
* d-lang.c (d_language::demangle): Rename to...
|
||||
(d_language::demangle_symbol): ...this.
|
||||
* f-lang.c (f_language::demangle): Rename to...
|
||||
(f_language::demangle_symbol): ...this.
|
||||
* go-lang.c (go_language::demangle): Rename to...
|
||||
(go_language::demangle_symbol): ...this.
|
||||
* language.c (language_demangle): Update call to demangle_symbol.
|
||||
(auto_or_unknown_language::demangle): Rename to...
|
||||
(auto_or_unknown_language::demangle_symbol): ...this.
|
||||
* language.h (language_defn::demangle): Rename to...
|
||||
(language_defn::demangle_symbol): ...this.
|
||||
* objc-lang.c (objc_language::demangle): Rename to...
|
||||
(objc_language::demangle_symbol): ...this.
|
||||
* rust-lang.c (rust_language::demangle): Rename to...
|
||||
(rust_language::demangle_symbol): ...this.
|
||||
|
||||
2020-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* language.h (LA_ITERATE_OVER_SYMBOLS): Delete.
|
||||
|
@ -13869,7 +13869,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
return ada_la_decode (mangled, options);
|
||||
}
|
||||
|
@ -1120,7 +1120,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
return gdb_demangle (mangled, options);
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
return d_demangle (mangled, options);
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
/* We could support demangling here to provide module namespaces
|
||||
also for inferiors with only minimal symbol table (ELF symbols).
|
||||
|
@ -586,7 +586,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
return go_demangle (mangled, options);
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ language_demangle (const struct language_defn *current_language,
|
||||
const char *mangled, int options)
|
||||
{
|
||||
if (current_language != NULL)
|
||||
return current_language->demangle (mangled, options);
|
||||
return current_language->demangle_symbol (mangled, options);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -815,7 +815,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
/* The auto language just uses the C++ demangler. */
|
||||
return gdb_demangle (mangled, options);
|
||||
|
@ -328,7 +328,7 @@ struct language_defn
|
||||
}
|
||||
|
||||
/* Return demangled language symbol version of MANGLED, or NULL. */
|
||||
virtual char *demangle (const char *mangled, int options) const
|
||||
virtual char *demangle_symbol (const char *mangled, int options) const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
return objc_demangle (mangled, options);
|
||||
}
|
||||
|
@ -1972,7 +1972,7 @@ public:
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
char *demangle (const char *mangled, int options) const override
|
||||
char *demangle_symbol (const char *mangled, int options) const override
|
||||
{
|
||||
return gdb_demangle (mangled, options);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user