GDB (xrefs)

Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/sparc-linux-tdep.c File Reference
`#include "defs.h"`
`#include "dwarf2-frame.h"`
`#include "frame.h"`
`#include "frame-unwind.h"`
`#include "gdbtypes.h"`
`#include "regset.h"`
`#include "gdbarch.h"`
`#include "gdbcore.h"`
`#include "osabi.h"`
`#include "regcache.h"`
`#include "solib-svr4.h"`
`#include "symtab.h"`
`#include "trad-frame.h"`
`#include "tramp-frame.h"`
`#include "xml-syscall.h"`
`#include "linux-tdep.h"`
`#include "sparc-tdep.h"`

Go to the source code of this file.

## Macros
#define | XML_SYSCALL_FILENAME_SPARC32 "syscalls/sparc-linux.xml"
#define | PSR_SYSCALL 0x00004000

## Enumerations
enum | { SPARC_LINUX_SIGEMT = 7, SPARC_LINUX_SIGBUS = 10, SPARC_LINUX_SIGSYS = 12, SPARC_LINUX_SIGURG = 16, SPARC_LINUX_SIGSTOP = 17, SPARC_LINUX_SIGTSTP = 18, SPARC_LINUX_SIGCONT = 19, SPARC_LINUX_SIGCHLD = 20, SPARC_LINUX_SIGIO = 23, SPARC_LINUX_SIGPOLL = SPARC_LINUX_SIGIO, SPARC_LINUX_SIGLOST = 29, SPARC_LINUX_SIGPWR = SPARC_LINUX_SIGLOST, SPARC_LINUX_SIGUSR1 = 30, SPARC_LINUX_SIGUSR2 = 31 }

## Functions
static void | sparc32_linux_sigframe_init (const struct tramp_frame *self, struct frame_info *this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
static CORE_ADDR | sparc32_linux_step_trap (struct frame_info *frame, unsigned long insn)
static void | sparc32_linux_supply_core_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
static void | sparc32_linux_collect_core_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
static void | sparc32_linux_supply_core_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
static void | sparc32_linux_collect_core_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len)
static void | sparc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
static LONGEST | sparc32_linux_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
static enum gdb_signal | sparc32_linux_gdb_signal_from_target (struct gdbarch *gdbarch, int signal)
static int | sparc32_linux_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
static void | sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_sparc_linux_tdep (void)

## Variables
static const struct tramp_frame | sparc32_linux_sigframe
static const struct tramp_frame | sparc32_linux_rt_sigframe
const struct sparc_gregmap | sparc32_linux_core_gregmap
static const struct regset | sparc32_linux_gregset
static const struct regset | sparc32_linux_fpregset

## Macro Definition Documentation

## ◆ PSR_SYSCALL

#define PSR_SYSCALL 0x00004000

Definition at line 251 of file sparc-linux-tdep.c.

Referenced by sparc_linux_write_pc().

## ◆ XML_SYSCALL_FILENAME_SPARC32

#define XML_SYSCALL_FILENAME_SPARC32 "syscalls/sparc-linux.xml"

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

Referenced by sparc32_linux_init_abi().

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
SPARC_LINUX_SIGEMT |
SPARC_LINUX_SIGBUS |
SPARC_LINUX_SIGSYS |
SPARC_LINUX_SIGURG |
SPARC_LINUX_SIGSTOP |
SPARC_LINUX_SIGTSTP |
SPARC_LINUX_SIGCONT |
SPARC_LINUX_SIGCHLD |
SPARC_LINUX_SIGIO |
SPARC_LINUX_SIGPOLL |
SPARC_LINUX_SIGLOST |
SPARC_LINUX_SIGPWR |
SPARC_LINUX_SIGUSR1 |
SPARC_LINUX_SIGUSR2 |

Definition at line 100 of file sparc-linux-tdep.c.

## Function Documentation

## ◆ _initialize_sparc_linux_tdep()

void _initialize_sparc_linux_tdep | ( | void |  | ) |

Definition at line 469 of file sparc-linux-tdep.c.

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

## ◆ sparc32_linux_collect_core_fpregset()

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

Definition at line 242 of file sparc-linux-tdep.c.

References regnum, sparc32_bsd_fpregmap, and sparc32_collect_fpregset().

## ◆ sparc32_linux_collect_core_gregset()

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

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

References regnum, sparc32_collect_gregset(), and sparc32_linux_core_gregmap.

## ◆ sparc32_linux_gdb_signal_from_target()

static enum gdb_signal sparc32_linux_gdb_signal_from_target | ( | struct gdbarch * | gdbarch,
|  | int | signal
| ) |  |
| static

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

References linux_gdb_signal_from_target(), SPARC_LINUX_SIGBUS, SPARC_LINUX_SIGCHLD, SPARC_LINUX_SIGCONT, SPARC_LINUX_SIGEMT, SPARC_LINUX_SIGIO, SPARC_LINUX_SIGLOST, SPARC_LINUX_SIGSTOP, SPARC_LINUX_SIGSYS, SPARC_LINUX_SIGTSTP, SPARC_LINUX_SIGURG, SPARC_LINUX_SIGUSR1, and SPARC_LINUX_SIGUSR2.

Referenced by sparc32_linux_init_abi().

## ◆ sparc32_linux_gdb_signal_to_target()

static int sparc32_linux_gdb_signal_to_target | ( | struct gdbarch * | gdbarch,
|  | enum gdb_signal | signal
| ) |  |
| static

Definition at line 353 of file sparc-linux-tdep.c.

References linux_gdb_signal_to_target(), SPARC_LINUX_SIGBUS, SPARC_LINUX_SIGCHLD, SPARC_LINUX_SIGCONT, SPARC_LINUX_SIGEMT, SPARC_LINUX_SIGIO, SPARC_LINUX_SIGLOST, SPARC_LINUX_SIGPOLL, SPARC_LINUX_SIGPWR, SPARC_LINUX_SIGSTOP, SPARC_LINUX_SIGSYS, SPARC_LINUX_SIGTSTP, SPARC_LINUX_SIGURG, SPARC_LINUX_SIGUSR1, and SPARC_LINUX_SIGUSR2.

Referenced by sparc32_linux_init_abi().

## ◆ sparc32_linux_get_syscall_number()

static LONGEST sparc32_linux_get_syscall_number | ( | struct gdbarch * | gdbarch,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 276 of file sparc-linux-tdep.c.

References extract_signed_integer(), gdbarch_byte_order(), get_thread_regcache(), regcache::ptid(), regcache_cooked_read(), and SPARC_G1_REGNUM.

Referenced by sparc32_linux_init_abi().

## ◆ sparc32_linux_init_abi()

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

Definition at line 421 of file sparc-linux-tdep.c.

References dwarf2_append_unwinders(), find_solib_trampoline_target(), gdbarch_tdep::fpregset, gdbarch_tdep(), gdbarch_tdep::gregset, linux_init_abi(), gdbarch_tdep::plt_entry_size, set_gdbarch_fetch_tls_load_module_address(), set_gdbarch_gdb_signal_from_target(), set_gdbarch_gdb_signal_to_target(), set_gdbarch_get_syscall_number(), set_gdbarch_skip_trampoline_code(), set_gdbarch_write_pc(), set_solib_svr4_fetch_link_map_offsets(), set_xml_syscall_file_name(), gdbarch_tdep::sizeof_fpregset, gdbarch_tdep::sizeof_gregset, sparc32_linux_fpregset, sparc32_linux_gdb_signal_from_target(), sparc32_linux_gdb_signal_to_target(), sparc32_linux_get_syscall_number(), sparc32_linux_gregset, sparc32_linux_rt_sigframe, sparc32_linux_sigframe, sparc32_linux_step_trap(), sparc_linux_write_pc(), gdbarch_tdep::step_trap, svr4_fetch_objfile_link_map(), svr4_ilp32_fetch_link_map_offsets(), tramp_frame_prepend_unwinder(), and XML_SYSCALL_FILENAME_SPARC32.

Referenced by _initialize_sparc_linux_tdep().

## ◆ sparc32_linux_sigframe_init()

static void sparc32_linux_sigframe_init | ( | const struct tramp_frame * | self,
|  | struct frame_info * | this_frame,
|  | struct trad_frame_cache * | this_cache,
|  | CORE_ADDR | func
| ) |  |
| static

Definition at line 119 of file sparc-linux-tdep.c.

References frame_id_build(), func, get_frame_memory_unsigned(), get_frame_register_unsigned(), regnum, sparc32_linux_rt_sigframe, SPARC32_NPC_REGNUM, SPARC32_PC_REGNUM, SPARC32_PSR_REGNUM, SPARC32_Y_REGNUM, SPARC_G0_REGNUM, SPARC_G1_REGNUM, SPARC_I7_REGNUM, SPARC_L0_REGNUM, SPARC_O1_REGNUM, SPARC_O7_REGNUM, SPARC_SP_REGNUM, trad_frame_set_id(), and trad_frame_set_reg_addr().

## ◆ sparc32_linux_step_trap()

static CORE_ADDR sparc32_linux_step_trap | ( | struct frame_info * | frame,
|  | unsigned long | insn
| ) |  |
| static

Definition at line 162 of file sparc-linux-tdep.c.

References gdbarch::byte_order, gdbarch_byte_order(), get_frame_arch(), get_frame_register_unsigned(), tramp_frame::insn, read_memory_unsigned_integer(), SPARC_G1_REGNUM, and SPARC_SP_REGNUM.

Referenced by sparc32_linux_init_abi().

## ◆ sparc32_linux_supply_core_fpregset()

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

Definition at line 234 of file sparc-linux-tdep.c.

References regnum, sparc32_bsd_fpregmap, and sparc32_supply_fpregset().

## ◆ sparc32_linux_supply_core_gregset()

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

Definition at line 216 of file sparc-linux-tdep.c.

References regnum, sparc32_linux_core_gregmap, and sparc32_supply_gregset().

## ◆ sparc_linux_write_pc()

static void sparc_linux_write_pc | ( | struct regcache * | regcache,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 254 of file sparc-linux-tdep.c.

References regcache::arch(), gdbarch_tdep(), gdbarch_tdep::npc_regnum, gdbarch_tdep::pc, gdbarch_tdep::pc_regnum, PSR_SYSCALL, regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), and SPARC32_PSR_REGNUM.

Referenced by sparc32_linux_init_abi().

## Variable Documentation

## ◆ sparc32_linux_core_gregmap

const struct sparc_gregmap sparc32_linux_core_gregmap

Initial value:
=
{
32 * 4,
33 * 4,
34 * 4,
35 * 4,
-1,
-1,
1 * 4,
16 * 4,
4,
}

Definition at line 201 of file sparc-linux-tdep.c.

Referenced by sparc32_linux_collect_core_gregset(), and sparc32_linux_supply_core_gregset().

## ◆ sparc32_linux_fpregset

const struct regset sparc32_linux_fpregset
| static

Initial value:
=
{
NULL,
sparc32_linux_supply_core_fpregset,
sparc32_linux_collect_core_fpregset
}
sparc32_linux_supply_core_fpregset
static void sparc32_linux_supply_core_fpregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
Definition: sparc-linux-tdep.c:234
sparc32_linux_collect_core_fpregset
static void sparc32_linux_collect_core_fpregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len)
Definition: sparc-linux-tdep.c:242

Definition at line 413 of file sparc-linux-tdep.c.

Referenced by sparc32_linux_init_abi().

## ◆ sparc32_linux_gregset

const struct regset sparc32_linux_gregset
| static

Initial value:
=
{
NULL,
sparc32_linux_supply_core_gregset,
sparc32_linux_collect_core_gregset
}
sparc32_linux_collect_core_gregset
static void sparc32_linux_collect_core_gregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
Definition: sparc-linux-tdep.c:225
sparc32_linux_supply_core_gregset
static void sparc32_linux_supply_core_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: sparc-linux-tdep.c:216

Definition at line 406 of file sparc-linux-tdep.c.

Referenced by sparc32_linux_init_abi().

## ◆ sparc32_linux_rt_sigframe

const struct tramp_frame sparc32_linux_rt_sigframe
| static

Initial value:
=
{
SIGTRAMP_FRAME,
4,
{
{ 0x82102065, -1 },
{ 0x91d02010, -1 },
{ TRAMP_SENTINEL_INSN, -1 }
},
sparc32_linux_sigframe_init
}
TRAMP_SENTINEL_INSN
#define TRAMP_SENTINEL_INSN
Definition: tramp-frame.h:44
SIGTRAMP_FRAME
Definition: frame.h:255
sparc32_linux_sigframe_init
static void sparc32_linux_sigframe_init(const struct tramp_frame *self, struct frame_info *this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
Definition: sparc-linux-tdep.c:119

Definition at line 81 of file sparc-linux-tdep.c.

Referenced by sparc32_linux_init_abi(), and sparc32_linux_sigframe_init().

## ◆ sparc32_linux_sigframe

const struct tramp_frame sparc32_linux_sigframe
| static

Initial value:
=
{
SIGTRAMP_FRAME,
4,
{
{ 0x821020d8, -1 },
{ 0x91d02010, -1 },
{ TRAMP_SENTINEL_INSN, -1 }
},
sparc32_linux_sigframe_init
}
TRAMP_SENTINEL_INSN
#define TRAMP_SENTINEL_INSN
Definition: tramp-frame.h:44
SIGTRAMP_FRAME
Definition: frame.h:255
sparc32_linux_sigframe_init
static void sparc32_linux_sigframe_init(const struct tramp_frame *self, struct frame_info *this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
Definition: sparc-linux-tdep.c:119

Definition at line 66 of file sparc-linux-tdep.c.

Referenced by sparc32_linux_init_abi().