GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/m32r-linux-tdep.c File Reference
`#include "defs.h"`
`#include "gdbcore.h"`
`#include "frame.h"`
`#include "value.h"`
`#include "regcache.h"`
`#include "inferior.h"`
`#include "osabi.h"`
`#include "reggroups.h"`
`#include "regset.h"`
`#include "glibc-tdep.h"`
`#include "solib-svr4.h"`
`#include "symtab.h"`
`#include "trad-frame.h"`
`#include "frame-unwind.h"`
`#include "m32r-tdep.h"`
`#include "linux-tdep.h"`

Go to the source code of this file.

## Classes
struct | m32r_frame_cache

## Macros
#define | PSW_OFFSET (4 * 19)
#define | BBPSW_OFFSET (4 * 21)
#define | SPU_OFFSET (4 * 23)
#define | SPI_OFFSET (4 * 26)
#define | M32R_LINUX_GREGS_SIZE (4 * 28)

## Functions
static CORE_ADDR | m32r_linux_sigtramp_start (CORE_ADDR pc, struct frame_info *this_frame)
static CORE_ADDR | m32r_linux_rt_sigtramp_start (CORE_ADDR pc, struct frame_info *this_frame)
static int | m32r_linux_pc_in_sigtramp (CORE_ADDR pc, const char *name, struct frame_info *this_frame)
static struct m32r_frame_cache * | m32r_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
static void | m32r_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | m32r_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static int | m32r_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
static void | m32r_linux_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t size)
static void | m32r_linux_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t size)
static void | m32r_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
static void | m32r_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_m32r_linux_tdep (void)

## Variables
static const gdb_byte | linux_sigtramp_code []
static const gdb_byte | linux_rt_sigtramp_code []
static int | m32r_linux_sc_reg_offset []
static const struct frame_unwind | m32r_linux_sigtramp_frame_unwind
static int | m32r_pt_regs_offset []
static const struct regset | m32r_linux_gregset

## Macro Definition Documentation

## ◆ BBPSW_OFFSET

#define BBPSW_OFFSET (4 * 21)

Definition at line 343 of file m32r-linux-tdep.c.

Referenced by m32r_linux_collect_gregset(), and m32r_linux_supply_gregset().

## ◆ M32R_LINUX_GREGS_SIZE

#define M32R_LINUX_GREGS_SIZE (4 * 28)

Definition at line 347 of file m32r-linux-tdep.c.

Referenced by m32r_linux_iterate_over_regset_sections().

## ◆ PSW_OFFSET

#define PSW_OFFSET (4 * 19)

Definition at line 342 of file m32r-linux-tdep.c.

Referenced by m32r_linux_collect_gregset(), and m32r_linux_supply_gregset().

## ◆ SPI_OFFSET

#define SPI_OFFSET (4 * 26)

Definition at line 345 of file m32r-linux-tdep.c.

Referenced by m32r_linux_collect_gregset(), and m32r_linux_supply_gregset().

## ◆ SPU_OFFSET

#define SPU_OFFSET (4 * 23)

Definition at line 344 of file m32r-linux-tdep.c.

Referenced by m32r_linux_collect_gregset(), and m32r_linux_supply_gregset().

## Function Documentation

## ◆ _initialize_m32r_linux_tdep()

void _initialize_m32r_linux_tdep | ( | void |  | ) |

Definition at line 474 of file m32r-linux-tdep.c.

References GDB_OSABI_LINUX, gdbarch_register_osabi(), and m32r_linux_init_abi().

## ◆ 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
| ) |  |
| static

Definition at line 393 of file m32r-linux-tdep.c.

References regcache::arch(), BBPSW_OFFSET, CBR_REGNUM, extract_unsigned_integer(), gdbarch_byte_order(), m32r_pt_regs_offset, M32R_SP_REGNUM, PSW_OFFSET, PSW_REGNUM, regcache_raw_collect(), regnum, SPI_OFFSET, SPU_OFFSET, and store_unsigned_integer().

## ◆ m32r_linux_init_abi()

static void m32r_linux_init_abi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch
| ) |  |
| static

Definition at line 448 of file m32r-linux-tdep.c.

References find_solib_trampoline_target(), frame_unwind_append_unwinder(), linux_init_abi(), m32r_linux_iterate_over_regset_sections(), m32r_linux_sigtramp_frame_unwind, M32R_NUM_REGS, set_gdbarch_fetch_tls_load_module_address(), set_gdbarch_iterate_over_regset_sections(), set_gdbarch_num_regs(), set_gdbarch_skip_trampoline_code(), set_solib_svr4_fetch_link_map_offsets(), svr4_fetch_objfile_link_map(), and svr4_ilp32_fetch_link_map_offsets().

Referenced by _initialize_m32r_linux_tdep().

## ◆ 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
| ) |  |
| static

Definition at line 439 of file m32r-linux-tdep.c.

References M32R_LINUX_GREGS_SIZE, and m32r_linux_gregset.

Referenced by m32r_linux_init_abi().

## ◆ m32r_linux_pc_in_sigtramp()

static int m32r_linux_pc_in_sigtramp | ( | CORE_ADDR | pc,
|  | const char * | name,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 174 of file m32r-linux-tdep.c.

References m32r_linux_rt_sigtramp_start(), m32r_linux_sigtramp_start(), and name.

Referenced by m32r_linux_sigtramp_frame_sniffer().

## ◆ m32r_linux_rt_sigtramp_start()

static CORE_ADDR m32r_linux_rt_sigtramp_start | ( | CORE_ADDR | pc,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 135 of file m32r-linux-tdep.c.

References linux_rt_sigtramp_code, and safe_frame_unwind_memory().

Referenced by m32r_linux_pc_in_sigtramp(), and m32r_linux_sigtramp_frame_cache().

## ◆ m32r_linux_sigtramp_frame_cache()

static struct m32r_frame_cache* m32r_linux_sigtramp_frame_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 225 of file m32r-linux-tdep.c.

References trad_frame_saved_reg::addr, m32r_frame_cache::base, FRAME_OBSTACK_ZALLOC, get_frame_func(), get_frame_pc(), get_frame_register_unsigned(), m32r_linux_rt_sigtramp_start(), m32r_linux_sc_reg_offset, m32r_linux_sigtramp_start(), M32R_SP_REGNUM, m32r_frame_cache::pc, regnum, m32r_frame_cache::saved_regs, and trad_frame_alloc_saved_regs().

Referenced by m32r_linux_sigtramp_frame_prev_register(), and m32r_linux_sigtramp_frame_this_id().

## ◆ 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
| ) |  |
| static

Definition at line 279 of file m32r-linux-tdep.c.

References m32r_linux_sigtramp_frame_cache(), regnum, m32r_frame_cache::saved_regs, and trad_frame_get_prev_register().

## ◆ 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
| ) |  |
| static

Definition at line 289 of file m32r-linux-tdep.c.

References find_pc_partial_function(), get_frame_pc(), m32r_linux_pc_in_sigtramp(), name, and m32r_frame_cache::pc.

## ◆ 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
| ) |  |
| static

Definition at line 268 of file m32r-linux-tdep.c.

References m32r_frame_cache::base, frame_id_build(), m32r_linux_sigtramp_frame_cache(), and m32r_frame_cache::pc.

## ◆ m32r_linux_sigtramp_start()

static CORE_ADDR m32r_linux_sigtramp_start | ( | CORE_ADDR | pc,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 87 of file m32r-linux-tdep.c.

References linux_sigtramp_code, and safe_frame_unwind_memory().

Referenced by m32r_linux_pc_in_sigtramp(), and m32r_linux_sigtramp_frame_cache().

## ◆ 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
| ) |  |
| static

Definition at line 350 of file m32r-linux-tdep.c.

References regcache::arch(), BBPSW_OFFSET, CBR_REGNUM, extract_unsigned_integer(), gdbarch_byte_order(), m32r_pt_regs_offset, M32R_SP_REGNUM, PSW_OFFSET, PSW_REGNUM, regcache_raw_supply(), regnum, SPI_OFFSET, SPU_OFFSET, and store_unsigned_integer().

## Variable Documentation

## ◆ linux_rt_sigtramp_code

const gdb_byte linux_rt_sigtramp_code[]
| static

Initial value:
= {
0x97, 0xf0, 0x00, 0xad, 0x10, 0xf2, 0xf0, 0x00,
}

Definition at line 127 of file m32r-linux-tdep.c.

Referenced by m32r_linux_rt_sigtramp_start().

## ◆ linux_sigtramp_code

const gdb_byte linux_sigtramp_code[]
| static

Initial value:
= {
0x67, 0x77, 0x10, 0xf2,
}

Definition at line 79 of file m32r-linux-tdep.c.

Referenced by m32r_linux_sigtramp_start().

## ◆ m32r_linux_gregset

const struct regset m32r_linux_gregset
| static

Initial value:
= {
NULL,
m32r_linux_supply_gregset, m32r_linux_collect_gregset
}
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
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

Definition at line 433 of file m32r-linux-tdep.c.

Referenced by m32r_linux_iterate_over_regset_sections().

## ◆ m32r_linux_sc_reg_offset

int m32r_linux_sc_reg_offset[]
| static

Initial value:
= {
4 * 4,
5 * 4,
6 * 4,
7 * 4,
0 * 4,
1 * 4,
2 * 4,
8 * 4,
9 * 4,
10 * 4,
11 * 4,
12 * 4,
13 * 4,
21 * 4,
22 * 4,
-1 * 4,
16 * 4,
-1 * 4,
23 * 4,
20 * 4,
19 * 4,
17 * 4,
15 * 4,
14 * 4
}

Definition at line 191 of file m32r-linux-tdep.c.

Referenced by m32r_linux_sigtramp_frame_cache().

## ◆ m32r_linux_sigtramp_frame_unwind

const struct frame_unwind m32r_linux_sigtramp_frame_unwind
| static

Initial value:
= {
SIGTRAMP_FRAME,
default_frame_unwind_stop_reason,
m32r_linux_sigtramp_frame_this_id,
m32r_linux_sigtramp_frame_prev_register,
NULL,
m32r_linux_sigtramp_frame_sniffer
}
SIGTRAMP_FRAME
Definition: frame.h:255
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
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
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
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

Definition at line 303 of file m32r-linux-tdep.c.

Referenced by m32r_linux_init_abi().

## ◆ m32r_pt_regs_offset

int m32r_pt_regs_offset[]
| static

Initial value:
= {
4 * 4,
4 * 5,
4 * 6,
4 * 7,
4 * 0,
4 * 1,
4 * 2,
4 * 8,
4 * 9,
4 * 10,
4 * 11,
4 * 12,
4 * 13,
4 * 24,
4 * 25,
4 * 23,
4 * 19,
4 * 19,
4 * 26,
4 * 23,
4 * 22,
4 * 20,
4 * 16,
4 * 15
}

Definition at line 315 of file m32r-linux-tdep.c.

Referenced by m32r_linux_collect_gregset(), and m32r_linux_supply_gregset().