GDB (xrefs)

Macros | Functions | Variables
/tmp/gdb-8.1/gdb/mips-nbsd-tdep.c File Reference
`#include "defs.h"`
`#include "gdbcore.h"`
`#include "regcache.h"`
`#include "regset.h"`
`#include "target.h"`
`#include "value.h"`
`#include "osabi.h"`
`#include "nbsd-tdep.h"`
`#include "mips-nbsd-tdep.h"`
`#include "mips-tdep.h"`
`#include "solib-svr4.h"`

Go to the source code of this file.

## Macros
#define | MIPS_PC_REGNUM MIPS_EMBED_PC_REGNUM
#define | MIPS_FP0_REGNUM MIPS_EMBED_FP0_REGNUM
#define | MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
#define | MIPSNBSD_NUM_GREGS 38
#define | MIPSNBSD_NUM_FPREGS 33
#define | NBSD_MIPS_JB_PC (2 * 4)
#define | NBSD_MIPS_JB_ELEMENT_SIZE(gdbarch) mips_isa_regsize (gdbarch)
#define | NBSD_MIPS_JB_OFFSET(gdbarch)

## Functions
static void | mipsnbsd_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
static void | mipsnbsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
static void | mipsnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
void | mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
void | mipsnbsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
void | mipsnbsd_supply_fpreg (struct regcache *regcache, const char *fpregs, int regno)
void | mipsnbsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
static int | mipsnbsd_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
static int | mipsnbsd_cannot_fetch_register (struct gdbarch *gdbarch, int regno)
static int | mipsnbsd_cannot_store_register (struct gdbarch *gdbarch, int regno)
static struct link_map_offsets * | mipsnbsd_ilp32_fetch_link_map_offsets (void)
static struct link_map_offsets * | mipsnbsd_lp64_fetch_link_map_offsets (void)
static void | mipsnbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_mipsnbsd_tdep (void)

## Variables
static const struct regset | mipsnbsd_gregset
static const struct regset | mipsnbsd_fpregset

## Macro Definition Documentation

## ◆ MIPS_FP0_REGNUM

#define MIPS_FP0_REGNUM MIPS_EMBED_FP0_REGNUM

Definition at line 38 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_supply_fpregset().

## ◆ MIPS_FSR_REGNUM

#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32

Definition at line 39 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_supply_fpregset().

## ◆ MIPS_PC_REGNUM

#define MIPS_PC_REGNUM MIPS_EMBED_PC_REGNUM

Definition at line 37 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_supply_gregset().

## ◆ MIPSNBSD_NUM_FPREGS

#define MIPSNBSD_NUM_FPREGS 33

Definition at line 47 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_iterate_over_regset_sections(), mipsnbsd_supply_fpregset(), and mipsnbsd_supply_gregset().

## ◆ MIPSNBSD_NUM_GREGS

#define MIPSNBSD_NUM_GREGS 38

Definition at line 44 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_iterate_over_regset_sections(), and mipsnbsd_supply_gregset().

## ◆ NBSD_MIPS_JB_ELEMENT_SIZE

#define NBSD_MIPS_JB_ELEMENT_SIZE | ( |  | gdbarch | ) | mips_isa_regsize (gdbarch)

Definition at line 254 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_get_longjmp_target().

## ◆ NBSD_MIPS_JB_OFFSET

#define NBSD_MIPS_JB_OFFSET | ( |  | gdbarch | ) |

Value:
(NBSD_MIPS_JB_PC * \
NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch))
gdbarch
Definition: gdbarch.c:127
NBSD_MIPS_JB_PC
#define NBSD_MIPS_JB_PC
Definition: mips-nbsd-tdep.c:253

Definition at line 255 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_get_longjmp_target().

## ◆ NBSD_MIPS_JB_PC

#define NBSD_MIPS_JB_PC (2 * 4)

Definition at line 253 of file mips-nbsd-tdep.c.

## Function Documentation

## ◆ _initialize_mipsnbsd_tdep()

void _initialize_mipsnbsd_tdep | ( | void |  | ) |

Definition at line 377 of file mips-nbsd-tdep.c.

References GDB_OSABI_NETBSD, gdbarch_register_osabi(), and mipsnbsd_init_abi().

## ◆ mipsnbsd_cannot_fetch_register()

static int mipsnbsd_cannot_fetch_register | ( | struct gdbarch * | gdbarch,
|  | int | regno
| ) |  |
| static

Definition at line 280 of file mips-nbsd-tdep.c.

References MIPS_ZERO_REGNUM.

Referenced by mipsnbsd_init_abi().

## ◆ mipsnbsd_cannot_store_register()

static int mipsnbsd_cannot_store_register | ( | struct gdbarch * | gdbarch,
|  | int | regno
| ) |  |
| static

Definition at line 287 of file mips-nbsd-tdep.c.

References MIPS_ZERO_REGNUM.

Referenced by mipsnbsd_init_abi().

## ◆ mipsnbsd_fill_fpreg()

void mipsnbsd_fill_fpreg | ( | const struct regcache * | regcache,
|  | char * | fpregs,
|  | int | regno
| ) |  |

Definition at line 194 of file mips-nbsd-tdep.c.

References regcache::arch(), mips_regnum::fp_control_status, gdbarch_cannot_store_register(), gdbarch_fp0_regnum(), mips_isa_regsize(), mips_regnum(), and regcache_raw_collect().

Referenced by mipsnbsd_store_inferior_registers().

## ◆ mipsnbsd_fill_reg()

void mipsnbsd_fill_reg | ( | const struct regcache * | regcache,
|  | char * | regs,
|  | int | regno
| ) |  |

Definition at line 157 of file mips-nbsd-tdep.c.

References regcache::arch(), gdbarch_cannot_store_register(), gdbarch_pc_regnum(), mips_isa_regsize(), and regcache_raw_collect().

Referenced by mipsnbsd_store_inferior_registers().

## ◆ mipsnbsd_get_longjmp_target()

static int mipsnbsd_get_longjmp_target | ( | struct frame_info * | frame,
|  | CORE_ADDR * | pc
| ) |  |
| static

Definition at line 259 of file mips-nbsd-tdep.c.

References gdbarch::byte_order, extract_unsigned_integer(), gdbarch_byte_order(), get_frame_arch(), get_frame_register_unsigned(), MIPS_A0_REGNUM, NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET, and target_read_memory().

Referenced by mipsnbsd_init_abi().

## ◆ mipsnbsd_ilp32_fetch_link_map_offsets()

static struct link_map_offsets* mipsnbsd_ilp32_fetch_link_map_offsets | ( | void |  | ) |
| static

Definition at line 299 of file mips-nbsd-tdep.c.

References link_map_offsets::l_addr_offset, link_map_offsets::l_ld_offset, link_map_offsets::l_name_offset, link_map_offsets::l_next_offset, link_map_offsets::l_prev_offset, link_map_offsets::link_map_size, link_map_offsets::r_brk_offset, link_map_offsets::r_ldsomap_offset, link_map_offsets::r_map_offset, link_map_offsets::r_version_offset, and link_map_offsets::r_version_size.

Referenced by mipsnbsd_init_abi().

## ◆ mipsnbsd_init_abi()

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

Definition at line 356 of file mips-nbsd-tdep.c.

References gdbarch_ptr_bit(), mips_software_single_step(), mipsnbsd_cannot_fetch_register(), mipsnbsd_cannot_store_register(), mipsnbsd_get_longjmp_target(), mipsnbsd_ilp32_fetch_link_map_offsets(), mipsnbsd_iterate_over_regset_sections(), mipsnbsd_lp64_fetch_link_map_offsets(), set_gdbarch_cannot_fetch_register(), set_gdbarch_cannot_store_register(), set_gdbarch_get_longjmp_target(), set_gdbarch_iterate_over_regset_sections(), set_gdbarch_software_single_step(), and set_solib_svr4_fetch_link_map_offsets().

Referenced by _initialize_mipsnbsd_tdep().

## ◆ mipsnbsd_iterate_over_regset_sections()

static void mipsnbsd_iterate_over_regset_sections | ( | struct gdbarch * | gdbarch,
|  | iterate_over_regset_sections_cb * | cb,
|  | void * | cb_data,
|  | const struct regcache * | regcache
| ) |  |
| static

Definition at line 120 of file mips-nbsd-tdep.c.

References mips_isa_regsize(), mipsnbsd_fpregset, mipsnbsd_gregset, MIPSNBSD_NUM_FPREGS, and MIPSNBSD_NUM_GREGS.

Referenced by mipsnbsd_init_abi().

## ◆ mipsnbsd_lp64_fetch_link_map_offsets()

static struct link_map_offsets* mipsnbsd_lp64_fetch_link_map_offsets | ( | void |  | ) |
| static

Definition at line 327 of file mips-nbsd-tdep.c.

References link_map_offsets::l_addr_offset, link_map_offsets::l_ld_offset, link_map_offsets::l_name_offset, link_map_offsets::l_next_offset, link_map_offsets::l_prev_offset, link_map_offsets::link_map_size, link_map_offsets::r_brk_offset, link_map_offsets::r_ldsomap_offset, link_map_offsets::r_map_offset, link_map_offsets::r_version_offset, and link_map_offsets::r_version_size.

Referenced by mipsnbsd_init_abi().

## ◆ mipsnbsd_supply_fpreg()

void mipsnbsd_supply_fpreg | ( | struct regcache * | regcache,
|  | const char * | fpregs,
|  | int | regno
| ) |  |

Definition at line 170 of file mips-nbsd-tdep.c.

References regcache::arch(), mips_regnum::fp_implementation_revision, gdbarch_cannot_fetch_register(), gdbarch_fp0_regnum(), mips_isa_regsize(), mips_regnum(), and regcache_raw_supply().

Referenced by mipsnbsd_fetch_inferior_registers().

## ◆ mipsnbsd_supply_fpregset()

static void mipsnbsd_supply_fpregset | ( | const struct regset * | regset,
|  | struct regcache * | regcache,
|  | int | regnum,
|  | const void * | fpregs,
|  | size_t | len
| ) |  |
| static

Definition at line 54 of file mips-nbsd-tdep.c.

References regcache::arch(), gdb_assert, MIPS_FP0_REGNUM, MIPS_FSR_REGNUM, mips_isa_regsize(), MIPSNBSD_NUM_FPREGS, regcache_raw_supply(), and regnum.

Referenced by mipsnbsd_supply_gregset().

## ◆ mipsnbsd_supply_gregset()

static void mipsnbsd_supply_gregset | ( | const struct regset * | regset,
|  | struct regcache * | regcache,
|  | int | regnum,
|  | const void * | gregs,
|  | size_t | len
| ) |  |
| static

Definition at line 77 of file mips-nbsd-tdep.c.

References regcache::arch(), gdb_assert, mips_isa_regsize(), MIPS_PC_REGNUM, MIPSNBSD_NUM_FPREGS, MIPSNBSD_NUM_GREGS, mipsnbsd_supply_fpregset(), regcache_raw_supply(), and regnum.

## ◆ mipsnbsd_supply_reg()

void mipsnbsd_supply_reg | ( | struct regcache * | regcache,
|  | const char * | regs,
|  | int | regno
| ) |  |

Definition at line 138 of file mips-nbsd-tdep.c.

References regcache::arch(), gdbarch_cannot_fetch_register(), gdbarch_pc_regnum(), mips_isa_regsize(), and regcache_raw_supply().

Referenced by mipsnbsd_fetch_inferior_registers().

## Variable Documentation

## ◆ mipsnbsd_fpregset

const struct regset mipsnbsd_fpregset
| static

Initial value:
=
{
NULL,
mipsnbsd_supply_fpregset
}
mipsnbsd_supply_fpregset
static void mipsnbsd_supply_fpregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
Definition: mips-nbsd-tdep.c:54

Definition at line 111 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_iterate_over_regset_sections().

## ◆ mipsnbsd_gregset

const struct regset mipsnbsd_gregset
| static

Initial value:
=
{
NULL,
mipsnbsd_supply_gregset,
NULL,
REGSET_VARIABLE_SIZE
}
REGSET_VARIABLE_SIZE
#define REGSET_VARIABLE_SIZE
Definition: regset.h:52
mipsnbsd_supply_gregset
static void mipsnbsd_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: mips-nbsd-tdep.c:77

Definition at line 103 of file mips-nbsd-tdep.c.

Referenced by mipsnbsd_iterate_over_regset_sections().