GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
m68k-linux-tdep.c File Reference
#include "defs.h"
#include "gdbcore.h"
#include "frame.h"
#include "target.h"
#include "gdbtypes.h"
#include "osabi.h"
#include "regcache.h"
#include "objfiles.h"
#include "symtab.h"
#include "m68k-tdep.h"
#include "trad-frame.h"
#include "frame-unwind.h"
#include "glibc-tdep.h"
#include "solib-svr4.h"
#include "auxv.h"
#include "observable.h"
#include "elf/common.h"
#include "linux-tdep.h"
#include "regset.h"

Go to the source code of this file.

Classes

struct  m68k_linux_sigtramp_info
 

Macros

#define M68K_LINUX_JB_ELEMENT_SIZE   4
 
#define M68K_LINUX_JB_PC   7
 
#define IS_SIGTRAMP(insn1, insn2)
 
#define IS_RT_SIGTRAMP(insn1, insn2)
 
#define M68K_LINUX_GREGS_SIZE   (20 * 4)
 
#define M68K_LINUX_FPREGS_SIZE   (27 * 4)
 

Functions

static int m68k_linux_pc_in_sigtramp (frame_info_ptr this_frame)
 
static void m68k_linux_inferior_created (inferior *inf)
 
static struct m68k_linux_sigtramp_info m68k_linux_get_sigtramp_info (frame_info_ptr this_frame)
 
static struct trad_frame_cachem68k_linux_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
 
static void m68k_linux_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
 
static struct valuem68k_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum)
 
static int m68k_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
 
static void m68k_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
 
static void m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
void _initialize_m68k_linux_tdep ()
 

Variables

static int m68k_linux_sigcontext_reg_offset [M68K_NUM_REGS]
 
static int m68k_uclinux_sigcontext_reg_offset [M68K_NUM_REGS]
 
static int m68k_linux_ucontext_reg_offset [M68K_NUM_REGS]
 
static int target_is_uclinux
 
static const struct frame_unwind m68k_linux_sigtramp_frame_unwind
 
static const struct regcache_map_entry m68k_linux_gregmap []
 
static const struct regcache_map_entry m68k_linux_fpregmap []
 
static const struct regset m68k_linux_gregset
 
static const struct regset m68k_linux_fpregset
 

Macro Definition Documentation

◆ IS_RT_SIGTRAMP

#define IS_RT_SIGTRAMP ( insn1,
insn2 )
Value:
(/* movel #173,d0; trap #0 */ \
(insn1 == 0x203c0000 && insn2 == 0x00ad4e40) \
/* moveq #82,d0; notb d0; trap #0 */ \
|| (insn1 == 0x70524600 && (insn2 >> 16) == 0x4e40))

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

Referenced by m68k_linux_pc_in_sigtramp().

◆ IS_SIGTRAMP

#define IS_SIGTRAMP ( insn1,
insn2 )
Value:
(/* addaw #20,sp; moveq #119,d0; trap #0 */ \
(insn1 == 0xdefc0014 && insn2 == 0x70774e40) \
/* moveq #119,d0; trap #0 */ \
|| insn1 == 0x70774e40)

Definition at line 47 of file m68k-linux-tdep.c.

Referenced by m68k_linux_pc_in_sigtramp().

◆ M68K_LINUX_FPREGS_SIZE

#define M68K_LINUX_FPREGS_SIZE   (27 * 4)

Definition at line 354 of file m68k-linux-tdep.c.

Referenced by m68k_linux_iterate_over_regset_sections().

◆ M68K_LINUX_GREGS_SIZE

#define M68K_LINUX_GREGS_SIZE   (20 * 4)

Definition at line 343 of file m68k-linux-tdep.c.

Referenced by m68k_linux_iterate_over_regset_sections().

◆ M68K_LINUX_JB_ELEMENT_SIZE

#define M68K_LINUX_JB_ELEMENT_SIZE   4

Definition at line 42 of file m68k-linux-tdep.c.

Referenced by m68k_linux_init_abi().

◆ M68K_LINUX_JB_PC

#define M68K_LINUX_JB_PC   7

Definition at line 43 of file m68k-linux-tdep.c.

Referenced by m68k_linux_init_abi().

Function Documentation

◆ _initialize_m68k_linux_tdep()

void _initialize_m68k_linux_tdep ( )

◆ m68k_linux_get_sigtramp_info()

static struct m68k_linux_sigtramp_info m68k_linux_get_sigtramp_info ( frame_info_ptr this_frame)
static

◆ m68k_linux_inferior_created()

static void m68k_linux_inferior_created ( inferior * inf)
static

Definition at line 214 of file m68k-linux-tdep.c.

References target_is_uclinux.

Referenced by _initialize_m68k_linux_tdep().

◆ m68k_linux_init_abi()

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

◆ m68k_linux_iterate_over_regset_sections()

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

◆ m68k_linux_pc_in_sigtramp()

static int m68k_linux_pc_in_sigtramp ( frame_info_ptr this_frame)
static

◆ m68k_linux_sigtramp_frame_cache()

static struct trad_frame_cache * m68k_linux_sigtramp_frame_cache ( frame_info_ptr this_frame,
void ** this_cache )
static

◆ m68k_linux_sigtramp_frame_prev_register()

static struct value * m68k_linux_sigtramp_frame_prev_register ( frame_info_ptr this_frame,
void ** this_cache,
int regnum )
static

◆ m68k_linux_sigtramp_frame_sniffer()

static int m68k_linux_sigtramp_frame_sniffer ( const struct frame_unwind * self,
frame_info_ptr this_frame,
void ** this_prologue_cache )
static

Definition at line 310 of file m68k-linux-tdep.c.

References m68k_linux_pc_in_sigtramp(), and trad_frame_cache::this_frame.

◆ m68k_linux_sigtramp_frame_this_id()

static void m68k_linux_sigtramp_frame_this_id ( frame_info_ptr this_frame,
void ** this_cache,
struct frame_id * this_id )
static

Variable Documentation

◆ m68k_linux_fpregmap

const struct regcache_map_entry m68k_linux_fpregmap[]
static
Initial value:
=
{
{ 8, M68K_FP0_REGNUM, 12 },
{ 1, M68K_FPC_REGNUM, 4 },
{ 1, M68K_FPS_REGNUM, 4 },
{ 1, M68K_FPI_REGNUM, 4 },
{ 0 }
}
@ M68K_FP0_REGNUM
Definition m68k-tdep.h:42
@ M68K_FPS_REGNUM
Definition m68k-tdep.h:44
@ M68K_FPI_REGNUM
Definition m68k-tdep.h:45
@ M68K_FPC_REGNUM
Definition m68k-tdep.h:43

Definition at line 345 of file m68k-linux-tdep.c.

◆ m68k_linux_fpregset

const struct regset m68k_linux_fpregset
static
Initial value:
=
{
}
static const struct regcache_map_entry m68k_linux_fpregmap[]
void regcache_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *buf, size_t size)
Definition regcache.c:1273
void regcache_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *buf, size_t size)
Definition regcache.c:1251

Definition at line 364 of file m68k-linux-tdep.c.

Referenced by m68k_linux_iterate_over_regset_sections().

◆ m68k_linux_gregmap

const struct regcache_map_entry m68k_linux_gregmap[]
static
Initial value:
=
{
{ 7, M68K_D1_REGNUM, 4 },
{ 7, M68K_A0_REGNUM, 4 },
{ 1, M68K_D0_REGNUM, 4 },
{ 1, M68K_SP_REGNUM, 4 },
{ 1, REGCACHE_MAP_SKIP, 4 },
{ 1, M68K_PS_REGNUM, 4 },
{ 1, M68K_PC_REGNUM, 4 },
{ 0 }
}
@ M68K_PC_REGNUM
Definition m68k-tdep.h:41
@ M68K_PS_REGNUM
Definition m68k-tdep.h:40
@ M68K_A0_REGNUM
Definition m68k-tdep.h:35
@ M68K_D0_REGNUM
Definition m68k-tdep.h:31
@ M68K_D1_REGNUM
Definition m68k-tdep.h:32
@ M68K_SP_REGNUM
Definition m68k-tdep.h:39
@ REGCACHE_MAP_SKIP
Definition regcache.h:121

Definition at line 330 of file m68k-linux-tdep.c.

◆ m68k_linux_gregset

const struct regset m68k_linux_gregset
static
Initial value:
=
{
}
static const struct regcache_map_entry m68k_linux_gregmap[]

Definition at line 358 of file m68k-linux-tdep.c.

Referenced by m68k_linux_iterate_over_regset_sections().

◆ m68k_linux_sigcontext_reg_offset

int m68k_linux_sigcontext_reg_offset[M68K_NUM_REGS]
static

Definition at line 98 of file m68k-linux-tdep.c.

Referenced by m68k_linux_get_sigtramp_info().

◆ m68k_linux_sigtramp_frame_unwind

const struct frame_unwind m68k_linux_sigtramp_frame_unwind
static
Initial value:
=
{
"m68k linux sigtramp",
NULL,
}
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
@ SIGTRAMP_FRAME
Definition frame.h:198
static void m68k_linux_sigtramp_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static int m68k_linux_sigtramp_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
static struct value * m68k_linux_sigtramp_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)

Definition at line 317 of file m68k-linux-tdep.c.

Referenced by m68k_linux_init_abi().

◆ m68k_linux_ucontext_reg_offset

int m68k_linux_ucontext_reg_offset[M68K_NUM_REGS]
static

Definition at line 165 of file m68k-linux-tdep.c.

Referenced by m68k_linux_get_sigtramp_info().

◆ m68k_uclinux_sigcontext_reg_offset

int m68k_uclinux_sigcontext_reg_offset[M68K_NUM_REGS]
static

Definition at line 131 of file m68k-linux-tdep.c.

Referenced by m68k_linux_get_sigtramp_info().

◆ target_is_uclinux

int target_is_uclinux
static

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

Referenced by m68k_linux_get_sigtramp_info(), and m68k_linux_inferior_created().