• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisiónbb6e55f3ee440c5d03fd47ec32255c20b9f895fe (tree)
Tiempo2020-06-26 00:56:12
AutorRainer Orth <ro@CeBi...>
CommiterRainer Orth

Log Message

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.

Cambiar Resumen

Diferencia incremental

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,22 @@
11 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22
3+ * sol2-tdep.c (sol2_static_transform_name): Remove.
4+ (sol2_init_abi): Don't register it.
5+ * gdbarch.sh (static_transform_name): Remove.
6+ * gdbarch.c, gdbarch.h: Regenerate.
7+
8+ * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
9+ gdbarch_static_transform_name.
10+ * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
11+ * stabsread.c (define_symbol) <'X'>: Remove.
12+ (define_symbol) <'S'>: Remove gdbarch_static_transform_name
13+ handling.
14+ <'V'>: Likewise.
15+ * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
16+ <'S'>: Remove call to gdbarch_static_transform_name.
17+
18+2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19+
320 * procfs.c (procfs_pre_trace): New function.
421 (procfs_target::create_inferior): Pass it to fork_inferior.
522
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1460,9 +1460,6 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
14601460 switch (p[1])
14611461 {
14621462 case 'S':
1463- if (gdbarch_static_transform_name_p (gdbarch))
1464- gdbarch_static_transform_name (gdbarch, namestring);
1465-
14661463 add_psymbol_to_list (gdb::string_view (sym_name, sym_len), true,
14671464 VAR_DOMAIN, LOC_STATIC,
14681465 data_sect_index,
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -292,7 +292,6 @@ struct gdbarch
292292 gdbarch_relocate_instruction_ftype *relocate_instruction;
293293 gdbarch_overlay_update_ftype *overlay_update;
294294 gdbarch_core_read_description_ftype *core_read_description;
295- gdbarch_static_transform_name_ftype *static_transform_name;
296295 int sofun_address_maybe_missing;
297296 gdbarch_process_record_ftype *process_record;
298297 gdbarch_process_record_signal_ftype *process_record_signal;
@@ -658,7 +657,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
658657 /* Skip verify of relocate_instruction, has predicate. */
659658 /* Skip verify of overlay_update, has predicate. */
660659 /* Skip verify of core_read_description, has predicate. */
661- /* Skip verify of static_transform_name, has predicate. */
662660 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
663661 /* Skip verify of process_record, has predicate. */
664662 /* Skip verify of process_record_signal, has predicate. */
@@ -1437,12 +1435,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
14371435 "gdbarch_dump: stap_register_suffixes = %s\n",
14381436 pstring_list (gdbarch->stap_register_suffixes));
14391437 fprintf_unfiltered (file,
1440- "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1441- gdbarch_static_transform_name_p (gdbarch));
1442- fprintf_unfiltered (file,
1443- "gdbarch_dump: static_transform_name = <%s>\n",
1444- host_address_to_string (gdbarch->static_transform_name));
1445- fprintf_unfiltered (file,
14461438 "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
14471439 host_address_to_string (gdbarch->sw_breakpoint_from_kind));
14481440 fprintf_unfiltered (file,
@@ -4076,30 +4068,6 @@ set_gdbarch_core_read_description (struct gdbarch *gdbarch,
40764068 }
40774069
40784070 int
4079-gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
4080-{
4081- gdb_assert (gdbarch != NULL);
4082- return gdbarch->static_transform_name != NULL;
4083-}
4084-
4085-const char *
4086-gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
4087-{
4088- gdb_assert (gdbarch != NULL);
4089- gdb_assert (gdbarch->static_transform_name != NULL);
4090- if (gdbarch_debug >= 2)
4091- fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
4092- return gdbarch->static_transform_name (name);
4093-}
4094-
4095-void
4096-set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
4097- gdbarch_static_transform_name_ftype static_transform_name)
4098-{
4099- gdbarch->static_transform_name = static_transform_name;
4100-}
4101-
4102-int
41034071 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
41044072 {
41054073 gdb_assert (gdbarch != NULL);
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1112,14 +1112,6 @@ typedef const struct target_desc * (gdbarch_core_read_description_ftype) (struct
11121112 extern const struct target_desc * gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd);
11131113 extern void set_gdbarch_core_read_description (struct gdbarch *gdbarch, gdbarch_core_read_description_ftype *core_read_description);
11141114
1115-/* Handle special encoding of static variables in stabs debug info. */
1116-
1117-extern int gdbarch_static_transform_name_p (struct gdbarch *gdbarch);
1118-
1119-typedef const char * (gdbarch_static_transform_name_ftype) (const char *name);
1120-extern const char * gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name);
1121-extern void set_gdbarch_static_transform_name (struct gdbarch *gdbarch, gdbarch_static_transform_name_ftype *static_transform_name);
1122-
11231115 /* Set if the address in N_SO or N_FUN stabs may be zero. */
11241116
11251117 extern int gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch);
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -842,8 +842,6 @@ F;void;overlay_update;struct obj_section *osect;osect
842842
843843 M;const struct target_desc *;core_read_description;struct target_ops *target, bfd *abfd;target, abfd
844844
845-# Handle special encoding of static variables in stabs debug info.
846-F;const char *;static_transform_name;const char *name;name
847845 # Set if the address in N_SO or N_FUN stabs may be zero.
848846 v;int;sofun_address_maybe_missing;;;0;0;;0
849847
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -3029,10 +3029,6 @@ parse_partial_symbols (minimal_symbol_reader &reader,
30293029 switch (p[1])
30303030 {
30313031 case 'S':
3032- if (gdbarch_static_transform_name_p (gdbarch))
3033- namestring = gdbarch_static_transform_name
3034- (gdbarch, namestring);
3035-
30363032 add_psymbol_to_list (gdb::string_view (namestring,
30373033 p - namestring),
30383034 true, VAR_DOMAIN, LOC_STATIC,
--- a/gdb/sol2-tdep.c
+++ b/gdb/sol2-tdep.c
@@ -61,52 +61,6 @@ sol2_sigtramp_p (struct frame_info *this_frame)
6161 return sol2_pc_in_sigtramp (pc, name);
6262 }
6363
64-/* Unglobalize NAME. */
65-
66-static const char *
67-sol2_static_transform_name (const char *name)
68-{
69- /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
70- SunPRO) convert file static variables into global values, a
71- process known as globalization. In order to do this, the
72- compiler will create a unique prefix and prepend it to each file
73- static variable. For static variables within a function, this
74- globalization prefix is followed by the function name (nested
75- static variables within a function are supposed to generate a
76- warning message, and are left alone). The procedure is
77- documented in the Stabs Interface Manual, which is distributed
78- with the compilers, although version 4.0 of the manual seems to
79- be incorrect in some places, at least for SPARC. The
80- globalization prefix is encoded into an N_OPT stab, with the form
81- "G=<prefix>". The globalization prefix always seems to start
82- with a dollar sign '$' (sparc) resp. a dot '.' (x86); a dot '.'
83- is used as a separator. So we simply strip everything up until
84- the last dot. */
85- int prefix;
86-
87- switch (gdbarch_bfd_arch_info (target_gdbarch ())->arch)
88- {
89- case bfd_arch_i386:
90- prefix = '.';
91- break;
92- case bfd_arch_sparc:
93- prefix = '$';
94- break;
95- default:
96- internal_error (__FILE__, __LINE__, "Unexpected arch");
97- break;
98- }
99-
100- if (name[0] == prefix)
101- {
102- const char *p = strrchr (name, '.');
103- if (p)
104- return p + 1;
105- }
106-
107- return name;
108-}
109-
11064 static CORE_ADDR
11165 sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
11266 {
@@ -155,10 +109,6 @@ sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
155109 SunPRO 3.0, the compiler does this for N_FUN stabs too. */
156110 set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
157111
158- /* The Sun compilers also do "globalization"; see the comment in
159- sol2_static_transform_name for more information. */
160- set_gdbarch_static_transform_name (gdbarch, sol2_static_transform_name);
161-
162112 /* Solaris uses SVR4-style shared libraries. */
163113 set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
164114
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -723,12 +723,6 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
723723 /* This was an anonymous type that was never fixed up. */
724724 goto normal;
725725
726- case 'X':
727- /* SunPRO (3.0 at least) static variable encoding. */
728- if (gdbarch_static_transform_name_p (gdbarch))
729- goto normal;
730- /* fall through */
731-
732726 default:
733727 complaint (_("Unknown C++ symbol name `%s'"),
734728 string);
@@ -1186,23 +1180,6 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
11861180 SYMBOL_TYPE (sym) = read_type (&p, objfile);
11871181 SYMBOL_ACLASS_INDEX (sym) = LOC_STATIC;
11881182 SET_SYMBOL_VALUE_ADDRESS (sym, valu);
1189- if (gdbarch_static_transform_name_p (gdbarch)
1190- && gdbarch_static_transform_name (gdbarch, sym->linkage_name ())
1191- != sym->linkage_name ())
1192- {
1193- struct bound_minimal_symbol msym;
1194-
1195- msym = lookup_minimal_symbol (sym->linkage_name (), NULL, objfile);
1196- if (msym.minsym != NULL)
1197- {
1198- const char *new_name = gdbarch_static_transform_name
1199- (gdbarch, sym->linkage_name ());
1200-
1201- sym->set_linkage_name (new_name);
1202- SET_SYMBOL_VALUE_ADDRESS (sym,
1203- BMSYMBOL_VALUE_ADDRESS (msym));
1204- }
1205- }
12061183 SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
12071184 add_symbol_to_list (sym, get_file_symbols ());
12081185 break;
@@ -1367,24 +1344,8 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
13671344 SYMBOL_TYPE (sym) = read_type (&p, objfile);
13681345 SYMBOL_ACLASS_INDEX (sym) = LOC_STATIC;
13691346 SET_SYMBOL_VALUE_ADDRESS (sym, valu);
1370- if (gdbarch_static_transform_name_p (gdbarch)
1371- && gdbarch_static_transform_name (gdbarch, sym->linkage_name ())
1372- != sym->linkage_name ())
1373- {
1374- struct bound_minimal_symbol msym;
1375-
1376- msym = lookup_minimal_symbol (sym->linkage_name (), NULL, objfile);
1377- if (msym.minsym != NULL)
1378- {
1379- const char *new_name = gdbarch_static_transform_name
1380- (gdbarch, sym->linkage_name ());
1381-
1382- sym->set_linkage_name (new_name);
1383- SET_SYMBOL_VALUE_ADDRESS (sym, BMSYMBOL_VALUE_ADDRESS (msym));
1384- }
1385- }
13861347 SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
1387- add_symbol_to_list (sym, get_local_symbols ());
1348+ add_symbol_to_list (sym, get_local_symbols ());
13881349 break;
13891350
13901351 case 'v':
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2114,7 +2114,6 @@ static void
21142114 scan_xcoff_symtab (minimal_symbol_reader &reader,
21152115 struct objfile *objfile)
21162116 {
2117- struct gdbarch *gdbarch = objfile->arch ();
21182117 CORE_ADDR toc_offset = 0; /* toc offset value in data section. */
21192118 const char *filestring = NULL;
21202119
@@ -2577,10 +2576,6 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
25772576 switch (p[1])
25782577 {
25792578 case 'S':
2580- if (gdbarch_static_transform_name_p (gdbarch))
2581- namestring = gdbarch_static_transform_name
2582- (gdbarch, namestring);
2583-
25842579 add_psymbol_to_list (gdb::string_view (namestring,
25852580 p - namestring),
25862581 true, VAR_DOMAIN, LOC_STATIC,