GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
loongarch-linux-tdep.c File Reference
#include "defs.h"
#include "glibc-tdep.h"
#include "inferior.h"
#include "linux-tdep.h"
#include "loongarch-tdep.h"
#include "solib-svr4.h"
#include "target-descriptions.h"
#include "trad-frame.h"
#include "tramp-frame.h"

Go to the source code of this file.

Macros

#define LOONGARCH_RT_SIGFRAME_UCONTEXT_OFFSET   128
 
#define LOONGARCH_UCONTEXT_SIGCONTEXT_OFFSET   176
 
#define LOONGARCH_INST_LIW_A7_RT_SIGRETURN   0x03822c0b
 
#define LOONGARCH_INST_SYSCALL   0x002b0000
 
#define LOONGARCH_NR_rt_sigreturn   139
 

Functions

static void loongarch_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gprs, size_t len)
 
static void loongarch_fill_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gprs, size_t len)
 
static void loongarch_supply_fpregset (const struct regset *r, struct regcache *regcache, int regnum, const void *fprs, size_t len)
 
static void loongarch_fill_fpregset (const struct regset *r, const struct regcache *regcache, int regnum, void *fprs, size_t len)
 
static void loongarch_linux_rt_sigframe_init (const struct tramp_frame *self, frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
 
static void loongarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
 
static CORE_ADDR loongarch_linux_syscall_next_pc (frame_info_ptr frame)
 
static void loongarch_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
void _initialize_loongarch_linux_tdep ()
 

Variables

const struct regset loongarch_gregset
 
const struct regset loongarch_fpregset
 
static const struct tramp_frame loongarch_linux_rt_sigframe
 

Macro Definition Documentation

◆ LOONGARCH_INST_LIW_A7_RT_SIGRETURN

#define LOONGARCH_INST_LIW_A7_RT_SIGRETURN   0x03822c0b

Definition at line 241 of file loongarch-linux-tdep.c.

◆ LOONGARCH_INST_SYSCALL

#define LOONGARCH_INST_SYSCALL   0x002b0000

Definition at line 243 of file loongarch-linux-tdep.c.

◆ LOONGARCH_NR_rt_sigreturn

#define LOONGARCH_NR_rt_sigreturn   139

Definition at line 281 of file loongarch-linux-tdep.c.

Referenced by loongarch_linux_syscall_next_pc().

◆ LOONGARCH_RT_SIGFRAME_UCONTEXT_OFFSET

#define LOONGARCH_RT_SIGFRAME_UCONTEXT_OFFSET   128

Definition at line 220 of file loongarch-linux-tdep.c.

Referenced by loongarch_linux_rt_sigframe_init().

◆ LOONGARCH_UCONTEXT_SIGCONTEXT_OFFSET

#define LOONGARCH_UCONTEXT_SIGCONTEXT_OFFSET   176

Definition at line 221 of file loongarch-linux-tdep.c.

Referenced by loongarch_linux_rt_sigframe_init().

Function Documentation

◆ _initialize_loongarch_linux_tdep()

void _initialize_loongarch_linux_tdep ( )

◆ loongarch_fill_fpregset()

static void loongarch_fill_fpregset ( const struct regset * r,
const struct regcache * regcache,
int regnum,
void * fprs,
size_t len )
static

◆ loongarch_fill_gregset()

static void loongarch_fill_gregset ( const struct regset * regset,
const struct regcache * regcache,
int regnum,
void * gprs,
size_t len )
static

◆ loongarch_iterate_over_regset_sections()

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

◆ loongarch_linux_init_abi()

static void loongarch_linux_init_abi ( struct gdbarch_info info,
struct gdbarch * gdbarch )
static

◆ loongarch_linux_rt_sigframe_init()

static void loongarch_linux_rt_sigframe_init ( const struct tramp_frame * self,
frame_info_ptr this_frame,
struct trad_frame_cache * this_cache,
CORE_ADDR func )
static

◆ loongarch_linux_syscall_next_pc()

static CORE_ADDR loongarch_linux_syscall_next_pc ( frame_info_ptr frame)
static

◆ loongarch_supply_fpregset()

static void loongarch_supply_fpregset ( const struct regset * r,
struct regcache * regcache,
int regnum,
const void * fprs,
size_t len )
static

◆ loongarch_supply_gregset()

static void loongarch_supply_gregset ( const struct regset * regset,
struct regcache * regcache,
int regnum,
const void * gprs,
size_t len )
static

Variable Documentation

◆ loongarch_fpregset

const struct regset loongarch_fpregset
Initial value:
=
{
nullptr,
}
static void loongarch_fill_fpregset(const struct regset *r, const struct regcache *regcache, int regnum, void *fprs, size_t len)
static void loongarch_supply_fpregset(const struct regset *r, struct regcache *regcache, int regnum, const void *fprs, size_t len)

Definition at line 211 of file loongarch-linux-tdep.c.

Referenced by fetch_fpregs_from_thread(), fill_fpregset(), loongarch_iterate_over_regset_sections(), store_fpregs_to_thread(), and supply_fpregset().

◆ loongarch_gregset

const struct regset loongarch_gregset
Initial value:
=
{
nullptr,
}
static void loongarch_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gprs, size_t len)
static void loongarch_fill_gregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gprs, size_t len)

Definition at line 111 of file loongarch-linux-tdep.c.

Referenced by fetch_gregs_from_thread(), fill_gregset(), loongarch_iterate_over_regset_sections(), store_gregs_to_thread(), and supply_gregset().

◆ loongarch_linux_rt_sigframe

const struct tramp_frame loongarch_linux_rt_sigframe
static
Initial value:
=
{
4,
{
{ LOONGARCH_INST_SYSCALL, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
nullptr
}
@ SIGTRAMP_FRAME
Definition frame.h:198
#define LOONGARCH_INST_SYSCALL
#define LOONGARCH_INST_LIW_A7_RT_SIGRETURN
static void loongarch_linux_rt_sigframe_init(const struct tramp_frame *self, frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
#define TRAMP_SENTINEL_INSN
Definition tramp-frame.h:44

Definition at line 245 of file loongarch-linux-tdep.c.

Referenced by loongarch_linux_init_abi().