GDB (xrefs)

Macros | Functions | Variables
/tmp/gdb-8.1/gdb/i386-obsd-tdep.c File Reference
`#include "defs.h"`
`#include "arch-utils.h"`
`#include "frame.h"`
`#include "frame-unwind.h"`
`#include "gdbcore.h"`
`#include "regcache.h"`
`#include "regset.h"`
`#include "symtab.h"`
`#include "objfiles.h"`
`#include "osabi.h"`
`#include "target.h"`
`#include "trad-frame.h"`
`#include "obsd-tdep.h"`
`#include "i386-tdep.h"`
`#include "i387-tdep.h"`
`#include "solib-svr4.h"`
`#include "bsd-uthread.h"`

Go to the source code of this file.

## Macros
#define | I386OBSD_UTHREAD_ESP_OFFSET 176

## Functions
static int | i386obsd_sigtramp_p (struct frame_info *this_frame)
static void | i386obsd_supply_uthread (struct regcache *regcache, int regnum, CORE_ADDR addr)
static void | i386obsd_collect_uthread (const struct regcache *regcache, int regnum, CORE_ADDR addr)
static struct trad_frame_cache * | i386obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
static void | i386obsd_trapframe_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | i386obsd_trapframe_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static int | i386obsd_trapframe_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static void | i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_i386obsd_tdep (void)

## Variables
static const int | i386obsd_page_size = 4096
static const int | i386obsd_sigreturn_offset []
static int | i386obsd_r_reg_offset []
CORE_ADDR | i386obsd_sigtramp_start_addr = 0xbfbfdf20
CORE_ADDR | i386obsd_sigtramp_end_addr = 0xbfbfdff0
int | i386obsd_sc_reg_offset [I386_NUM_GREGS]
static int | i386obsd_uthread_reg_offset []
static int | i386obsd_tf_reg_offset []
static const struct frame_unwind | i386obsd_trapframe_unwind

## Macro Definition Documentation

## ◆ I386OBSD_UTHREAD_ESP_OFFSET

#define I386OBSD_UTHREAD_ESP_OFFSET 176

Definition at line 187 of file i386-obsd-tdep.c.

Referenced by i386obsd_collect_uthread(), and i386obsd_supply_uthread().

## Function Documentation

## ◆ _initialize_i386obsd_tdep()

void _initialize_i386obsd_tdep | ( | void |  | ) |

Definition at line 447 of file i386-obsd-tdep.c.

References GDB_OSABI_OPENBSD, gdbarch_register_osabi(), and i386obsd_init_abi().

## ◆ i386obsd_collect_uthread()

static void i386obsd_collect_uthread | ( | const struct regcache * | regcache,
|  | int | regnum,
|  | CORE_ADDR | addr
| ) |  |
| static

Definition at line 234 of file i386-obsd-tdep.c.

References regcache::arch(), gdbarch::byte_order, extract_unsigned_integer(), gdb_assert, gdbarch_byte_order(), I386_EIP_REGNUM, I386_ESP_REGNUM, I386OBSD_UTHREAD_ESP_OFFSET, i386obsd_uthread_reg_offset, offset, read_memory_unsigned_integer(), regcache_raw_collect(), regnum, write_memory(), and write_memory_unsigned_integer().

Referenced by i386obsd_init_abi().

## ◆ i386obsd_init_abi()

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

Definition at line 407 of file i386-obsd-tdep.c.

References bsd_uthread_set_collect_uthread(), bsd_uthread_set_supply_uthread(), frame_unwind_prepend_unwinder(), gdbarch_tdep(), gdbarch_tdep::gregset_num_regs, gdbarch_tdep::gregset_reg_offset, i386_elf_init_abi(), i386bsd_init_abi(), i386obsd_collect_uthread(), i386obsd_r_reg_offset, i386obsd_sc_reg_offset, i386obsd_sigtramp_end_addr, i386obsd_sigtramp_p(), i386obsd_sigtramp_start_addr, i386obsd_supply_uthread(), i386obsd_trapframe_unwind, obsd_init_abi(), reg_struct_return, gdbarch_tdep::sc_num_regs, gdbarch_tdep::sc_reg_offset, set_solib_svr4_fetch_link_map_offsets(), gdbarch_tdep::sigtramp_end, gdbarch_tdep::sigtramp_p, gdbarch_tdep::sigtramp_start, gdbarch_tdep::sizeof_gregset, gdbarch_tdep::struct_return, and svr4_ilp32_fetch_link_map_offsets().

Referenced by _initialize_i386obsd_tdep().

## ◆ i386obsd_sigtramp_p()

static int i386obsd_sigtramp_p | ( | struct frame_info * | this_frame | ) |
| static

Definition at line 67 of file i386-obsd-tdep.c.

References find_pc_partial_function(), find_pc_section(), get_frame_pc(), i386obsd_page_size, i386obsd_sigreturn_offset, name, offset, and safe_frame_unwind_memory().

Referenced by i386obsd_init_abi().

## ◆ i386obsd_supply_uthread()

static void i386obsd_supply_uthread | ( | struct regcache * | regcache,
|  | int | regnum,
|  | CORE_ADDR | addr
| ) |  |
| static

Definition at line 190 of file i386-obsd-tdep.c.

References regcache::arch(), gdbarch::byte_order, gdb_assert, gdbarch_byte_order(), I386_EIP_REGNUM, I386_ESP_REGNUM, I386OBSD_UTHREAD_ESP_OFFSET, i386obsd_uthread_reg_offset, offset, read_memory(), read_memory_unsigned_integer(), regcache_raw_supply(), regnum, and store_unsigned_integer().

Referenced by i386obsd_init_abi().

## ◆ i386obsd_trapframe_cache()

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

Definition at line 306 of file i386-obsd-tdep.c.

References gdbarch::byte_order, find_pc_partial_function(), frame_id_build(), func, gdbarch_byte_order(), get_frame_arch(), get_frame_func(), get_frame_register_unsigned(), I386_CS_REGNUM, I386_ESP_REGNUM, I386_SEL_RPL, I386_SEL_UPL, i386obsd_tf_reg_offset, name, outer_frame_id, read_memory_unsigned_integer(), startswith(), trad_frame_cache::this_frame, trad_frame_cache_zalloc(), trad_frame_set_id(), and trad_frame_set_reg_addr().

Referenced by i386obsd_trapframe_prev_register(), and i386obsd_trapframe_this_id().

## ◆ i386obsd_trapframe_prev_register()

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

Definition at line 363 of file i386-obsd-tdep.c.

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

## ◆ i386obsd_trapframe_sniffer()

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

Definition at line 373 of file i386-obsd-tdep.c.

References find_pc_partial_function(), get_frame_pc(), get_frame_register_unsigned(), I386_CS_REGNUM, I386_SEL_RPL, I386_SEL_UPL, name, startswith(), and trad_frame_cache::this_frame.

## ◆ i386obsd_trapframe_this_id()

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

Definition at line 353 of file i386-obsd-tdep.c.

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

## Variable Documentation

## ◆ i386obsd_page_size

const int i386obsd_page_size = 4096
| static

Definition at line 53 of file i386-obsd-tdep.c.

Referenced by i386obsd_sigtramp_p().

## ◆ i386obsd_r_reg_offset

int i386obsd_r_reg_offset[]
| static

Initial value:
=
{
0 * 4,
1 * 4,
2 * 4,
3 * 4,
4 * 4,
5 * 4,
6 * 4,
7 * 4,
8 * 4,
9 * 4,
10 * 4,
11 * 4,
12 * 4,
13 * 4,
14 * 4,
15 * 4
}

Definition at line 117 of file i386-obsd-tdep.c.

Referenced by i386obsd_init_abi().

## ◆ i386obsd_sc_reg_offset

int i386obsd_sc_reg_offset[I386_NUM_GREGS]

Initial value:
=
{
10 * 4,
9 * 4,
8 * 4,
7 * 4,
14 * 4,
6 * 4,
5 * 4,
4 * 4,
11 * 4,
13 * 4,
12 * 4,
15 * 4,
3 * 4,
2 * 4,
1 * 4,
0 * 4
}

Definition at line 144 of file i386-obsd-tdep.c.

Referenced by i386obsd_init_abi().

## ◆ i386obsd_sigreturn_offset

const int i386obsd_sigreturn_offset[]
| static

Initial value:
= {
0x0a,
0x14,
0x3a,
-1
}

Definition at line 56 of file i386-obsd-tdep.c.

Referenced by i386obsd_sigtramp_p().

## ◆ i386obsd_sigtramp_end_addr

CORE_ADDR i386obsd_sigtramp_end_addr = 0xbfbfdff0

Definition at line 141 of file i386-obsd-tdep.c.

Referenced by _initialize_i386obsd_nat(), and i386obsd_init_abi().

## ◆ i386obsd_sigtramp_start_addr

CORE_ADDR i386obsd_sigtramp_start_addr = 0xbfbfdf20

Definition at line 140 of file i386-obsd-tdep.c.

Referenced by _initialize_i386obsd_nat(), and i386obsd_init_abi().

## ◆ i386obsd_tf_reg_offset

int i386obsd_tf_reg_offset[]
| static

Initial value:
=
{
10 * 4,
9 * 4,
8 * 4,
7 * 4,
-1,
6 * 4,
5 * 4,
4 * 4,
13 * 4,
15 * 4,
14 * 4,
-1,
3 * 4,
2 * 4,
0 * 4,
1 * 4
}

Definition at line 285 of file i386-obsd-tdep.c.

Referenced by i386obsd_trapframe_cache().

## ◆ i386obsd_trapframe_unwind

const struct frame_unwind i386obsd_trapframe_unwind
| static

Initial value:
= {
NORMAL_FRAME,
default_frame_unwind_stop_reason,
i386obsd_trapframe_this_id,
i386obsd_trapframe_prev_register,
NULL,
i386obsd_trapframe_sniffer
}
i386obsd_trapframe_sniffer
static int i386obsd_trapframe_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: i386-obsd-tdep.c:373
i386obsd_trapframe_prev_register
static struct value * i386obsd_trapframe_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: i386-obsd-tdep.c:363
NORMAL_FRAME
Definition: frame.h:244
i386obsd_trapframe_this_id
static void i386obsd_trapframe_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: i386-obsd-tdep.c:353
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 393 of file i386-obsd-tdep.c.

Referenced by i386obsd_init_abi().

## ◆ i386obsd_uthread_reg_offset

int i386obsd_uthread_reg_offset[]
| static

Initial value:
=
{
11 * 4,
10 * 4,
9 * 4,
8 * 4,
-1,
6 * 4,
5 * 4,
4 * 4,
12 * 4,
-1,
13 * 4,
-1,
3 * 4,
2 * 4,
1 * 4,
0 * 4
}

Definition at line 165 of file i386-obsd-tdep.c.

Referenced by i386obsd_collect_uthread(), and i386obsd_supply_uthread().