GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/hppa-linux-tdep.c File Reference
`#include "defs.h"`
`#include "gdbcore.h"`
`#include "osabi.h"`
`#include "target.h"`
`#include "objfiles.h"`
`#include "solib-svr4.h"`
`#include "glibc-tdep.h"`
`#include "frame-unwind.h"`
`#include "trad-frame.h"`
`#include "dwarf2-frame.h"`
`#include "value.h"`
`#include "regset.h"`
`#include "regcache.h"`
`#include "hppa-tdep.h"`
`#include "linux-tdep.h"`
`#include "elf/common.h"`

Go to the source code of this file.

## Classes
struct | insn_pattern
struct | hppa_linux_sigtramp_unwind_cache

## Macros
#define | HPPA_MAX_INSN_PATTERN_LEN (4)

## Functions
static int | hppa_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
static void | hppa_linux_target_write_pc (struct regcache *regcache, CORE_ADDR v)
static int | insns_match_pattern (struct gdbarch *gdbarch, CORE_ADDR pc, struct insn_pattern *pattern, unsigned int *insn)
static CORE_ADDR | hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
static struct hppa_linux_sigtramp_unwind_cache * | hppa_linux_sigtramp_frame_unwind_cache (struct frame_info *this_frame, void **this_cache)
static void | hppa_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
static struct value * | hppa_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum)
static int | hppa_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static CORE_ADDR | hppa_linux_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
static void | hppa_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
static void | hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_hppa_linux_tdep (void)

## Variables
static struct insn_pattern | hppa_sigtramp []
static const struct frame_unwind | hppa_linux_sigtramp_frame_unwind
static const struct regcache_map_entry | hppa_linux_gregmap []
static const struct regcache_map_entry | hppa_linux_fpregmap []
static const struct regset | hppa_linux_regset
static const struct regset | hppa_linux_fpregset

## Macro Definition Documentation

## ◆ HPPA_MAX_INSN_PATTERN_LEN

#define HPPA_MAX_INSN_PATTERN_LEN (4)

Definition at line 80 of file hppa-linux-tdep.c.

Referenced by hppa_linux_sigtramp_find_sigcontext().

## Function Documentation

## ◆ _initialize_hppa_linux_tdep()

void _initialize_hppa_linux_tdep | ( | void |  | ) |

Definition at line 530 of file hppa-linux-tdep.c.

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

## ◆ hppa_dwarf_reg_to_regnum()

static int hppa_dwarf_reg_to_regnum | ( | struct gdbarch * | gdbarch,
|  | int | reg
| ) |  |
| static

Definition at line 39 of file hppa-linux-tdep.c.

References HPPA_FP4_REGNUM.

Referenced by hppa_linux_init_abi().

## ◆ hppa_linux_find_global_pointer()

static CORE_ADDR hppa_linux_find_global_pointer | ( | struct gdbarch * | gdbarch,
|  | struct value * | function
| ) |  |
| static

Definition at line 333 of file hppa-linux-tdep.c.

References ALL_OBJFILE_OSECTIONS, extract_signed_integer(), extract_unsigned_integer(), find_pc_section(), gdbarch_byte_order(), in_plt_section(), obj_section_addr, obj_section_endaddr, obj_section::objfile, objfile::sections_end, status, target_read_memory(), obj_section::the_bfd_section, and value_as_address().

Referenced by hppa_linux_init_abi().

## ◆ hppa_linux_init_abi()

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

Definition at line 488 of file hppa-linux-tdep.c.

References gdbarch_tdep::find_global_pointer, floatformats_ieee_double, frame_unwind_append_unwinder(), gdbarch_tdep(), glibc_skip_solib_resolver(), hppa_dwarf_reg_to_regnum(), hppa_in_solib_call_trampoline(), hppa_linux_find_global_pointer(), hppa_linux_iterate_over_regset_sections(), hppa_linux_sigtramp_frame_unwind, hppa_linux_target_write_pc(), hppa_skip_trampoline_code(), gdbarch_tdep::in_solib_call_trampoline, gdbarch_tdep::is_elf, linux_init_abi(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_fetch_tls_load_module_address(), set_gdbarch_iterate_over_regset_sections(), set_gdbarch_long_double_bit(), set_gdbarch_long_double_format(), set_gdbarch_skip_solib_resolver(), set_gdbarch_skip_trampoline_code(), set_gdbarch_write_pc(), set_solib_svr4_fetch_link_map_offsets(), svr4_fetch_objfile_link_map(), and svr4_ilp32_fetch_link_map_offsets().

Referenced by _initialize_hppa_linux_tdep().

## ◆ hppa_linux_iterate_over_regset_sections()

static void hppa_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 475 of file hppa-linux-tdep.c.

References gdbarch_tdep::bytes_per_address, gdbarch_tdep(), hppa_linux_fpregset, and hppa_linux_regset.

Referenced by hppa_linux_init_abi().

## ◆ hppa_linux_sigtramp_find_sigcontext()

static CORE_ADDR hppa_linux_sigtramp_find_sigcontext | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 134 of file hppa-linux-tdep.c.

References align_down(), dummy, HPPA_MAX_INSN_PATTERN_LEN, hppa_sigtramp, and insns_match_pattern().

Referenced by hppa_linux_sigtramp_frame_sniffer(), and hppa_linux_sigtramp_frame_unwind_cache().

## ◆ hppa_linux_sigtramp_frame_prev_register()

static struct value* hppa_linux_sigtramp_frame_prev_register | ( | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache,
|  | int | regnum
| ) |  |
| static

Definition at line 283 of file hppa-linux-tdep.c.

References hppa_frame_prev_register_helper(), hppa_linux_sigtramp_frame_unwind_cache(), regnum, and hppa_linux_sigtramp_unwind_cache::saved_regs.

## ◆ hppa_linux_sigtramp_frame_sniffer()

static int hppa_linux_sigtramp_frame_sniffer | ( | const struct frame_unwind * | self,
|  | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache
| ) |  |
| static

Definition at line 300 of file hppa-linux-tdep.c.

References get_frame_arch(), get_frame_pc(), and hppa_linux_sigtramp_find_sigcontext().

## ◆ hppa_linux_sigtramp_frame_this_id()

static void hppa_linux_sigtramp_frame_this_id | ( | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache,
|  | struct frame_id * | this_id
| ) |  |
| static

Definition at line 273 of file hppa-linux-tdep.c.

References hppa_linux_sigtramp_unwind_cache::base, frame_id_build(), get_frame_pc(), and hppa_linux_sigtramp_frame_unwind_cache().

## ◆ hppa_linux_sigtramp_frame_unwind_cache()

static struct hppa_linux_sigtramp_unwind_cache* hppa_linux_sigtramp_frame_unwind_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 198 of file hppa-linux-tdep.c.

References trad_frame_saved_reg::addr, hppa_linux_sigtramp_unwind_cache::base, FRAME_OBSTACK_ZALLOC, get_frame_arch(), get_frame_pc(), get_frame_register_unsigned(), HPPA_FP0_REGNUM, HPPA_IPSW_REGNUM, hppa_linux_sigtramp_find_sigcontext(), HPPA_PCOQ_HEAD_REGNUM, HPPA_PCOQ_TAIL_REGNUM, HPPA_PCSQ_HEAD_REGNUM, HPPA_PCSQ_TAIL_REGNUM, HPPA_R0_REGNUM, HPPA_SAR_REGNUM, HPPA_SP_REGNUM, hppa_linux_sigtramp_unwind_cache::saved_regs, and trad_frame_alloc_saved_regs().

Referenced by hppa_linux_sigtramp_frame_prev_register(), and hppa_linux_sigtramp_frame_this_id().

## ◆ hppa_linux_target_write_pc()

static void hppa_linux_target_write_pc | ( | struct regcache * | regcache,
|  | CORE_ADDR | v
| ) |  |
| static

Definition at line 53 of file hppa-linux-tdep.c.

References HPPA_PCOQ_HEAD_REGNUM, HPPA_PCOQ_TAIL_REGNUM, and regcache_cooked_write_unsigned().

Referenced by hppa_linux_init_abi().

## ◆ insns_match_pattern()

static int insns_match_pattern | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | struct insn_pattern * | pattern,
|  | unsigned int * | insn
| ) |  |
| static

Definition at line 90 of file hppa-linux-tdep.c.

References insn_pattern::data, extract_unsigned_integer(), gdbarch_byte_order(), insn_pattern::mask, and target_read_memory().

Referenced by hppa_linux_sigtramp_find_sigcontext().

## Variable Documentation

## ◆ hppa_linux_fpregmap

const struct regcache_map_entry hppa_linux_fpregmap[]
| static

Initial value:
=
{
{ 64, HPPA_FP0_REGNUM, 4 },
{ 0 }
}
HPPA_FP0_REGNUM
Definition: hppa-tdep.h:70

Definition at line 453 of file hppa-linux-tdep.c.

## ◆ hppa_linux_fpregset

const struct regset hppa_linux_fpregset
| static

Initial value:
=
{
hppa_linux_fpregmap,
regcache_supply_regset, regcache_collect_regset
}
hppa_linux_fpregmap
static const struct regcache_map_entry hppa_linux_fpregmap[]
Definition: hppa-linux-tdep.c:453
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 468 of file hppa-linux-tdep.c.

Referenced by hppa_linux_iterate_over_regset_sections().

## ◆ hppa_linux_gregmap

const struct regcache_map_entry hppa_linux_gregmap[]
| static

Initial value:
=
{
{ 32, HPPA_R0_REGNUM },
{ 1, HPPA_SR4_REGNUM+1 },
{ 1, HPPA_SR4_REGNUM+2 },
{ 1, HPPA_SR4_REGNUM+3 },
{ 1, HPPA_SR4_REGNUM+4 },
{ 1, HPPA_SR4_REGNUM },
{ 1, HPPA_SR4_REGNUM+5 },
{ 1, HPPA_SR4_REGNUM+6 },
{ 1, HPPA_SR4_REGNUM+7 },
{ 1, HPPA_PCOQ_HEAD_REGNUM },
{ 1, HPPA_PCOQ_TAIL_REGNUM },
{ 1, HPPA_PCSQ_HEAD_REGNUM },
{ 1, HPPA_PCSQ_TAIL_REGNUM },
{ 1, HPPA_SAR_REGNUM },
{ 1, HPPA_IIR_REGNUM },
{ 1, HPPA_ISR_REGNUM },
{ 1, HPPA_IOR_REGNUM },
{ 1, HPPA_IPSW_REGNUM },
{ 1, HPPA_RCR_REGNUM },
{ 8, HPPA_TR0_REGNUM },
{ 4, HPPA_PID0_REGNUM },
{ 1, HPPA_CCR_REGNUM },
{ 1, HPPA_EIEM_REGNUM },
{ 0 }
}
HPPA_EIEM_REGNUM
Definition: hppa-tdep.h:48
HPPA_CCR_REGNUM
Definition: hppa-tdep.h:65
HPPA_ISR_REGNUM
Definition: hppa-tdep.h:50
HPPA_PCOQ_TAIL_REGNUM
Definition: hppa-tdep.h:46
HPPA_RCR_REGNUM
Definition: hppa-tdep.h:60
HPPA_PCOQ_HEAD_REGNUM
Definition: hppa-tdep.h:44
HPPA_IOR_REGNUM
Definition: hppa-tdep.h:51
HPPA_R0_REGNUM
Definition: hppa-tdep.h:31
HPPA_SAR_REGNUM
Definition: hppa-tdep.h:42
HPPA_TR0_REGNUM
Definition: hppa-tdep.h:66
HPPA_PCSQ_HEAD_REGNUM
Definition: hppa-tdep.h:45
HPPA_IPSW_REGNUM
Definition: hppa-tdep.h:43
HPPA_SR4_REGNUM
Definition: hppa-tdep.h:52
HPPA_IIR_REGNUM
Definition: hppa-tdep.h:49
HPPA_PCSQ_TAIL_REGNUM
Definition: hppa-tdep.h:47
HPPA_PID0_REGNUM
Definition: hppa-tdep.h:61

Definition at line 425 of file hppa-linux-tdep.c.

## ◆ hppa_linux_regset

const struct regset hppa_linux_regset
| static

Initial value:
=
{
hppa_linux_gregmap,
regcache_supply_regset, regcache_collect_regset
}
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
hppa_linux_gregmap
static const struct regcache_map_entry hppa_linux_gregmap[]
Definition: hppa-linux-tdep.c:425

Definition at line 462 of file hppa-linux-tdep.c.

Referenced by hppa_linux_iterate_over_regset_sections().

## ◆ hppa_linux_sigtramp_frame_unwind

const struct frame_unwind hppa_linux_sigtramp_frame_unwind
| static

Initial value:
= {
SIGTRAMP_FRAME,
default_frame_unwind_stop_reason,
hppa_linux_sigtramp_frame_this_id,
hppa_linux_sigtramp_frame_prev_register,
NULL,
hppa_linux_sigtramp_frame_sniffer
}
hppa_linux_sigtramp_frame_prev_register
static struct value * hppa_linux_sigtramp_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
Definition: hppa-linux-tdep.c:283
hppa_linux_sigtramp_frame_sniffer
static int hppa_linux_sigtramp_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: hppa-linux-tdep.c:300
SIGTRAMP_FRAME
Definition: frame.h:255
hppa_linux_sigtramp_frame_this_id
static void hppa_linux_sigtramp_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition: hppa-linux-tdep.c:273
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 313 of file hppa-linux-tdep.c.

Referenced by hppa_linux_init_abi().

## ◆ hppa_sigtramp

struct insn_pattern hppa_sigtramp[]
| static

Initial value:
= {
{ 0x34190000, 0xfffffffd },
{ 0x3414015a, 0xffffffff },
{ 0xe4008200, 0xffffffff },
{ 0x08000240, 0xffffffff },
{ 0, 0 }
}

Definition at line 68 of file hppa-linux-tdep.c.

Referenced by hppa_linux_sigtramp_find_sigcontext().