diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-09-19 20:38:11 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-10-23 10:57:14 +0100 |
commit | 5399db93c53472a9b41ce6c8df00791b1ca31247 (patch) | |
tree | 5b98feb4eaf80be9a004429171038fa4dab208bf /gdb | |
parent | 4b2f86ef2a3962fdf86b9b0f266ce7180a43a6c8 (diff) | |
download | gdb-5399db93c53472a9b41ce6c8df00791b1ca31247.zip gdb-5399db93c53472a9b41ce6c8df00791b1ca31247.tar.gz gdb-5399db93c53472a9b41ce6c8df00791b1ca31247.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 22 | ||||
-rw-r--r-- | gdb/ada-lang.c | 2 | ||||
-rw-r--r-- | gdb/c-lang.c | 2 | ||||
-rw-r--r-- | gdb/d-lang.c | 2 | ||||
-rw-r--r-- | gdb/f-lang.c | 2 | ||||
-rw-r--r-- | gdb/go-lang.c | 2 | ||||
-rw-r--r-- | gdb/language.c | 4 | ||||
-rw-r--r-- | gdb/language.h | 2 | ||||
-rw-r--r-- | gdb/objc-lang.c | 2 | ||||
-rw-r--r-- | gdb/rust-lang.c | 2 |
10 files changed, 32 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index daa228d..1a4a03c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,27 @@ 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. (iterate_over_file_blocks): Replace use of macro with the macros definition. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 3a74de1..0a5b93f 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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); } diff --git a/gdb/c-lang.c b/gdb/c-lang.c index 4e94243..329986c 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -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); } diff --git a/gdb/d-lang.c b/gdb/d-lang.c index f9f1a66..2537f04 100644 --- a/gdb/d-lang.c +++ b/gdb/d-lang.c @@ -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); } diff --git a/gdb/f-lang.c b/gdb/f-lang.c index f7c54b4..9089166 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -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). diff --git a/gdb/go-lang.c b/gdb/go-lang.c index 0322961..01cd3a47 100644 --- a/gdb/go-lang.c +++ b/gdb/go-lang.c @@ -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); } diff --git a/gdb/language.c b/gdb/language.c index 4053cb7..fe09378 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -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); diff --git a/gdb/language.h b/gdb/language.h index 9d64a4a..106d766 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -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; } diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 009b7a7..1675146 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -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); } diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 86e7289..5edf4aa 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -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); } |