• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine 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

Revisiond412e69677c6ca145ea8f5ff8c61a22952cb0855 (tree)
Zeit2020-06-25 20:43:46
AutorRainer Orth <ro@CeBi...>
CommiterRainer Orth

Log Message

Move common handlers to sol2_init_abi

There's some overlap and duplication between 32 and 64-bit Solaris/SPARC
and x86 tdep files, in particular

sol2_core_pid_to_str

*_sol2_sigtramp_p

sol2_skip_solib_resolver
*_sol2_static_transform_name (forgotten on amd64)
set_gdbarch_sofun_address_maybe_missing (likewise)

This patch avoids this by centralizing common code in sol2-tdep.c.
While sparc_sol2_pc_in_sigtramp and sparc_sol2_static_transform_name
were declared in the shared sparc-tdep.h, they were only used in Solaris
files.

Tested on amd64-pc-solaris2.11, i386-pc-solaris2.11,
sparcv9-sun-solaris2.11, and sparc-sun-solaris2.11, and
sparc64-unknown-linux-gnu.

* amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
(amd64_sol2_init_abi): Use sol2_sigtramp_p.
Call sol2_init_abi.

Remove calls to set_gdbarch_skip_solib_resolver,

set_gdbarch_core_pid_to_str.
* i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
(i386_sol2_static_transform_name): Remove.
(i386_sol2_init_abi): Call sol2_init_abi.
Remove calls to set_gdbarch_sofun_address_maybe_missing,
set_gdbarch_static_transform_name,
set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
Use sol2_sigtramp_p.
* sol2-tdep.c (sol2_pc_in_sigtramp): New function.
(sol2_sigtramp_p): New function.
(sol2_static_transform_name): New function.
(sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
(sol2_init_abi): New function.
* sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
(sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
* sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
(sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
(sparc_sol2_static_transform_name): Remove.
(sparc32_sol2_init_abi): Call sol2_init_abi.
Remove calls to set_gdbarch_sofun_address_maybe_missing,
set_gdbarch_static_transform_name,
set_gdbarch_skip_solib_resolver,
set_gdbarch_core_pid_to_str.
* sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
(sparc_sol2_static_transform_name): Remove
* sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
call sol2_sigtramp_p.
(sparc64_sol2_init_abi): Call sol2_init_abi.
Remove calls to set_gdbarch_sofun_address_maybe_missing,
set_gdbarch_static_transform_name,
set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.

Ändern Zusammenfassung

Diff

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,41 @@
1+2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2+
3+ * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
4+ (amd64_sol2_init_abi): Use sol2_sigtramp_p.
5+ Call sol2_init_abi.
6+ Remove calls to set_gdbarch_skip_solib_resolver,
7+ set_gdbarch_core_pid_to_str.
8+ * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
9+ (i386_sol2_static_transform_name): Remove.
10+ (i386_sol2_init_abi): Call sol2_init_abi.
11+ Remove calls to set_gdbarch_sofun_address_maybe_missing,
12+ set_gdbarch_static_transform_name,
13+ set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
14+ Use sol2_sigtramp_p.
15+ * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
16+ (sol2_sigtramp_p): New function.
17+ (sol2_static_transform_name): New function.
18+ (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
19+ (sol2_init_abi): New function.
20+ * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
21+ (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
22+ * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
23+ (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
24+ (sparc_sol2_static_transform_name): Remove.
25+ (sparc32_sol2_init_abi): Call sol2_init_abi.
26+ Remove calls to set_gdbarch_sofun_address_maybe_missing,
27+ set_gdbarch_static_transform_name,
28+ set_gdbarch_skip_solib_resolver,
29+ set_gdbarch_core_pid_to_str.
30+ * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
31+ (sparc_sol2_static_transform_name): Remove
32+ * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
33+ call sol2_sigtramp_p.
34+ (sparc64_sol2_init_abi): Call sol2_init_abi.
35+ Remove calls to set_gdbarch_sofun_address_maybe_missing,
36+ set_gdbarch_static_transform_name,
37+ set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
38+
139 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
240
341 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
--- a/gdb/amd64-sol2-tdep.c
+++ b/gdb/amd64-sol2-tdep.c
@@ -63,21 +63,6 @@ static int amd64_sol2_gregset_reg_offset[] = {
6363 };
6464
6565
66-/* Return whether THIS_FRAME corresponds to a Solaris sigtramp
67- routine. */
68-
69-static int
70-amd64_sol2_sigtramp_p (struct frame_info *this_frame)
71-{
72- CORE_ADDR pc = get_frame_pc (this_frame);
73- const char *name;
74-
75- find_pc_partial_function (pc, &name, NULL, NULL);
76- return (name && (strcmp ("sigacthandler", name) == 0
77- || strcmp (name, "ucbsigvechandler") == 0
78- || strcmp (name, "__sighndlr") == 0));
79-}
80-
8166 /* Solaris doesn't have a 'struct sigcontext', but it does have a
8267 'mcontext_t' that contains the saved set of machine registers. */
8368
@@ -104,18 +89,16 @@ amd64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
10489 amd64_init_abi (info, gdbarch,
10590 amd64_target_description (X86_XSTATE_SSE_MASK, true));
10691
107- tdep->sigtramp_p = amd64_sol2_sigtramp_p;
92+ sol2_init_abi (info, gdbarch);
93+
94+ tdep->sigtramp_p = sol2_sigtramp_p;
10895 tdep->sigcontext_addr = amd64_sol2_mcontext_addr;
10996 tdep->sc_reg_offset = tdep->gregset_reg_offset;
11097 tdep->sc_num_regs = tdep->gregset_num_regs;
11198
11299 /* Solaris uses SVR4-style shared libraries. */
113- set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
114100 set_solib_svr4_fetch_link_map_offsets
115101 (gdbarch, svr4_lp64_fetch_link_map_offsets);
116-
117- /* How to print LWP PTIDs from core files. */
118- set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
119102 }
120103
121104 void _initialize_amd64_sol2_tdep ();
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -46,21 +46,6 @@ static int i386_sol2_gregset_reg_offset[] =
4646 0 * 4 /* %gs */
4747 };
4848
49-/* Return whether THIS_FRAME corresponds to a Solaris sigtramp
50- routine. */
51-
52-static int
53-i386_sol2_sigtramp_p (struct frame_info *this_frame)
54-{
55- CORE_ADDR pc = get_frame_pc (this_frame);
56- const char *name;
57-
58- find_pc_partial_function (pc, &name, NULL, NULL);
59- return (name && (strcmp ("sigacthandler", name) == 0
60- || strcmp (name, "ucbsigvechandler") == 0
61- || strcmp (name, "__sighndlr") == 0));
62-}
63-
6449 /* Solaris doesn't have a `struct sigcontext', but it does have a
6550 `mcontext_t' that contains the saved set of machine registers. */
6651
@@ -75,30 +60,6 @@ i386_sol2_mcontext_addr (struct frame_info *this_frame)
7560 return ucontext_addr + 36;
7661 }
7762
78-/* SunPRO encodes the static variables. This is not related to C++
79- mangling, it is done for C too. */
80-
81-static const char *
82-i386_sol2_static_transform_name (const char *name)
83-{
84- if (name[0] == '.')
85- {
86- const char *p;
87-
88- /* For file-local statics there will be a period, a bunch of
89- junk (the contents of which match a string given in the
90- N_OPT), a period and the name. For function-local statics
91- there will be a bunch of junk (which seems to change the
92- second character from 'A' to 'B'), a period, the name of the
93- function, and the name. So just skip everything before the
94- last period. */
95- p = strrchr (name, '.');
96- if (p != NULL)
97- name = p + 1;
98- }
99- return name;
100-}
101-
10263 /* Solaris 2. */
10364
10465 static void
@@ -109,12 +70,7 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
10970 /* Solaris is SVR4-based. */
11071 i386_svr4_init_abi (info, gdbarch);
11172
112- /* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
113- and for SunPRO 3.0, N_FUN symbols too. */
114- set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
115-
116- /* Handle SunPRO encoding of static symbols. */
117- set_gdbarch_static_transform_name (gdbarch, i386_sol2_static_transform_name);
73+ sol2_init_abi (info, gdbarch);
11874
11975 /* Solaris reserves space for its FPU emulator in `fpregset_t'.
12076 There is also some space reserved for the registers of a Weitek
@@ -125,18 +81,14 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
12581 tdep->sizeof_fpregset = 380;
12682
12783 /* Signal trampolines are slightly different from SVR4. */
128- tdep->sigtramp_p = i386_sol2_sigtramp_p;
84+ tdep->sigtramp_p = sol2_sigtramp_p;
12985 tdep->sigcontext_addr = i386_sol2_mcontext_addr;
13086 tdep->sc_reg_offset = tdep->gregset_reg_offset;
13187 tdep->sc_num_regs = tdep->gregset_num_regs;
13288
13389 /* Solaris has SVR4-style shared libraries. */
134- set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
13590 set_solib_svr4_fetch_link_map_offsets
13691 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
137-
138- /* How to print LWP PTIDs from core files. */
139- set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
14092 }
14193
14294
--- a/gdb/sol2-tdep.c
+++ b/gdb/sol2-tdep.c
@@ -25,7 +25,89 @@
2525
2626 #include "sol2-tdep.h"
2727
28-CORE_ADDR
28+/* The Solaris signal trampolines reside in libc. For normal signals,
29+ the function `sigacthandler' is used. This signal trampoline will
30+ call the signal handler using the System V calling convention,
31+ where the third argument is a pointer to an instance of
32+ `ucontext_t', which has a member `uc_mcontext' that contains the
33+ saved registers. Incidentally, the kernel passes the `ucontext_t'
34+ pointer as the third argument of the signal trampoline too, and
35+ `sigacthandler' simply passes it on. However, if you link your
36+ program with "-L/usr/ucblib -R/usr/ucblib -lucb", the function
37+ `ucbsigvechandler' will be used, which invokes the using the BSD
38+ convention, where the third argument is a pointer to an instance of
39+ `struct sigcontext'. It is the `ucbsigvechandler' function that
40+ converts the `ucontext_t' to a `sigcontext', and back. Unless the
41+ signal handler modifies the `struct sigcontext' we can safely
42+ ignore this. */
43+
44+static int
45+sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name)
46+{
47+ return (name && (strcmp (name, "sigacthandler") == 0
48+ || strcmp (name, "ucbsigvechandler") == 0
49+ || strcmp (name, "__sighndlr") == 0));
50+}
51+
52+/* Return whether THIS_FRAME corresponds to a Solaris sigtramp routine. */
53+
54+int
55+sol2_sigtramp_p (struct frame_info *this_frame)
56+{
57+ CORE_ADDR pc = get_frame_pc (this_frame);
58+ const char *name;
59+
60+ find_pc_partial_function (pc, &name, NULL, NULL);
61+ return sol2_pc_in_sigtramp (pc, name);
62+}
63+
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+
110+static CORE_ADDR
29111 sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
30112 {
31113 struct bound_minimal_symbol msym;
@@ -37,17 +119,15 @@ sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
37119 return 0;
38120 }
39121
40-/* This is how we want PTIDs from Solaris core files to be
41- printed. */
122+/* This is how we want PTIDs from Solaris core files to be printed. */
42123
43-std::string
124+static std::string
44125 sol2_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
45126 {
46127 struct inferior *inf;
47128 int pid;
48129
49- /* Check whether we're printing an LWP (gdb thread) or a
50- process. */
130+ /* Check whether we're printing an LWP (gdb thread) or a process. */
51131 pid = ptid.lwp ();
52132 if (pid != 0)
53133 {
@@ -56,8 +136,7 @@ sol2_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
56136 }
57137
58138 /* GDB didn't use to put a NT_PSTATUS note in Solaris cores. If
59- that's missing, then we're dealing with a fake PID corelow.c made
60- up. */
139+ that's missing, then we're dealing with a fake PID corelow.c made up. */
61140 inf = find_inferior_ptid (current_inferior ()->process_target (), ptid);
62141 if (inf == NULL || inf->fake_pid_p)
63142 return "<core>";
@@ -65,3 +144,24 @@ sol2_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
65144 /* Not fake; print as usual. */
66145 return normal_pid_to_str (ptid);
67146 }
147+
148+/* To be called from GDB_OSABI_SOLARIS handlers. */
149+
150+void
151+sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
152+{
153+ /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop, SunPRO)
154+ compiler puts out 0 instead of the address in N_SO stabs. Starting with
155+ SunPRO 3.0, the compiler does this for N_FUN stabs too. */
156+ set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
157+
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+
162+ /* Solaris uses SVR4-style shared libraries. */
163+ set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
164+
165+ /* How to print LWP PTIDs from core files. */
166+ set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
167+}
--- a/gdb/sol2-tdep.h
+++ b/gdb/sol2-tdep.h
@@ -22,8 +22,8 @@
2222
2323 struct gdbarch;
2424
25-CORE_ADDR sol2_skip_solib_resolver (struct gdbarch *, CORE_ADDR);
25+int sol2_sigtramp_p (struct frame_info *this_frame);
2626
27-std::string sol2_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid);
27+void sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
2828
2929 #endif /* sol2-tdep.h */
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -99,30 +99,6 @@ static const struct regset sparc32_sol2_fpregset =
9999 };
100100
101101
102-/* The Solaris signal trampolines reside in libc. For normal signals,
103- the function `sigacthandler' is used. This signal trampoline will
104- call the signal handler using the System V calling convention,
105- where the third argument is a pointer to an instance of
106- `ucontext_t', which has a member `uc_mcontext' that contains the
107- saved registers. Incidentally, the kernel passes the `ucontext_t'
108- pointer as the third argument of the signal trampoline too, and
109- `sigacthandler' simply passes it on. However, if you link your
110- program with "-L/usr/ucblib -R/usr/ucblib -lucb", the function
111- `ucbsigvechandler' will be used, which invokes the using the BSD
112- convention, where the third argument is a pointer to an instance of
113- `struct sigcontext'. It is the `ucbsigvechandler' function that
114- converts the `ucontext_t' to a `sigcontext', and back. Unless the
115- signal handler modifies the `struct sigcontext' we can safely
116- ignore this. */
117-
118-int
119-sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name)
120-{
121- return (name && (strcmp (name, "sigacthandler") == 0
122- || strcmp (name, "ucbsigvechandler") == 0
123- || strcmp (name, "__sighndlr") == 0));
124-}
125-
126102 static struct sparc_frame_cache *
127103 sparc32_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
128104 void **this_cache)
@@ -201,14 +177,7 @@ sparc32_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self,
201177 struct frame_info *this_frame,
202178 void **this_cache)
203179 {
204- CORE_ADDR pc = get_frame_pc (this_frame);
205- const char *name;
206-
207- find_pc_partial_function (pc, &name, NULL, NULL);
208- if (sparc_sol2_pc_in_sigtramp (pc, name))
209- return 1;
210-
211- return 0;
180+ return sol2_sigtramp_p (this_frame);
212181 }
213182
214183 static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind =
@@ -221,36 +190,6 @@ static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind =
221190 sparc32_sol2_sigtramp_frame_sniffer
222191 };
223192
224-/* Unglobalize NAME. */
225-
226-const char *
227-sparc_sol2_static_transform_name (const char *name)
228-{
229- /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
230- SunPRO) convert file static variables into global values, a
231- process known as globalization. In order to do this, the
232- compiler will create a unique prefix and prepend it to each file
233- static variable. For static variables within a function, this
234- globalization prefix is followed by the function name (nested
235- static variables within a function are supposed to generate a
236- warning message, and are left alone). The procedure is
237- documented in the Stabs Interface Manual, which is distributed
238- with the compilers, although version 4.0 of the manual seems to
239- be incorrect in some places, at least for SPARC. The
240- globalization prefix is encoded into an N_OPT stab, with the form
241- "G=<prefix>". The globalization prefix always seems to start
242- with a dollar sign '$'; a dot '.' is used as a separator. So we
243- simply strip everything up until the last dot. */
244-
245- if (name[0] == '$')
246- {
247- const char *p = strrchr (name, '.');
248- if (p)
249- return p + 1;
250- }
251-
252- return name;
253-}
254193
255194
256195 void
@@ -264,19 +203,10 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
264203 tdep->fpregset = &sparc32_sol2_fpregset;
265204 tdep->sizeof_fpregset = 400;
266205
267- /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop, SunPRO)
268- compiler puts out 0 instead of the address in N_SO stabs. Starting with
269- SunPRO 3.0, the compiler does this for N_FUN stabs too. */
270- set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
271-
272- /* The Sun compilers also do "globalization"; see the comment in
273- sparc_sol2_static_transform_name for more information. */
274- set_gdbarch_static_transform_name
275- (gdbarch, sparc_sol2_static_transform_name);
206+ sol2_init_abi (info, gdbarch);
276207
277208 /* Solaris has SVR4-style shared libraries... */
278209 set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
279- set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
280210 set_solib_svr4_fetch_link_map_offsets
281211 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
282212
@@ -288,9 +218,6 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
288218 set_gdbarch_software_single_step (gdbarch, NULL);
289219
290220 frame_unwind_append_unwinder (gdbarch, &sparc32_sol2_sigtramp_frame_unwind);
291-
292- /* How to print LWP PTIDs from core files. */
293- set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
294221 }
295222
296223 void _initialize_sparc_sol2_tdep ();
--- a/gdb/sparc-tdep.h
+++ b/gdb/sparc-tdep.h
@@ -245,10 +245,6 @@ extern int sparc_is_annulled_branch_insn (CORE_ADDR pc);
245245 extern const struct sparc_gregmap sparc32_sol2_gregmap;
246246 extern const struct sparc_fpregmap sparc32_sol2_fpregmap;
247247
248-extern int sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name);
249-
250-extern const char *sparc_sol2_static_transform_name (const char *name);
251-
252248 extern void sparc32_sol2_init_abi (struct gdbarch_info info,
253249 struct gdbarch *gdbarch);
254250
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -180,15 +180,9 @@ sparc64_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self,
180180 struct frame_info *this_frame,
181181 void **this_cache)
182182 {
183- CORE_ADDR pc = get_frame_pc (this_frame);
184- const char *name;
185-
186- find_pc_partial_function (pc, &name, NULL, NULL);
187- if (sparc_sol2_pc_in_sigtramp (pc, name))
188- return 1;
189-
190- return 0;
183+ return sol2_sigtramp_p (this_frame);
191184 }
185+
192186 static const struct frame_unwind sparc64_sol2_sigtramp_frame_unwind =
193187 {
194188 SIGTRAMP_FRAME,
@@ -216,19 +210,10 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
216210
217211 sparc64_init_abi (info, gdbarch);
218212
219- /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop, SunPRO)
220- compiler puts out 0 instead of the address in N_SO stabs. Starting with
221- SunPRO 3.0, the compiler does this for N_FUN stabs too. */
222- set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
223-
224- /* The Sun compilers also do "globalization"; see the comment in
225- sparc_sol2_static_transform_name for more information. */
226- set_gdbarch_static_transform_name
227- (gdbarch, sparc_sol2_static_transform_name);
213+ sol2_init_abi (info, gdbarch);
228214
229215 /* Solaris has SVR4-style shared libraries... */
230216 set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
231- set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
232217 set_solib_svr4_fetch_link_map_offsets
233218 (gdbarch, svr4_lp64_fetch_link_map_offsets);
234219
@@ -238,9 +223,6 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
238223
239224 /* Solaris has kernel-assisted single-stepping support. */
240225 set_gdbarch_software_single_step (gdbarch, NULL);
241-
242- /* How to print LWP PTIDs from core files. */
243- set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
244226 }
245227
246228 void _initialize_sparc64_sol2_tdep ();