GDB (xrefs)

/tmp/gdb-8.1/gdb/m32r-linux-tdep.c
Go to the documentation of this file.
1 /* Target-dependent code for GNU/Linux m32r.
2
3 Copyright (C) 2004-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 "gdbcore.h"
22 #include "frame.h"
23 #include "value.h"
24 #include "regcache.h"
25 #include "inferior.h"
26 #include "osabi.h"
27 #include "reggroups.h"
28 #include "regset.h"
29
30 #include "glibc-tdep.h"
31 #include "solib-svr4.h"
32 #include "symtab.h"
33
34 #include "trad-frame.h"
35 #include "frame-unwind.h"
36
37 #include "m32r-tdep.h"
38 #include "linux-tdep.h"
39
40
41
42 /* Recognizing signal handler frames. */
43
44 /* GNU/Linux has two flavors of signals. Normal signal handlers, and
45 "realtime" (RT) signals. The RT signals can provide additional
46 information to the signal handler if the SA_SIGINFO flag is set
47 when establishing a signal handler using `sigaction'. It is not
48 unlikely that future versions of GNU/Linux will support SA_SIGINFO
49 for normal signals too. */
50
51 /* When the m32r Linux kernel calls a signal handler and the
52 SA_RESTORER flag isn't set, the return address points to a bit of
53 code on the stack. This function returns whether the PC appears to
54 be within this bit of code.
55
56 The instruction sequence for normal signals is
57 ldi r7, #__NR_sigreturn
58 trap #2
59 or 0x67 0x77 0x10 0xf2.
60
61 Checking for the code sequence should be somewhat reliable, because
62 the effect is to call the system call sigreturn. This is unlikely
63 to occur anywhere other than in a signal trampoline.
64
65 It kind of sucks that we have to read memory from the process in
66 order to identify a signal trampoline, but there doesn't seem to be
67 any other way. Therefore we only do the memory reads if no
68 function name could be identified, which should be the case since
69 the code is on the stack.
70
71 Detection of signal trampolines for handlers that set the
72 SA_RESTORER flag is in general not possible. Unfortunately this is
73 what the GNU C Library has been doing for quite some time now.
74 However, as of version 2.1.2, the GNU C Library uses signal
75 trampolines (named __restore and __restore_rt) that are identical
76 to the ones used by the kernel. Therefore, these trampolines are
77 supported too. */
78
79 static const gdb_byte linux_sigtramp_code[] = {
80 0x67, 0x77, 0x10, 0xf2,
81 };
82
83 /* If PC is in a sigtramp routine, return the address of the start of
84 the routine. Otherwise, return 0. */
85
86 static CORE_ADDR
87 m32r_linux_sigtramp_start (CORE_ADDR pc, struct frame_info *this_frame)
88 {
89 gdb_byte buf[4];
90
91 /* We only recognize a signal trampoline if PC is at the start of
92 one of the instructions. We optimize for finding the PC at the
93 start of the instruction sequence, as will be the case when the
94 trampoline is not the first frame on the stack. We assume that
95 in the case where the PC is not at the start of the instruction
96 sequence, there will be a few trailing readable bytes on the
97 stack. */
98
99 if (pc % 2 != 0)
100 {
101 if (!safe_frame_unwind_memory (this_frame, pc, buf, 2))
102 return 0;
103
104 if (memcmp (buf, linux_sigtramp_code, 2) == 0)
105 pc -= 2;
106 else
107 return 0;
108 }
109
110 if (!safe_frame_unwind_memory (this_frame, pc, buf, 4))
111 return 0;
112
113 if (memcmp (buf, linux_sigtramp_code, 4) != 0)
114 return 0;
115
116 return pc;
117 }
118
119 /* This function does the same for RT signals. Here the instruction
120 sequence is
121 ldi r7, #__NR_rt_sigreturn
122 trap #2
123 or 0x97 0xf0 0x00 0xad 0x10 0xf2 0xf0 0x00.
124
125 The effect is to call the system call rt_sigreturn. */
126
127 static const gdb_byte linux_rt_sigtramp_code[] = {
128 0x97, 0xf0, 0x00, 0xad, 0x10, 0xf2, 0xf0, 0x00,
129 };
130
131 /* If PC is in a RT sigtramp routine, return the address of the start
132 of the routine. Otherwise, return 0. */
133
134 static CORE_ADDR
135 m32r_linux_rt_sigtramp_start (CORE_ADDR pc, struct frame_info *this_frame)
136 {
137 gdb_byte buf[4];
138
139 /* We only recognize a signal trampoline if PC is at the start of
140 one of the instructions. We optimize for finding the PC at the
141 start of the instruction sequence, as will be the case when the
142 trampoline is not the first frame on the stack. We assume that
143 in the case where the PC is not at the start of the instruction
144 sequence, there will be a few trailing readable bytes on the
145 stack. */
146
147 if (pc % 2 != 0)
148 return 0;
149
150 if (!safe_frame_unwind_memory (this_frame, pc, buf, 4))
151 return 0;
152
153 if (memcmp (buf, linux_rt_sigtramp_code, 4) == 0)
154 {
155 if (!safe_frame_unwind_memory (this_frame, pc + 4, buf, 4))
156 return 0;
157
158 if (memcmp (buf, linux_rt_sigtramp_code + 4, 4) == 0)
159 return pc;
160 }
161 else if (memcmp (buf, linux_rt_sigtramp_code + 4, 4) == 0)
162 {
163 if (!safe_frame_unwind_memory (this_frame, pc - 4, buf, 4))
164 return 0;
165
166 if (memcmp (buf, linux_rt_sigtramp_code, 4) == 0)
167 return pc - 4;
168 }
169
170 return 0;
171 }
172
173 static int
174 m32r_linux_pc_in_sigtramp (CORE_ADDR pc, const char *name,
175 struct frame_info *this_frame)
176 {
177 /* If we have NAME, we can optimize the search. The trampolines are
178 named __restore and __restore_rt. However, they aren't dynamically
179 exported from the shared C library, so the trampoline may appear to
180 be part of the preceding function. This should always be sigaction,
181 __sigaction, or __libc_sigaction (all aliases to the same function). */
182 if (name == NULL || strstr (name, "sigaction") != NULL)
183 return (m32r_linux_sigtramp_start (pc, this_frame) != 0
184 || m32r_linux_rt_sigtramp_start (pc, this_frame) != 0);
185
186 return (strcmp ("__restore", name) == 0
187 || strcmp ("__restore_rt", name) == 0);
188 }
189
190 /* From <asm/sigcontext.h>. */
191 static int m32r_linux_sc_reg_offset[] = {
192 4 * 4, /* r0 */
193 5 * 4, /* r1 */
194 6 * 4, /* r2 */
195 7 * 4, /* r3 */
196 0 * 4, /* r4 */
197 1 * 4, /* r5 */
198 2 * 4, /* r6 */
199 8 * 4, /* r7 */
200 9 * 4, /* r8 */
201 10 * 4, /* r9 */
202 11 * 4, /* r10 */
203 12 * 4, /* r11 */
204 13 * 4, /* r12 */
205 21 * 4, /* fp */
206 22 * 4, /* lr */
207 -1 * 4, /* sp */
208 16 * 4, /* psw */
209 -1 * 4, /* cbr */
210 23 * 4, /* spi */
211 20 * 4, /* spu */
212 19 * 4, /* bpc */
213 17 * 4, /* pc */
214 15 * 4, /* accl */
215 14 * 4 /* acch */
216 };
217
218 struct m32r_frame_cache
219 {
220 CORE_ADDR base, pc;
221 struct trad_frame_saved_reg *saved_regs;
222 };
223
224 static struct m32r_frame_cache *
225 m32r_linux_sigtramp_frame_cache (struct frame_info *this_frame,
226 void **this_cache)
227 {
228 struct m32r_frame_cache *cache;
229 CORE_ADDR sigcontext_addr, addr;
230 int regnum;
231
232 if ((*this_cache) != NULL)
233 return (struct m32r_frame_cache *) (*this_cache);
234 cache = FRAME_OBSTACK_ZALLOC (struct m32r_frame_cache);
235 (*this_cache) = cache;
236 cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
237
238 cache->base = get_frame_register_unsigned (this_frame, M32R_SP_REGNUM);
239 sigcontext_addr = cache->base + 4;
240
241 cache->pc = get_frame_pc (this_frame);
242 addr = m32r_linux_sigtramp_start (cache->pc, this_frame);
243 if (addr == 0)
244 {
245 /* If this is a RT signal trampoline, adjust SIGCONTEXT_ADDR
246 accordingly. */
247 addr = m32r_linux_rt_sigtramp_start (cache->pc, this_frame);
248 if (addr)
249 sigcontext_addr += 128;
250 else
251 addr = get_frame_func (this_frame);
252 }
253 cache->pc = addr;
254
255 cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
256
257 for (regnum = 0; regnum < sizeof (m32r_linux_sc_reg_offset) / 4; regnum++)
258 {
259 if (m32r_linux_sc_reg_offset[regnum] >= 0)
260 cache->saved_regs[regnum].addr =
261 sigcontext_addr + m32r_linux_sc_reg_offset[regnum];
262 }
263
264 return cache;
265 }
266
267 static void
268 m32r_linux_sigtramp_frame_this_id (struct frame_info *this_frame,
269 void **this_cache,
270 struct frame_id *this_id)
271 {
272 struct m32r_frame_cache *cache =
273 m32r_linux_sigtramp_frame_cache (this_frame, this_cache);
274
275 (*this_id) = frame_id_build (cache->base, cache->pc);
276 }
277
278 static struct value *
279 m32r_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
280 void **this_cache, int regnum)
281 {
282 struct m32r_frame_cache *cache =
283 m32r_linux_sigtramp_frame_cache (this_frame, this_cache);
284
285 return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
286 }
287
288 static int
289 m32r_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
290 struct frame_info *this_frame,
291 void **this_cache)
292 {
293 CORE_ADDR pc = get_frame_pc (this_frame);
294 const char *name;
295
296 find_pc_partial_function (pc, &name, NULL, NULL);
297 if (m32r_linux_pc_in_sigtramp (pc, name, this_frame))
298 return 1;
299
300 return 0;
301 }
302
303 static const struct frame_unwind m32r_linux_sigtramp_frame_unwind = {
304 SIGTRAMP_FRAME,
305 default_frame_unwind_stop_reason,
306 m32r_linux_sigtramp_frame_this_id,
307 m32r_linux_sigtramp_frame_prev_register,
308 NULL,
309 m32r_linux_sigtramp_frame_sniffer
310 };
311
312 /* Mapping between the registers in `struct pt_regs'
313 format and GDB's register array layout. */
314
315 static int m32r_pt_regs_offset[] = {
316 4 * 4, /* r0 */
317 4 * 5, /* r1 */
318 4 * 6, /* r2 */
319 4 * 7, /* r3 */
320 4 * 0, /* r4 */
321 4 * 1, /* r5 */
322 4 * 2, /* r6 */
323 4 * 8, /* r7 */
324 4 * 9, /* r8 */
325 4 * 10, /* r9 */
326 4 * 11, /* r10 */
327 4 * 12, /* r11 */
328 4 * 13, /* r12 */
329 4 * 24, /* fp */
330 4 * 25, /* lr */
331 4 * 23, /* sp */
332 4 * 19, /* psw */
333 4 * 19, /* cbr */
334 4 * 26, /* spi */
335 4 * 23, /* spu */
336 4 * 22, /* bpc */
337 4 * 20, /* pc */
338 4 * 16, /* accl */
339 4 * 15 /* acch */
340 };
341
342 #define PSW_OFFSET (4 * 19)
343 #define BBPSW_OFFSET (4 * 21)
344 #define SPU_OFFSET (4 * 23)
345 #define SPI_OFFSET (4 * 26)
346
347 #define M32R_LINUX_GREGS_SIZE (4 * 28)
348
349 static void
350 m32r_linux_supply_gregset (const struct regset *regset,
351 struct regcache *regcache, int regnum,
352 const void *gregs, size_t size)
353 {
354 const gdb_byte *regs = (const gdb_byte *) gregs;
355 enum bfd_endian byte_order =
356 gdbarch_byte_order (regcache->arch ());
357 ULONGEST psw, bbpsw;
358 gdb_byte buf[4];
359 const gdb_byte *p;
360 int i;
361
362 psw = extract_unsigned_integer (regs + PSW_OFFSET, 4, byte_order);
363 bbpsw = extract_unsigned_integer (regs + BBPSW_OFFSET, 4, byte_order);
364 psw = ((0x00c1 & bbpsw) << 8) | ((0xc100 & psw) >> 8);
365
366 for (i = 0; i < ARRAY_SIZE (m32r_pt_regs_offset); i++)
367 {
368 if (regnum != -1 && regnum != i)
369 continue;
370
371 switch (i)
372 {
373 case PSW_REGNUM:
374 store_unsigned_integer (buf, 4, byte_order, psw);
375 p = buf;
376 break;
377 case CBR_REGNUM:
378 store_unsigned_integer (buf, 4, byte_order, psw & 1);
379 p = buf;
380 break;
381 case M32R_SP_REGNUM:
382 p = regs + ((psw & 0x80) ? SPU_OFFSET : SPI_OFFSET);
383 break;
384 default:
385 p = regs + m32r_pt_regs_offset[i];
386 }
387
388 regcache_raw_supply (regcache, i, p);
389 }
390 }
391
392 static void
393 m32r_linux_collect_gregset (const struct regset *regset,
394 const struct regcache *regcache,
395 int regnum, void *gregs, size_t size)
396 {
397 gdb_byte *regs = (gdb_byte *) gregs;
398 int i;
399 enum bfd_endian byte_order =
400 gdbarch_byte_order (regcache->arch ());
401 ULONGEST psw;
402 gdb_byte buf[4];
403
404 regcache_raw_collect (regcache, PSW_REGNUM, buf);
405 psw = extract_unsigned_integer (buf, 4, byte_order);
406
407 for (i = 0; i < ARRAY_SIZE (m32r_pt_regs_offset); i++)
408 {
409 if (regnum != -1 && regnum != i)
410 continue;
411
412 switch (i)
413 {
414 case PSW_REGNUM:
415 store_unsigned_integer (regs + PSW_OFFSET, 4, byte_order,
416 (psw & 0xc1) << 8);
417 store_unsigned_integer (regs + BBPSW_OFFSET, 4, byte_order,
418 (psw >> 8) & 0xc1);
419 break;
420 case CBR_REGNUM:
421 break;
422 case M32R_SP_REGNUM:
423 regcache_raw_collect (regcache, i, regs
424 + ((psw & 0x80) ? SPU_OFFSET : SPI_OFFSET));
425 break;
426 default:
427 regcache_raw_collect (regcache, i,
428 regs + m32r_pt_regs_offset[i]);
429 }
430 }
431 }
432
433 static const struct regset m32r_linux_gregset = {
434 NULL,
435 m32r_linux_supply_gregset, m32r_linux_collect_gregset
436 };
437
438 static void
439 m32r_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
440 iterate_over_regset_sections_cb *cb,
441 void *cb_data,
442 const struct regcache *regcache)
443 {
444 cb (".reg", M32R_LINUX_GREGS_SIZE, &m32r_linux_gregset, NULL, cb_data);
445 }
446
447 static void
448 m32r_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
449 {
450
451 linux_init_abi (info, gdbarch);
452
453 /* Since EVB register is not available for native debug, we reduce
454 the number of registers. */
455 set_gdbarch_num_regs (gdbarch, M32R_NUM_REGS - 1);
456
457 frame_unwind_append_unwinder (gdbarch, &m32r_linux_sigtramp_frame_unwind);
458
459 /* GNU/Linux uses SVR4-style shared libraries. */
460 set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
461 set_solib_svr4_fetch_link_map_offsets
462 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
463
464 /* Core file support. */
465 set_gdbarch_iterate_over_regset_sections
466 (gdbarch, m32r_linux_iterate_over_regset_sections);
467
468 /* Enable TLS support. */
469 set_gdbarch_fetch_tls_load_module_address (gdbarch,
470 svr4_fetch_objfile_link_map);
471 }
472
473 void
474 _initialize_m32r_linux_tdep (void)
475 {
476 gdbarch_register_osabi (bfd_arch_m32r, 0, GDB_OSABI_LINUX,
477 m32r_linux_init_abi);
478 }
set_gdbarch_num_regs
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
Definition: gdbarch.c:2050
gdbarch
Definition: gdbarch.c:127
m32r_linux_init_abi
static void m32r_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: m32r-linux-tdep.c:448
frame_id_build
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
Definition: frame.c:624
m32r_linux_sigtramp_start
static CORE_ADDR m32r_linux_sigtramp_start(CORE_ADDR pc, struct frame_info *this_frame)
Definition: m32r-linux-tdep.c:87
get_frame_pc
CORE_ADDR get_frame_pc(struct frame_info *frame)
Definition: frame.c:2376
_initialize_m32r_linux_tdep
void _initialize_m32r_linux_tdep(void)
Definition: m32r-linux-tdep.c:474
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
trad_frame_get_prev_register
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
Definition: trad-frame.c:142
iterate_over_regset_sections_cb
void() iterate_over_regset_sections_cb(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
Definition: gdbarch.h:99
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
m32r_linux_collect_gregset
static void m32r_linux_collect_gregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t size)
Definition: m32r-linux-tdep.c:393
GDB_OSABI_LINUX
Definition: defs.h:517
m32r_linux_supply_gregset
static void m32r_linux_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t size)
Definition: m32r-linux-tdep.c:350
reggroups.h
linux_init_abi
void linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: linux-tdep.c:2492
m32r_linux_sigtramp_frame_unwind
static const struct frame_unwind m32r_linux_sigtramp_frame_unwind
Definition: m32r-linux-tdep.c:303
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
defs.h
m32r_linux_sigtramp_frame_prev_register
static struct value * m32r_linux_sigtramp_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: m32r-linux-tdep.c:279
frame_unwind_append_unwinder
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
Definition: frame-unwind.c:79
m32r_linux_gregset
static const struct regset m32r_linux_gregset
Definition: m32r-linux-tdep.c:433
FRAME_OBSTACK_ZALLOC
#define FRAME_OBSTACK_ZALLOC(TYPE)
Definition: frame.h:678
svr4_fetch_objfile_link_map
CORE_ADDR svr4_fetch_objfile_link_map(struct objfile *objfile)
Definition: solib-svr4.c:1579
regset
Definition: regset.h:34
m32r_linux_rt_sigtramp_start
static CORE_ADDR m32r_linux_rt_sigtramp_start(CORE_ADDR pc, struct frame_info *this_frame)
Definition: m32r-linux-tdep.c:135
symtab.h
m32r_linux_pc_in_sigtramp
static int m32r_linux_pc_in_sigtramp(CORE_ADDR pc, const char *name, struct frame_info *this_frame)
Definition: m32r-linux-tdep.c:174
name
const char *const name
Definition: aarch64-tdep.c:76
m32r_linux_sigtramp_frame_sniffer
static int m32r_linux_sigtramp_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: m32r-linux-tdep.c:289
trad-frame.h
linux_rt_sigtramp_code
static const gdb_byte linux_rt_sigtramp_code[]
Definition: m32r-linux-tdep.c:127
find_solib_trampoline_target
CORE_ADDR find_solib_trampoline_target(struct frame_info *frame, CORE_ADDR pc)
Definition: minsyms.c:1492
solib-svr4.h
extract_unsigned_integer
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
Definition: defs.h:577
safe_frame_unwind_memory
int safe_frame_unwind_memory(struct frame_info *this_frame, CORE_ADDR addr, gdb_byte *buf, int len)
Definition: frame.c:2681
osabi.h
regcache.h
frame.h
gdbarch_byte_order
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition: gdbarch.c:1509
inferior.h
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
find_pc_partial_function
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
Definition: blockframe.c:320
frame-unwind.h
M32R_LINUX_GREGS_SIZE
#define M32R_LINUX_GREGS_SIZE
Definition: m32r-linux-tdep.c:347
M32R_SP_REGNUM
Definition: m32r-tdep.h:36
PSW_OFFSET
#define PSW_OFFSET
Definition: m32r-linux-tdep.c:342
M32R_NUM_REGS
#define M32R_NUM_REGS
Definition: m32r-tdep.h:48
m32r_frame_cache::pc
CORE_ADDR pc
Definition: m32r-linux-tdep.c:220
m32r_pt_regs_offset
static int m32r_pt_regs_offset[]
Definition: m32r-linux-tdep.c:315
regnum
int regnum
Definition: aarch64-tdep.c:77
BBPSW_OFFSET
#define BBPSW_OFFSET
Definition: m32r-linux-tdep.c:343
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
trad_frame_alloc_saved_regs
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct gdbarch *gdbarch)
Definition: trad-frame.c:47
glibc-tdep.h
value
Definition: value.c:169
trad_frame_saved_reg::addr
LONGEST addr
Definition: trad-frame.h:83
gdb_byte
bfd_byte gdb_byte
Definition: common-types.h:38
m32r_frame_cache::saved_regs
struct trad_frame_saved_reg * saved_regs
Definition: m32r-linux-tdep.c:221
gdbcore.h
m32r-tdep.h
regcache::arch
gdbarch * arch() const
Definition: regcache.c:221
linux-tdep.h
m32r_linux_sc_reg_offset
static int m32r_linux_sc_reg_offset[]
Definition: m32r-linux-tdep.c:191
m32r_linux_sigtramp_frame_this_id
static void m32r_linux_sigtramp_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: m32r-linux-tdep.c:268
m32r_frame_cache
Definition: m32r-linux-tdep.c:218
value.h
frame_unwind
Definition: frame-unwind.h:144
PSW_REGNUM
Definition: m32r-tdep.h:37
regcache_raw_supply
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
Definition: regcache.c:1004
m32r_linux_sigtramp_frame_cache
static struct m32r_frame_cache * m32r_linux_sigtramp_frame_cache(struct frame_info *this_frame, void **this_cache)
Definition: m32r-linux-tdep.c:225
ULONGEST
unsigned long long ULONGEST
Definition: common-types.h:53
default_frame_unwind_stop_reason
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:184
regcache
Definition: regcache.h:232
gdbarch_info
Definition: gdbarch.h:1626
regcache_raw_collect
void regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
Definition: regcache.c:1085
regset.h
set_gdbarch_iterate_over_regset_sections
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
Definition: gdbarch.c:3647
SPU_OFFSET
#define SPU_OFFSET
Definition: m32r-linux-tdep.c:344
m32r_linux_iterate_over_regset_sections
static void m32r_linux_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
Definition: m32r-linux-tdep.c:439
SPI_OFFSET
#define SPI_OFFSET
Definition: m32r-linux-tdep.c:345
CBR_REGNUM
Definition: m32r-tdep.h:38
trad_frame_saved_reg
Definition: trad-frame.h:81
get_frame_func
CORE_ADDR get_frame_func(struct frame_info *this_frame)
Definition: frame.c:1001
size
size_t size
Definition: go32-nat.c:242
frame_id
Definition: frame.h:111
m32r_frame_cache::base
CORE_ADDR base
Definition: m32r-linux-tdep.c:220
linux_sigtramp_code
static const gdb_byte linux_sigtramp_code[]
Definition: m32r-linux-tdep.c:79
store_unsigned_integer
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
Definition: defs.h:604