GDB (xrefs)

/tmp/gdb-8.1/gdb/sparc-linux-tdep.c
Go to the documentation of this file.
1 /* Target-dependent code for GNU/Linux SPARC.
2
3 Copyright (C) 2003-2018 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #include "defs.h"
21 #include "dwarf2-frame.h"
22 #include "frame.h"
23 #include "frame-unwind.h"
24 #include "gdbtypes.h"
25 #include "regset.h"
26 #include "gdbarch.h"
27 #include "gdbcore.h"
28 #include "osabi.h"
29 #include "regcache.h"
30 #include "solib-svr4.h"
31 #include "symtab.h"
32 #include "trad-frame.h"
33 #include "tramp-frame.h"
34 #include "xml-syscall.h"
35 #include "linux-tdep.h"
36
37 /* The syscall's XML filename for sparc 32-bit. */
38 #define XML_SYSCALL_FILENAME_SPARC32 "syscalls/sparc-linux.xml"
39
40 #include "sparc-tdep.h"
41
42 /* Signal trampoline support. */
43
44 static void sparc32_linux_sigframe_init (const struct tramp_frame *self,
45 struct frame_info *this_frame,
46 struct trad_frame_cache *this_cache,
47 CORE_ADDR func);
48
49 /* GNU/Linux has two flavors of signals. Normal signal handlers, and
50 "realtime" (RT) signals. The RT signals can provide additional
51 information to the signal handler if the SA_SIGINFO flag is set
52 when establishing a signal handler using `sigaction'. It is not
53 unlikely that future versions of GNU/Linux will support SA_SIGINFO
54 for normal signals too. */
55
56 /* When the sparc Linux kernel calls a signal handler and the
57 SA_RESTORER flag isn't set, the return address points to a bit of
58 code on the stack. This code checks whether the PC appears to be
59 within this bit of code.
60
61 The instruction sequence for normal signals is encoded below.
62 Checking for the code sequence should be somewhat reliable, because
63 the effect is to call the system call sigreturn. This is unlikely
64 to occur anywhere other than a signal trampoline. */
65
66 static const struct tramp_frame sparc32_linux_sigframe =
67 {
68 SIGTRAMP_FRAME,
69 4,
70 {
71 { 0x821020d8, -1 }, /* mov __NR_sugreturn, %g1 */
72 { 0x91d02010, -1 }, /* ta 0x10 */
73 { TRAMP_SENTINEL_INSN, -1 }
74 },
75 sparc32_linux_sigframe_init
76 };
77
78 /* The instruction sequence for RT signals is slightly different. The
79 effect is to call the system call rt_sigreturn. */
80
81 static const struct tramp_frame sparc32_linux_rt_sigframe =
82 {
83 SIGTRAMP_FRAME,
84 4,
85 {
86 { 0x82102065, -1 }, /* mov __NR_rt_sigreturn, %g1 */
87 { 0x91d02010, -1 }, /* ta 0x10 */
88 { TRAMP_SENTINEL_INSN, -1 }
89 },
90 sparc32_linux_sigframe_init
91 };
92
93 /* This enum represents the signals' numbers on the SPARC
94 architecture. It just contains the signal definitions which are
95 different from the generic implementation.
96
97 It is derived from the file <arch/sparc/include/uapi/asm/signal.h>,
98 from the Linux kernel tree. */
99
100 enum
101 {
102 SPARC_LINUX_SIGEMT = 7,
103 SPARC_LINUX_SIGBUS = 10,
104 SPARC_LINUX_SIGSYS = 12,
105 SPARC_LINUX_SIGURG = 16,
106 SPARC_LINUX_SIGSTOP = 17,
107 SPARC_LINUX_SIGTSTP = 18,
108 SPARC_LINUX_SIGCONT = 19,
109 SPARC_LINUX_SIGCHLD = 20,
110 SPARC_LINUX_SIGIO = 23,
111 SPARC_LINUX_SIGPOLL = SPARC_LINUX_SIGIO,
112 SPARC_LINUX_SIGLOST = 29,
113 SPARC_LINUX_SIGPWR = SPARC_LINUX_SIGLOST,
114 SPARC_LINUX_SIGUSR1 = 30,
115 SPARC_LINUX_SIGUSR2 = 31,
116 };
117
118 static void
119 sparc32_linux_sigframe_init (const struct tramp_frame *self,
120 struct frame_info *this_frame,
121 struct trad_frame_cache *this_cache,
122 CORE_ADDR func)
123 {
124 CORE_ADDR base, addr, sp_addr;
125 int regnum;
126
127 base = get_frame_register_unsigned (this_frame, SPARC_O1_REGNUM);
128 if (self == &sparc32_linux_rt_sigframe)
129 base += 128;
130
131 /* Offsets from <bits/sigcontext.h>. */
132
133 trad_frame_set_reg_addr (this_cache, SPARC32_PSR_REGNUM, base + 0);
134 trad_frame_set_reg_addr (this_cache, SPARC32_PC_REGNUM, base + 4);
135 trad_frame_set_reg_addr (this_cache, SPARC32_NPC_REGNUM, base + 8);
136 trad_frame_set_reg_addr (this_cache, SPARC32_Y_REGNUM, base + 12);
137
138 /* Since %g0 is always zero, keep the identity encoding. */
139 addr = base + 20;
140 sp_addr = base + 16 + ((SPARC_SP_REGNUM - SPARC_G0_REGNUM) * 4);
141 for (regnum = SPARC_G1_REGNUM; regnum <= SPARC_O7_REGNUM; regnum++)
142 {
143 trad_frame_set_reg_addr (this_cache, regnum, addr);
144 addr += 4;
145 }
146
147 base = get_frame_register_unsigned (this_frame, SPARC_SP_REGNUM);
148 addr = get_frame_memory_unsigned (this_frame, sp_addr, 4);
149
150 for (regnum = SPARC_L0_REGNUM; regnum <= SPARC_I7_REGNUM; regnum++)
151 {
152 trad_frame_set_reg_addr (this_cache, regnum, addr);
153 addr += 4;
154 }
155 trad_frame_set_id (this_cache, frame_id_build (base, func));
156 }
157
158 /* Return the address of a system call's alternative return
159 address. */
160
161 static CORE_ADDR
162 sparc32_linux_step_trap (struct frame_info *frame, unsigned long insn)
163 {
164 if (insn == 0x91d02010)
165 {
166 ULONGEST sc_num = get_frame_register_unsigned (frame, SPARC_G1_REGNUM);
167
168 /* __NR_rt_sigreturn is 101 and __NR_sigreturn is 216. */
169 if (sc_num == 101 || sc_num == 216)
170 {
171 struct gdbarch *gdbarch = get_frame_arch (frame);
172 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
173
174 ULONGEST sp, pc_offset;
175
176 sp = get_frame_register_unsigned (frame, SPARC_SP_REGNUM);
177
178 /* The kernel puts the sigreturn registers on the stack,
179 and this is where the signal unwinding state is take from
180 when returning from a signal.
181
182 For __NR_sigreturn, this register area sits 96 bytes from
183 the base of the stack. The saved PC sits 4 bytes into the
184 sigreturn register save area.
185
186 For __NR_rt_sigreturn a siginfo_t, which is 128 bytes, sits
187 right before the sigreturn register save area. */
188
189 pc_offset = 96 + 4;
190 if (sc_num == 101)
191 pc_offset += 128;
192
193 return read_memory_unsigned_integer (sp + pc_offset, 4, byte_order);
194 }
195 }
196
197 return 0;
198 }
199
200
201 const struct sparc_gregmap sparc32_linux_core_gregmap =
202 {
203 32 * 4, /* %psr */
204 33 * 4, /* %pc */
205 34 * 4, /* %npc */
206 35 * 4, /* %y */
207 -1, /* %wim */
208 -1, /* %tbr */
209 1 * 4, /* %g1 */
210 16 * 4, /* %l0 */
211 4, /* y size */
212 };
213
214
215 static void
216 sparc32_linux_supply_core_gregset (const struct regset *regset,
217 struct regcache *regcache,
218 int regnum, const void *gregs, size_t len)
219 {
220 sparc32_supply_gregset (&sparc32_linux_core_gregmap,
221 regcache, regnum, gregs);
222 }
223
224 static void
225 sparc32_linux_collect_core_gregset (const struct regset *regset,
226 const struct regcache *regcache,
227 int regnum, void *gregs, size_t len)
228 {
229 sparc32_collect_gregset (&sparc32_linux_core_gregmap,
230 regcache, regnum, gregs);
231 }
232
233 static void
234 sparc32_linux_supply_core_fpregset (const struct regset *regset,
235 struct regcache *regcache,
236 int regnum, const void *fpregs, size_t len)
237 {
238 sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
239 }
240
241 static void
242 sparc32_linux_collect_core_fpregset (const struct regset *regset,
243 const struct regcache *regcache,
244 int regnum, void *fpregs, size_t len)
245 {
246 sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs);
247 }
248
249 /* Set the program counter for process PTID to PC. */
250
251 #define PSR_SYSCALL 0x00004000
252
253 static void
254 sparc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
255 {
256 struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
257 ULONGEST psr;
258
259 regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
260 regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4);
261
262 /* Clear the "in syscall" bit to prevent the kernel from
263 messing with the PCs we just installed, if we happen to be
264 within an interrupted system call that the kernel wants to
265 restart.
266
267 Note that after we return from the dummy call, the PSR et al.
268 registers will be automatically restored, and the kernel
269 continues to restart the system call at this point. */
270 regcache_cooked_read_unsigned (regcache, SPARC32_PSR_REGNUM, &psr);
271 psr &= ~PSR_SYSCALL;
272 regcache_cooked_write_unsigned (regcache, SPARC32_PSR_REGNUM, psr);
273 }
274
275 static LONGEST
276 sparc32_linux_get_syscall_number (struct gdbarch *gdbarch,
277 ptid_t ptid)
278 {
279 struct regcache *regcache = get_thread_regcache (ptid);
280 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
281 /* The content of a register. */
282 gdb_byte buf[4];
283 /* The result. */
284 LONGEST ret;
285
286 /* Getting the system call number from the register.
287 When dealing with the sparc architecture, this information
288 is stored at the %g1 register. */
289 regcache_cooked_read (regcache, SPARC_G1_REGNUM, buf);
290
291 ret = extract_signed_integer (buf, 4, byte_order);
292
293 return ret;
294 }
295
296 /* Implementation of `gdbarch_gdb_signal_from_target', as defined in
297 gdbarch.h. */
298
299 static enum gdb_signal
300 sparc32_linux_gdb_signal_from_target (struct gdbarch *gdbarch,
301 int signal)
302 {
303 switch (signal)
304 {
305 case SPARC_LINUX_SIGEMT:
306 return GDB_SIGNAL_EMT;
307
308 case SPARC_LINUX_SIGBUS:
309 return GDB_SIGNAL_BUS;
310
311 case SPARC_LINUX_SIGSYS:
312 return GDB_SIGNAL_SYS;
313
314 case SPARC_LINUX_SIGURG:
315 return GDB_SIGNAL_URG;
316
317 case SPARC_LINUX_SIGSTOP:
318 return GDB_SIGNAL_STOP;
319
320 case SPARC_LINUX_SIGTSTP:
321 return GDB_SIGNAL_TSTP;
322
323 case SPARC_LINUX_SIGCONT:
324 return GDB_SIGNAL_CONT;
325
326 case SPARC_LINUX_SIGCHLD:
327 return GDB_SIGNAL_CHLD;
328
329 /* No way to differentiate between SIGIO and SIGPOLL.
330 Therefore, we just handle the first one. */
331 case SPARC_LINUX_SIGIO:
332 return GDB_SIGNAL_IO;
333
334 /* No way to differentiate between SIGLOST and SIGPWR.
335 Therefore, we just handle the first one. */
336 case SPARC_LINUX_SIGLOST:
337 return GDB_SIGNAL_LOST;
338
339 case SPARC_LINUX_SIGUSR1:
340 return GDB_SIGNAL_USR1;
341
342 case SPARC_LINUX_SIGUSR2:
343 return GDB_SIGNAL_USR2;
344 }
345
346 return linux_gdb_signal_from_target (gdbarch, signal);
347 }
348
349 /* Implementation of `gdbarch_gdb_signal_to_target', as defined in
350 gdbarch.h. */
351
352 static int
353 sparc32_linux_gdb_signal_to_target (struct gdbarch *gdbarch,
354 enum gdb_signal signal)
355 {
356 switch (signal)
357 {
358 case GDB_SIGNAL_EMT:
359 return SPARC_LINUX_SIGEMT;
360
361 case GDB_SIGNAL_BUS:
362 return SPARC_LINUX_SIGBUS;
363
364 case GDB_SIGNAL_SYS:
365 return SPARC_LINUX_SIGSYS;
366
367 case GDB_SIGNAL_URG:
368 return SPARC_LINUX_SIGURG;
369
370 case GDB_SIGNAL_STOP:
371 return SPARC_LINUX_SIGSTOP;
372
373 case GDB_SIGNAL_TSTP:
374 return SPARC_LINUX_SIGTSTP;
375
376 case GDB_SIGNAL_CONT:
377 return SPARC_LINUX_SIGCONT;
378
379 case GDB_SIGNAL_CHLD:
380 return SPARC_LINUX_SIGCHLD;
381
382 case GDB_SIGNAL_IO:
383 return SPARC_LINUX_SIGIO;
384
385 case GDB_SIGNAL_POLL:
386 return SPARC_LINUX_SIGPOLL;
387
388 case GDB_SIGNAL_LOST:
389 return SPARC_LINUX_SIGLOST;
390
391 case GDB_SIGNAL_PWR:
392 return SPARC_LINUX_SIGPWR;
393
394 case GDB_SIGNAL_USR1:
395 return SPARC_LINUX_SIGUSR1;
396
397 case GDB_SIGNAL_USR2:
398 return SPARC_LINUX_SIGUSR2;
399 }
400
401 return linux_gdb_signal_to_target (gdbarch, signal);
402 }
403
404
405
406 static const struct regset sparc32_linux_gregset =
407 {
408 NULL,
409 sparc32_linux_supply_core_gregset,
410 sparc32_linux_collect_core_gregset
411 };
412
413 static const struct regset sparc32_linux_fpregset =
414 {
415 NULL,
416 sparc32_linux_supply_core_fpregset,
417 sparc32_linux_collect_core_fpregset
418 };
419
420 static void
421 sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
422 {
423 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
424
425 linux_init_abi (info, gdbarch);
426
427 tdep->gregset = &sparc32_linux_gregset;
428 tdep->sizeof_gregset = 152;
429
430 tdep->fpregset = &sparc32_linux_fpregset;
431 tdep->sizeof_fpregset = 396;
432
433 tramp_frame_prepend_unwinder (gdbarch, &sparc32_linux_sigframe);
434 tramp_frame_prepend_unwinder (gdbarch, &sparc32_linux_rt_sigframe);
435
436 /* GNU/Linux has SVR4-style shared libraries... */
437 set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
438 set_solib_svr4_fetch_link_map_offsets
439 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
440
441 /* ...which means that we need some special handling when doing
442 prologue analysis. */
443 tdep->plt_entry_size = 12;
444
445 /* Enable TLS support. */
446 set_gdbarch_fetch_tls_load_module_address (gdbarch,
447 svr4_fetch_objfile_link_map);
448
449 /* Make sure we can single-step over signal return system calls. */
450 tdep->step_trap = sparc32_linux_step_trap;
451
452 /* Hook in the DWARF CFI frame unwinder. */
453 dwarf2_append_unwinders (gdbarch);
454
455 set_gdbarch_write_pc (gdbarch, sparc_linux_write_pc);
456
457 /* Functions for 'catch syscall'. */
458 set_xml_syscall_file_name (gdbarch, XML_SYSCALL_FILENAME_SPARC32);
459 set_gdbarch_get_syscall_number (gdbarch,
460 sparc32_linux_get_syscall_number);
461
462 set_gdbarch_gdb_signal_from_target (gdbarch,
463 sparc32_linux_gdb_signal_from_target);
464 set_gdbarch_gdb_signal_to_target (gdbarch,
465 sparc32_linux_gdb_signal_to_target);
466 }
467
468 void
469 _initialize_sparc_linux_tdep (void)
470 {
471 gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_LINUX,
472 sparc32_linux_init_abi);
473 }
gdbarch
Definition: gdbarch.c:127
sparc32_linux_fpregset
static const struct regset sparc32_linux_fpregset
Definition: sparc-linux-tdep.c:413
trad_frame_set_reg_addr
void trad_frame_set_reg_addr(struct trad_frame_cache *this_trad_cache, int regnum, CORE_ADDR addr)
Definition: trad-frame.c:126
frame_id_build
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
Definition: frame.c:624
SPARC_LINUX_SIGUSR1
Definition: sparc-linux-tdep.c:114
set_gdbarch_gdb_signal_to_target
void set_gdbarch_gdb_signal_to_target(struct gdbarch *gdbarch, gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
Definition: gdbarch.c:4209
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
set_gdbarch_fetch_tls_load_module_address
void set_gdbarch_fetch_tls_load_module_address(struct gdbarch *gdbarch, gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
Definition: gdbarch.c:3038
TRAMP_SENTINEL_INSN
#define TRAMP_SENTINEL_INSN
Definition: tramp-frame.h:44
get_thread_regcache
struct regcache * get_thread_regcache(ptid_t ptid)
Definition: regcache.c:434
SPARC_LINUX_SIGPOLL
Definition: sparc-linux-tdep.c:111
sparc32_supply_gregset
void sparc32_supply_gregset(const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs)
Definition: sparc-tdep.c:2069
func
void(* func)(char *)
Definition: remote-fileio.c:1104
set_gdbarch_skip_trampoline_code
void set_gdbarch_skip_trampoline_code(struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
Definition: gdbarch.c:3316
SPARC32_PC_REGNUM
Definition: sparc-tdep.h:152
set_gdbarch_write_pc
void set_gdbarch_write_pc(struct gdbarch *gdbarch, gdbarch_write_pc_ftype write_pc)
Definition: gdbarch.c:1943
gdbarch_tdep::gregset
const struct regset * gregset
Definition: sparc-tdep.h:73
trad_frame_set_id
void trad_frame_set_id(struct trad_frame_cache *this_trad_cache, struct frame_id this_id)
Definition: trad-frame.c:171
GDB_OSABI_LINUX
Definition: defs.h:517
SPARC_LINUX_SIGUSR2
Definition: sparc-linux-tdep.c:115
gdbarch_tdep::pc
struct m32c_reg * pc
Definition: m32c-tdep.c:116
gdbarch_tdep
Definition: aarch64-tdep.h:55
sparc32_linux_gdb_signal_to_target
static int sparc32_linux_gdb_signal_to_target(struct gdbarch *gdbarch, enum gdb_signal signal)
Definition: sparc-linux-tdep.c:353
SPARC_O7_REGNUM
Definition: sparc-tdep.h:116
set_gdbarch_gdb_signal_from_target
void set_gdbarch_gdb_signal_from_target(struct gdbarch *gdbarch, gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
Definition: gdbarch.c:4185
linux_init_abi
void linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: linux-tdep.c:2492
SPARC32_NPC_REGNUM
Definition: sparc-tdep.h:153
SPARC_LINUX_SIGSTOP
Definition: sparc-linux-tdep.c:106
SIGTRAMP_FRAME
Definition: frame.h:255
frame_info
Definition: frame.c:85
svr4_ilp32_fetch_link_map_offsets
struct link_map_offsets * svr4_ilp32_fetch_link_map_offsets(void)
Definition: solib-svr4.c:3183
sparc32_linux_gregset
static const struct regset sparc32_linux_gregset
Definition: sparc-linux-tdep.c:406
sparc_gregmap
Definition: sparc-tdep.h:37
gdbarch_tdep::step_trap
CORE_ADDR(* step_trap)(struct frame_info *frame, unsigned long insn)
Definition: sparc-tdep.h:86
sparc32_collect_fpregset
void sparc32_collect_fpregset(const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs)
Definition: sparc-tdep.c:2209
gdbarch_tdep::sizeof_fpregset
size_t sizeof_fpregset
Definition: i386-tdep.h:66
get_frame_memory_unsigned
ULONGEST get_frame_memory_unsigned(struct frame_info *this_frame, CORE_ADDR addr, int len)
Definition: frame.c:2671
gdbarch_tdep::npc_regnum
int npc_regnum
Definition: sparc-tdep.h:64
defs.h
gdbarch_tdep
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
Definition: gdbarch.c:1491
sparc32_linux_collect_core_gregset
static void sparc32_linux_collect_core_gregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
Definition: sparc-linux-tdep.c:225
SPARC_G0_REGNUM
Definition: sparc-tdep.h:101
sparc32_linux_get_syscall_number
static LONGEST sparc32_linux_get_syscall_number(struct gdbarch *gdbarch, ptid_t ptid)
Definition: sparc-linux-tdep.c:276
sparc32_linux_init_abi
static void sparc32_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: sparc-linux-tdep.c:421
svr4_fetch_objfile_link_map
CORE_ADDR svr4_fetch_objfile_link_map(struct objfile *objfile)
Definition: solib-svr4.c:1579
SPARC_SP_REGNUM
Definition: sparc-tdep.h:115
regset
Definition: regset.h:34
sparc32_linux_supply_core_fpregset
static void sparc32_linux_supply_core_fpregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
Definition: sparc-linux-tdep.c:234
PSR_SYSCALL
#define PSR_SYSCALL
Definition: sparc-linux-tdep.c:251
SPARC_I7_REGNUM
Definition: sparc-tdep.h:132
symtab.h
sparc_linux_write_pc
static void sparc_linux_write_pc(struct regcache *regcache, CORE_ADDR pc)
Definition: sparc-linux-tdep.c:254
gdbarch_tdep::pc_regnum
int pc_regnum
Definition: s390-linux-tdep.c:110
SPARC_L0_REGNUM
Definition: sparc-tdep.h:117
linux_gdb_signal_from_target
enum gdb_signal linux_gdb_signal_from_target(struct gdbarch *gdbarch, int signal)
Definition: linux-tdep.c:2003
trad-frame.h
find_solib_trampoline_target
CORE_ADDR find_solib_trampoline_target(struct frame_info *frame, CORE_ADDR pc)
Definition: minsyms.c:1492
solib-svr4.h
regcache_cooked_read_unsigned
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
Definition: regcache.c:777
sparc32_linux_sigframe_init
static void sparc32_linux_sigframe_init(const struct tramp_frame *self, struct frame_info *this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
Definition: sparc-linux-tdep.c:119
osabi.h
trad_frame_cache
Definition: trad-frame.c:27
regcache.h
SPARC_LINUX_SIGTSTP
Definition: sparc-linux-tdep.c:107
ptid_t
Definition: ptid.h:35
SPARC_LINUX_SIGIO
Definition: sparc-linux-tdep.c:110
_initialize_sparc_linux_tdep
void _initialize_sparc_linux_tdep(void)
Definition: sparc-linux-tdep.c:469
gdbarch.h
frame.h
gdbarch_byte_order
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition: gdbarch.c:1509
set_solib_svr4_fetch_link_map_offsets
void set_solib_svr4_fetch_link_map_offsets(struct gdbarch *gdbarch, struct link_map_offsets *(*flmo)(void))
Definition: solib-svr4.c:3137
frame-unwind.h
sparc32_linux_rt_sigframe
static const struct tramp_frame sparc32_linux_rt_sigframe
Definition: sparc-linux-tdep.c:81
sparc32_supply_fpregset
void sparc32_supply_fpregset(const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs)
Definition: sparc-tdep.c:2189
sparc32_linux_core_gregmap
const struct sparc_gregmap sparc32_linux_core_gregmap
Definition: sparc-linux-tdep.c:201
SPARC_G1_REGNUM
Definition: sparc-tdep.h:102
sparc32_collect_gregset
void sparc32_collect_gregset(const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs)
Definition: sparc-tdep.c:2134
SPARC32_PSR_REGNUM
Definition: sparc-tdep.h:149
regnum
int regnum
Definition: aarch64-tdep.c:77
sparc32_linux_sigframe
static const struct tramp_frame sparc32_linux_sigframe
Definition: sparc-linux-tdep.c:66
set_xml_syscall_file_name
void set_xml_syscall_file_name(struct gdbarch *gdbarch, const char *name)
Definition: xml-syscall.c:513
xml-syscall.h
get_frame_register_unsigned
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
Definition: frame.c:1308
gdbarch_register_osabi
void gdbarch_register_osabi(enum bfd_architecture arch, unsigned long machine, enum gdb_osabi osabi, void(*init_osabi)(struct gdbarch_info, struct gdbarch *))
Definition: osabi.c:143
sparc32_linux_supply_core_gregset
static void sparc32_linux_supply_core_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: sparc-linux-tdep.c:216
SPARC_LINUX_SIGCHLD
Definition: sparc-linux-tdep.c:109
tramp-frame.h
SPARC_LINUX_SIGBUS
Definition: sparc-linux-tdep.c:103
sparc32_bsd_fpregmap
const struct sparc_fpregmap sparc32_bsd_fpregmap
Definition: sparc-tdep.c:2250
gdb_byte
bfd_byte gdb_byte
Definition: common-types.h:38
sparc-tdep.h
linux_gdb_signal_to_target
int linux_gdb_signal_to_target(struct gdbarch *gdbarch, enum gdb_signal signal)
Definition: linux-tdep.c:2126
dwarf2-frame.h
sparc32_linux_step_trap
static CORE_ADDR sparc32_linux_step_trap(struct frame_info *frame, unsigned long insn)
Definition: sparc-linux-tdep.c:162
SPARC_O1_REGNUM
Definition: sparc-tdep.h:110
gdbcore.h
regcache_cooked_write_unsigned
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
Definition: regcache.c:806
set_gdbarch_get_syscall_number
void set_gdbarch_get_syscall_number(struct gdbarch *gdbarch, gdbarch_get_syscall_number_ftype get_syscall_number)
Definition: gdbarch.c:4281
tramp_frame_prepend_unwinder
void tramp_frame_prepend_unwinder(struct gdbarch *gdbarch, const struct tramp_frame *tramp_frame)
Definition: tramp-frame.c:146
regcache::arch
gdbarch * arch() const
Definition: regcache.c:221
dwarf2_append_unwinders
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
Definition: dwarf2-frame.c:1384
regcache_cooked_read
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
Definition: regcache.c:661
gdbarch_tdep::sizeof_gregset
size_t sizeof_gregset
Definition: i386-tdep.h:63
linux-tdep.h
SPARC_LINUX_SIGLOST
Definition: sparc-linux-tdep.c:112
extract_signed_integer
static LONGEST extract_signed_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
Definition: defs.h:570
XML_SYSCALL_FILENAME_SPARC32
#define XML_SYSCALL_FILENAME_SPARC32
Definition: sparc-linux-tdep.c:38
gdbarch_tdep::fpregset
const struct regset * fpregset
Definition: i386-tdep.h:253
gdbtypes.h
tramp_frame::insn
struct tramp_frame::@180 insn[48]
ULONGEST
unsigned long long ULONGEST
Definition: common-types.h:53
regcache
Definition: regcache.h:232
SPARC_LINUX_SIGEMT
Definition: sparc-linux-tdep.c:102
gdbarch_info
Definition: gdbarch.h:1626
SPARC_LINUX_SIGPWR
Definition: sparc-linux-tdep.c:113
regset.h
tramp_frame
Definition: tramp-frame.h:46
sparc32_linux_collect_core_fpregset
static void sparc32_linux_collect_core_fpregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len)
Definition: sparc-linux-tdep.c:242
read_memory_unsigned_integer
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
Definition: corefile.c:326
regcache::ptid
ptid_t ptid() const
Definition: regcache.h:325
gdbarch_tdep::plt_entry_size
size_t plt_entry_size
Definition: sparc-tdep.h:83
sparc32_linux_gdb_signal_from_target
static enum gdb_signal sparc32_linux_gdb_signal_from_target(struct gdbarch *gdbarch, int signal)
Definition: sparc-linux-tdep.c:300
gdbarch::byte_order
enum bfd_endian byte_order
Definition: gdbarch.c:137
SPARC_LINUX_SIGCONT
Definition: sparc-linux-tdep.c:108
SPARC_LINUX_SIGSYS
Definition: sparc-linux-tdep.c:104
SPARC32_Y_REGNUM
Definition: sparc-tdep.h:147
get_frame_arch
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
Definition: frame.c:2691
LONGEST
long long LONGEST
Definition: common-types.h:52
SPARC_LINUX_SIGURG
Definition: sparc-linux-tdep.c:105