GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
sh-linux-tdep.c File Reference
#include "defs.h"
#include "osabi.h"
#include "solib-svr4.h"
#include "symtab.h"
#include "trad-frame.h"
#include "tramp-frame.h"
#include "glibc-tdep.h"
#include "sh-tdep.h"
#include "linux-tdep.h"
#include "gdbarch.h"

Go to the source code of this file.

Macros

#define REGSx16(base)
 
#define SH_MOVW   0x9305
 
#define SH_TRAP   0xc300
 
#define SH_OR_R0_R0   0x200b
 
#define SH_NR_SIGRETURN   0x0077
 
#define SH_NR_RT_SIGRETURN   0x00ad
 

Functions

static void sh_linux_sigtramp_cache (frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func, int regs_offset)
 
static void sh_linux_sigreturn_init (const struct tramp_frame *self, frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
 
static void sh_linux_rt_sigreturn_init (const struct tramp_frame *self, frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
 
static void sh_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
void _initialize_sh_linux_tdep ()
 

Variables

static const struct sh_corefile_regmap gregs_table []
 
static const struct sh_corefile_regmap fpregs_table []
 
static struct tramp_frame sh_linux_sigreturn_tramp_frame
 
static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame
 

Macro Definition Documentation

◆ REGSx16

#define REGSx16 ( base)
Value:
{(base), 0}, \
{(base) + 1, 4}, \
{(base) + 2, 8}, \
{(base) + 3, 12}, \
{(base) + 4, 16}, \
{(base) + 5, 20}, \
{(base) + 6, 24}, \
{(base) + 7, 28}, \
{(base) + 8, 32}, \
{(base) + 9, 36}, \
{(base) + 10, 40}, \
{(base) + 11, 44}, \
{(base) + 12, 48}, \
{(base) + 13, 52}, \
{(base) + 14, 56}, \
{(base) + 15, 60}

Definition at line 34 of file sh-linux-tdep.c.

◆ SH_MOVW

#define SH_MOVW   0x9305

Definition at line 142 of file sh-linux-tdep.c.

◆ SH_NR_RT_SIGRETURN

#define SH_NR_RT_SIGRETURN   0x00ad

Definition at line 148 of file sh-linux-tdep.c.

◆ SH_NR_SIGRETURN

#define SH_NR_SIGRETURN   0x0077

Definition at line 147 of file sh-linux-tdep.c.

◆ SH_OR_R0_R0

#define SH_OR_R0_R0   0x200b

Definition at line 144 of file sh-linux-tdep.c.

◆ SH_TRAP

#define SH_TRAP   0xc300

Definition at line 143 of file sh-linux-tdep.c.

Function Documentation

◆ _initialize_sh_linux_tdep()

void _initialize_sh_linux_tdep ( )

Definition at line 213 of file sh-linux-tdep.c.

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

◆ sh_linux_init_abi()

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

◆ sh_linux_rt_sigreturn_init()

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

Definition at line 127 of file sh-linux-tdep.c.

References func, and sh_linux_sigtramp_cache().

◆ sh_linux_sigreturn_init()

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

Definition at line 116 of file sh-linux-tdep.c.

References func, and sh_linux_sigtramp_cache().

◆ sh_linux_sigtramp_cache()

static void sh_linux_sigtramp_cache ( frame_info_ptr this_frame,
struct trad_frame_cache * this_cache,
CORE_ADDR func,
int regs_offset )
static

Variable Documentation

◆ fpregs_table

const struct sh_corefile_regmap fpregs_table[]
static
Initial value:
=
{
{FPSCR_REGNUM, 128},
{FPUL_REGNUM, 132},
{-1 , 0}
}
#define REGSx16(base)
@ FR0_REGNUM
Definition sh-tdep.h:44
@ FPSCR_REGNUM
Definition sh-tdep.h:43
@ FPUL_REGNUM
Definition sh-tdep.h:41

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

Referenced by sh_linux_init_abi().

◆ gregs_table

const struct sh_corefile_regmap gregs_table[]
static
Initial value:
=
{
{PC_REGNUM, 64},
{PR_REGNUM, 68},
{SR_REGNUM, 72},
{GBR_REGNUM, 76},
{MACH_REGNUM, 80},
{MACL_REGNUM, 84},
{-1 , 0}
}
@ R0_REGNUM
Definition m32r-tdep.h:34
@ MACL_REGNUM
Definition sh-tdep.h:39
@ SR_REGNUM
Definition sh-tdep.h:40
@ PR_REGNUM
Definition sh-tdep.h:35
@ GBR_REGNUM
Definition sh-tdep.h:36
@ MACH_REGNUM
Definition sh-tdep.h:38
@ PC_REGNUM
Definition sh-tdep.h:34

Definition at line 54 of file sh-linux-tdep.c.

Referenced by sh_linux_init_abi().

◆ sh_linux_rt_sigreturn_tramp_frame

struct tramp_frame sh_linux_rt_sigreturn_tramp_frame
static
Initial value:
= {
2,
{
{ SH_MOVW, 0xffff },
{ SH_TRAP, 0xff00 },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_NR_RT_SIGRETURN, 0xffff },
},
}
@ SIGTRAMP_FRAME
Definition frame.h:198
#define SH_NR_RT_SIGRETURN
static void sh_linux_rt_sigreturn_init(const struct tramp_frame *self, frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)
#define SH_TRAP
#define SH_OR_R0_R0
#define SH_MOVW
#define TRAMP_SENTINEL_INSN
Definition tramp-frame.h:44

Definition at line 167 of file sh-linux-tdep.c.

Referenced by sh_linux_init_abi().

◆ sh_linux_sigreturn_tramp_frame

struct tramp_frame sh_linux_sigreturn_tramp_frame
static
Initial value:
= {
2,
{
{ SH_MOVW, 0xffff },
{ SH_TRAP, 0xff00 },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_OR_R0_R0, 0xffff },
{ SH_NR_SIGRETURN, 0xffff },
},
}
#define SH_NR_SIGRETURN
static void sh_linux_sigreturn_init(const struct tramp_frame *self, frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func)

Definition at line 150 of file sh-linux-tdep.c.

Referenced by sh_linux_init_abi().