aboutsummaryrefslogtreecommitdiff
path: root/gdb/sol2-tdep.c
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2020-06-25 17:56:12 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2020-06-25 17:56:12 +0200
commitbb6e55f3ee440c5d03fd47ec32255c20b9f895fe (patch)
treee0aef8743d1f7912df194ef9e4806aeceb42778a /gdb/sol2-tdep.c
parentc6d3683661a7623a306667915abba4d4695616d7 (diff)
downloadgdb-bb6e55f3ee440c5d03fd47ec32255c20b9f895fe.zip
gdb-bb6e55f3ee440c5d03fd47ec32255c20b9f895fe.tar.gz
gdb-bb6e55f3ee440c5d03fd47ec32255c20b9f895fe.tar.bz2
Remove obsolete gdbarch_static_transform_name
gdbarch_static_transform_name is completely Solaris-specific or rather specific to the Studio compilers. Studio cc has deprecated Stabs support in the 12.4 release back in 2015, GCC has defaulted to DWARF-2 on Solaris 7+ since 2004 and Stabs themselves are pretty much obsolete, so the whole code can go. Tested on sparcv9-sun-solaris2.11 and x86_64-pc-linux-gnu with --enable-targets=all. * sol2-tdep.c (sol2_static_transform_name): Remove. (sol2_init_abi): Don't register it. * gdbarch.sh (static_transform_name): Remove. * gdbarch.c, gdbarch.h: Regenerate. * dbxread.c (read_dbx_symtab) <'S'>: Remove call to gdbarch_static_transform_name. * mdebugread.c (parse_partial_symbols) <'S'>: Likewise. * stabsread.c (define_symbol) <'X'>: Remove. (define_symbol) <'S'>: Remove gdbarch_static_transform_name handling. <'V'>: Likewise. * xcoffread.c (scan_xcoff_symtab): Remove gdbarch. <'S'>: Remove call to gdbarch_static_transform_name.
Diffstat (limited to 'gdb/sol2-tdep.c')
-rw-r--r--gdb/sol2-tdep.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/gdb/sol2-tdep.c b/gdb/sol2-tdep.c
index 179c8ae..ce0f35d 100644
--- a/gdb/sol2-tdep.c
+++ b/gdb/sol2-tdep.c
@@ -61,52 +61,6 @@ sol2_sigtramp_p (struct frame_info *this_frame)
return sol2_pc_in_sigtramp (pc, name);
}
-/* Unglobalize NAME. */
-
-static const char *
-sol2_static_transform_name (const char *name)
-{
- /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
- SunPRO) convert file static variables into global values, a
- process known as globalization. In order to do this, the
- compiler will create a unique prefix and prepend it to each file
- static variable. For static variables within a function, this
- globalization prefix is followed by the function name (nested
- static variables within a function are supposed to generate a
- warning message, and are left alone). The procedure is
- documented in the Stabs Interface Manual, which is distributed
- with the compilers, although version 4.0 of the manual seems to
- be incorrect in some places, at least for SPARC. The
- globalization prefix is encoded into an N_OPT stab, with the form
- "G=<prefix>". The globalization prefix always seems to start
- with a dollar sign '$' (sparc) resp. a dot '.' (x86); a dot '.'
- is used as a separator. So we simply strip everything up until
- the last dot. */
- int prefix;
-
- switch (gdbarch_bfd_arch_info (target_gdbarch ())->arch)
- {
- case bfd_arch_i386:
- prefix = '.';
- break;
- case bfd_arch_sparc:
- prefix = '$';
- break;
- default:
- internal_error (__FILE__, __LINE__, "Unexpected arch");
- break;
- }
-
- if (name[0] == prefix)
- {
- const char *p = strrchr (name, '.');
- if (p)
- return p + 1;
- }
-
- return name;
-}
-
static CORE_ADDR
sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
@@ -155,10 +109,6 @@ sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
SunPRO 3.0, the compiler does this for N_FUN stabs too. */
set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
- /* The Sun compilers also do "globalization"; see the comment in
- sol2_static_transform_name for more information. */
- set_gdbarch_static_transform_name (gdbarch, sol2_static_transform_name);
-
/* Solaris uses SVR4-style shared libraries. */
set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);