GDB (xrefs)

Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/frv-linux-tdep.c File Reference
`#include "defs.h"`
`#include "gdbcore.h"`
`#include "target.h"`
`#include "frame.h"`
`#include "osabi.h"`
`#include "regcache.h"`
`#include "elf-bfd.h"`
`#include "elf/frv.h"`
`#include "frv-tdep.h"`
`#include "trad-frame.h"`
`#include "frame-unwind.h"`
`#include "regset.h"`
`#include "linux-tdep.h"`

Go to the source code of this file.

## Classes
struct | frv_elf_gregset_t
struct | frv_elf_fpregset_t

## Macros
#define | FRV_ELF_NGREG (46 + 2)

## Typedefs
typedef unsigned char | frv_elf_greg_t[4]
typedef unsigned char | frv_elf_fpreg_t[4]

## Enumerations
enum | { NORMAL_SIGTRAMP = 1, RT_SIGTRAMP = 2 }

## Functions
static int | frv_linux_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
static LONGEST | frv_linux_sigcontext_reg_addr (struct frame_info *this_frame, int regno, CORE_ADDR *sc_addr_cache_ptr)
static struct trad_frame_cache * | frv_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
static void | frv_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | frv_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static int | frv_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
static void | frv_linux_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
static void | frv_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
static void | frv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
static enum gdb_osabi | frv_linux_elf_osabi_sniffer (bfd *abfd)
void | _initialize_frv_linux_tdep (void)

## Variables
static const int | frv_instr_size = 4
static const struct frame_unwind | frv_linux_sigtramp_frame_unwind
static const struct regcache_map_entry | frv_linux_gregmap []
static const struct regcache_map_entry | frv_linux_fpregmap []
static const struct regset | frv_linux_gregset
static const struct regset | frv_linux_fpregset

## Macro Definition Documentation

## ◆ FRV_ELF_NGREG

#define FRV_ELF_NGREG (46 + 2)

Definition at line 346 of file frv-linux-tdep.c.

## Typedef Documentation

## ◆ frv_elf_fpreg_t

typedef unsigned char frv_elf_fpreg_t[4]

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

## ◆ frv_elf_greg_t

typedef unsigned char frv_elf_greg_t[4]

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

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
NORMAL_SIGTRAMP |
RT_SIGTRAMP |

Definition at line 38 of file frv-linux-tdep.c.

## Function Documentation

## ◆ _initialize_frv_linux_tdep()

void _initialize_frv_linux_tdep | ( | void |  | ) |

Definition at line 484 of file frv-linux-tdep.c.

References frv_linux_elf_osabi_sniffer(), frv_linux_init_abi(), GDB_OSABI_LINUX, gdbarch_register_osabi(), and gdbarch_register_osabi_sniffer().

## ◆ frv_linux_elf_osabi_sniffer()

static enum gdb_osabi frv_linux_elf_osabi_sniffer | ( | bfd * | abfd | ) |
| static

Definition at line 468 of file frv-linux-tdep.c.

References GDB_OSABI_LINUX, and GDB_OSABI_UNKNOWN.

Referenced by _initialize_frv_linux_tdep().

## ◆ frv_linux_init_abi()

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

Definition at line 456 of file frv-linux-tdep.c.

References frame_unwind_append_unwinder(), frv_linux_iterate_over_regset_sections(), frv_linux_sigtramp_frame_unwind, linux_init_abi(), and set_gdbarch_iterate_over_regset_sections().

Referenced by _initialize_frv_linux_tdep().

## ◆ frv_linux_iterate_over_regset_sections()

static void frv_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 443 of file frv-linux-tdep.c.

References frv_linux_fpregset, and frv_linux_gregset.

Referenced by frv_linux_init_abi().

## ◆ frv_linux_pc_in_sigtramp()

static int frv_linux_pc_in_sigtramp | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | const char * | name
| ) |  |
| static

Definition at line 44 of file frv-linux-tdep.c.

References extract_unsigned_integer(), frv_instr_size, gdbarch_byte_order(), NORMAL_SIGTRAMP, RT_SIGTRAMP, and target_read_memory().

Referenced by frv_linux_sigcontext_reg_addr(), and frv_linux_sigtramp_frame_sniffer().

## ◆ frv_linux_sigcontext_reg_addr()

static LONGEST frv_linux_sigcontext_reg_addr | ( | struct frame_info * | this_frame,
|  | int | regno,
|  | CORE_ADDR * | sc_addr_cache_ptr
| ) |  |
| static

Definition at line 170 of file frv-linux-tdep.c.

References _, gdbarch::byte_order, cccr_regnum, ccr_regnum, extract_unsigned_integer(), first_fpr_regnum, first_gpr_regnum, frv_linux_pc_in_sigtramp(), gdbarch_byte_order(), get_frame_arch(), get_frame_pc(), get_frame_register(), iacc0h_regnum, iacc0l_regnum, internal_error(), last_fpr_regnum, last_gpr_regnum, lcr_regnum, lr_regnum, NORMAL_SIGTRAMP, pc_regnum, psr_regnum, RT_SIGTRAMP, sp_regnum, target_read_memory(), and warning().

Referenced by frv_linux_sigtramp_frame_cache().

## ◆ frv_linux_sigtramp_frame_cache()

static struct trad_frame_cache* frv_linux_sigtramp_frame_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 260 of file frv-linux-tdep.c.

References gdbarch::byte_order, extract_unsigned_integer(), frame_id_build(), frv_linux_sigcontext_reg_addr(), frv_num_regs, gdbarch_byte_order(), get_frame_arch(), get_frame_pc(), get_frame_register(), regnum, sp_regnum, trad_frame_cache_zalloc(), trad_frame_set_id(), and trad_frame_set_reg_addr().

Referenced by frv_linux_sigtramp_frame_prev_register(), and frv_linux_sigtramp_frame_this_id().

## ◆ frv_linux_sigtramp_frame_prev_register()

static struct value* frv_linux_sigtramp_frame_prev_register | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | int | regnum
| ) |  |
| static

Definition at line 309 of file frv-linux-tdep.c.

References frv_linux_sigtramp_frame_cache(), regnum, trad_frame_cache::this_frame, and trad_frame_get_register().

## ◆ frv_linux_sigtramp_frame_sniffer()

static int frv_linux_sigtramp_frame_sniffer | ( | const struct frame_unwind * | self,
|  | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 319 of file frv-linux-tdep.c.

References find_pc_partial_function(), frv_linux_pc_in_sigtramp(), get_frame_arch(), get_frame_pc(), and name.

## ◆ frv_linux_sigtramp_frame_this_id()

static void frv_linux_sigtramp_frame_this_id | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | struct frame_id * | this_id
| ) |  |
| static

Definition at line 299 of file frv-linux-tdep.c.

References frv_linux_sigtramp_frame_cache(), trad_frame_cache::this_frame, trad_frame_cache::this_id, and trad_frame_get_id().

## ◆ frv_linux_supply_gregset()

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

Definition at line 411 of file frv-linux-tdep.c.

References first_gpr_regnum, last_gpr_regnum, regcache::raw_supply_zeroed(), regcache_supply_regset(), and regnum.

## Variable Documentation

## ◆ frv_instr_size

const int frv_instr_size = 4
| static

Definition at line 36 of file frv-linux-tdep.c.

Referenced by BP_MANIPULATION(), frv_analyze_prologue(), and frv_linux_pc_in_sigtramp().

## ◆ frv_linux_fpregmap

const struct regcache_map_entry frv_linux_fpregmap[]
| static

Initial value:
=
{
{ 64, first_fpr_regnum, 4 },
{ 1, fner0_regnum, 4 },
{ 1, fner1_regnum, 4 },
{ 1, msr0_regnum, 4 },
{ 1, msr1_regnum, 4 },
{ 8, acc0_regnum, 4 },
{ 1, accg0123_regnum, 4 },
{ 1, accg4567_regnum, 4 },
{ 1, fsr0_regnum, 4 },
{ 0 }
}
acc0_regnum
Definition: frv-tdep.h:68
accg4567_regnum
Definition: frv-tdep.h:71
accg0123_regnum
Definition: frv-tdep.h:70
msr1_regnum
Definition: frv-tdep.h:73
fner0_regnum
Definition: frv-tdep.h:76
fner1_regnum
Definition: frv-tdep.h:77
first_fpr_regnum
Definition: frv-tdep.h:39
fsr0_regnum
Definition: frv-tdep.h:67
msr0_regnum
Definition: frv-tdep.h:72

Definition at line 394 of file frv-linux-tdep.c.

## ◆ frv_linux_fpregset

const struct regset frv_linux_fpregset
| static

Initial value:
=
{
frv_linux_fpregmap,
regcache_supply_regset, regcache_collect_regset
}
frv_linux_fpregmap
static const struct regcache_map_entry frv_linux_fpregmap[]
Definition: frv-linux-tdep.c:394
regcache_supply_regset
void regcache_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *buf, size_t size)
Definition: regcache.c:1192
regcache_collect_regset
void regcache_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *buf, size_t size)
Definition: regcache.c:1211

Definition at line 436 of file frv-linux-tdep.c.

Referenced by frv_linux_iterate_over_regset_sections().

## ◆ frv_linux_gregmap

const struct regcache_map_entry frv_linux_gregmap[]
| static

Initial value:
=
{
{ 1, psr_regnum, 4 },
{ 1, REGCACHE_MAP_SKIP, 4 },
{ 1, ccr_regnum, 4 },
{ 1, cccr_regnum, 4 },
{ 1, lr_regnum, 4 },
{ 1, lcr_regnum, 4 },
{ 1, pc_regnum, 4 },
{ 1, REGCACHE_MAP_SKIP, 4 },
{ 1, REGCACHE_MAP_SKIP, 4 },
{ 1, REGCACHE_MAP_SKIP, 4 },
{ 1, gner0_regnum, 4 },
{ 1, gner1_regnum, 4 },
{ 1, REGCACHE_MAP_SKIP, 8 },
{ 1, tbr_regnum, 4 },
{ 31, first_gpr_regnum + 1, 4 },
{ 1, fdpic_loadmap_exec_regnum, 4 },
{ 1, fdpic_loadmap_interp_regnum, 4 },
{ 0 }
}
gner0_regnum
Definition: frv-tdep.h:74
fdpic_loadmap_interp_regnum
Definition: frv-tdep.h:52
lr_regnum
Definition: frv-tdep.h:63
tbr_regnum
Definition: frv-tdep.h:53
pc_regnum
Definition: frv-tdep.h:43
psr_regnum
Definition: frv-tdep.h:48
ccr_regnum
Definition: frv-tdep.h:49
REGCACHE_MAP_SKIP
Definition: regcache.h:168
fdpic_loadmap_exec_regnum
Definition: frv-tdep.h:51
first_gpr_regnum
Definition: frv-tdep.h:31
lcr_regnum
Definition: frv-tdep.h:64
gner1_regnum
Definition: frv-tdep.h:75
cccr_regnum
Definition: frv-tdep.h:50

Definition at line 363 of file frv-linux-tdep.c.

## ◆ frv_linux_gregset

const struct regset frv_linux_gregset
| static

Initial value:
=
{
frv_linux_gregmap,
frv_linux_supply_gregset, regcache_collect_regset
}
frv_linux_gregmap
static const struct regcache_map_entry frv_linux_gregmap[]
Definition: frv-linux-tdep.c:363
regcache_collect_regset
void regcache_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *buf, size_t size)
Definition: regcache.c:1211
frv_linux_supply_gregset
static void frv_linux_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: frv-linux-tdep.c:411

Definition at line 430 of file frv-linux-tdep.c.

Referenced by frv_linux_iterate_over_regset_sections().

## ◆ frv_linux_sigtramp_frame_unwind

const struct frame_unwind frv_linux_sigtramp_frame_unwind
| static

Initial value:
=
{
SIGTRAMP_FRAME,
default_frame_unwind_stop_reason,
frv_linux_sigtramp_frame_this_id,
frv_linux_sigtramp_frame_prev_register,
NULL,
frv_linux_sigtramp_frame_sniffer
}
SIGTRAMP_FRAME
Definition: frame.h:255
frv_linux_sigtramp_frame_prev_register
static struct value * frv_linux_sigtramp_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: frv-linux-tdep.c:309
frv_linux_sigtramp_frame_this_id
static void frv_linux_sigtramp_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: frv-linux-tdep.c:299
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
frv_linux_sigtramp_frame_sniffer
static int frv_linux_sigtramp_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: frv-linux-tdep.c:319

Definition at line 334 of file frv-linux-tdep.c.

Referenced by frv_linux_init_abi().