diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2019-01-09 12:57:16 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2019-01-09 12:58:05 -0500 |
commit | 041be52673949e5b6cc2b507e55a379a54ab8ee0 (patch) | |
tree | 28487576663e2d763a13474d865291eab823e036 /gdb/stabsread.c | |
parent | 0e2a21335b6fc4a5b6bed19d9623916c52918b72 (diff) | |
download | gdb-041be52673949e5b6cc2b507e55a379a54ab8ee0.zip gdb-041be52673949e5b6cc2b507e55a379a54ab8ee0.tar.gz gdb-041be52673949e5b6cc2b507e55a379a54ab8ee0.tar.bz2 |
gdb: Remove support for old mangling schemes
An upcoming sync with gcc's libiberty [1] will remove support for old
mangling schemes (GNU v2, Lucid, ARM, HP and EDG). It will remove the
cplus_demangle_opname function, so we need to get rid of its usages in
GDB (it's a GNU v2 specific function).
I think the changes are mostly relatively obvious, some hacks that were
necessary to support overloaded operators with GNU v2 mangling are not
needed anymore.
The change in stabsread.c is perhaps less obvious. I think we could get
rid of more code in that region that is specific to old mangling
schemes, but I chose to do only the minimal changes required to remove
the cplus_demangle_opname uses. There is also a detailed comment just
above that explaining how GNU v2 and v3 mangled symbols are handled, I
decided to leave it as-is, since I wasn't sure which part to remove,
change or leave there.
[1] The commit "Remove support for demangling GCC 2.x era mangling
schemes.", specifically.
gdb/ChangeLog:
* gdbtypes.c (check_stub_method_group): Remove handling of old
mangling schemes.
* linespec.c (find_methods): Likewise.
* stabsread.c (read_member_functions): Likewise.
* valops.c (search_struct_method): Likewise.
(value_struct_elt_for_reference): Likewise.
* NEWS: Mention this change.
gdb/testsuite/ChangeLog:
* gdb.cp/demangle.exp (test_gnu_style_demangling): Rename to...
(test_gnuv3_style_demangling): ... this.
(test_lucid_style_demangling): Remove.
(test_arm_style_demangling): Remove.
(test_hp_style_demangling): Remove.
(do_tests): Remove calls to the above.
gdb/doc/ChangeLog:
* gdb.texinfo (Print Settings): Remove mention of specific
demangle-style values, just refer to the in-process help.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 55c7623..8d2599f 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -2552,7 +2552,6 @@ read_member_functions (struct field_info *fip, const char **pp, } else { - int has_stub = 0; int has_destructor = 0, has_other = 0; int is_v3 = 0; struct next_fnfield *tmp_sublist; @@ -2616,8 +2615,6 @@ read_member_functions (struct field_info *fip, const char **pp, tmp_sublist = sublist; while (tmp_sublist != NULL) { - if (tmp_sublist->fn_field.is_stub) - has_stub = 1; if (tmp_sublist->fn_field.physname[0] == '_' && tmp_sublist->fn_field.physname[1] == 'Z') is_v3 = 1; @@ -2704,23 +2701,6 @@ read_member_functions (struct field_info *fip, const char **pp, "~", main_fn_name, (char *)NULL); xfree (main_fn_name); } - else if (!has_stub) - { - char dem_opname[256]; - int ret; - - ret = cplus_demangle_opname (new_fnlist->fn_fieldlist.name, - dem_opname, DMGL_ANSI); - if (!ret) - ret = cplus_demangle_opname (new_fnlist->fn_fieldlist.name, - dem_opname, 0); - if (ret) - new_fnlist->fn_fieldlist.name - = ((const char *) - obstack_copy0 (&objfile->objfile_obstack, dem_opname, - strlen (dem_opname))); - xfree (main_fn_name); - } new_fnlist->fn_fieldlist.fn_fields = OBSTACK_CALLOC (&objfile->objfile_obstack, length, fn_field); |