GDB (xrefs)
Classes | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/rx-tdep.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "prologue-value.h"
#include "target.h"
#include "regcache.h"
#include "opcode/rx.h"
#include "dis-asm.h"
#include "gdbtypes.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "value.h"
#include "gdbcore.h"
#include "dwarf2-frame.h"
#include "elf/rx.h"
#include "elf-bfd.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  gdbarch_tdep
 
struct  rx_prologue
 
struct  rx_get_opcode_byte_handle
 

Enumerations

enum  {
  RX_SP_REGNUM = 0, RX_R1_REGNUM = 1, RX_R4_REGNUM = 4, RX_FP_REGNUM = 6,
  RX_R15_REGNUM = 15, RX_USP_REGNUM = 16, RX_PSW_REGNUM = 18, RX_PC_REGNUM = 19,
  RX_BPSW_REGNUM = 21, RX_BPC_REGNUM = 22, RX_FPSW_REGNUM = 24, RX_ACC_REGNUM = 25,
  RX_NUM_REGS = 26
}
 
enum  rx_frame_type { RX_FRAME_TYPE_NORMAL, RX_FRAME_TYPE_EXCEPTION, RX_FRAME_TYPE_FAST_INTERRUPT }
 

Functions

static const char * rx_register_name (struct gdbarch *gdbarch, int regnr)
 
static struct typerx_psw_type (struct gdbarch *gdbarch)
 
static struct typerx_fpsw_type (struct gdbarch *gdbarch)
 
static struct typerx_register_type (struct gdbarch *gdbarch, int reg_nr)
 
static void check_for_saved (void *result_untyped, pv_t addr, CORE_ADDR size, pv_t value)
 
static int rx_get_opcode_byte (void *handle)
 
static void rx_analyze_prologue (CORE_ADDR start_pc, CORE_ADDR limit_pc, enum rx_frame_type frame_type, struct rx_prologue *result)
 
static CORE_ADDR rx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static struct rx_prologuerx_analyze_frame_prologue (struct frame_info *this_frame, enum rx_frame_type frame_type, void **this_prologue_cache)
 
static enum rx_frame_type rx_frame_type (struct frame_info *this_frame, void **this_cache)
 
static CORE_ADDR rx_frame_base (struct frame_info *this_frame, void **this_cache)
 
static void rx_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
 
static struct valuerx_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
 
static int normal_frame_p (enum rx_frame_type frame_type)
 
static int exception_frame_p (enum rx_frame_type frame_type)
 
static int rx_frame_sniffer_common (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache, int(*sniff_p)(enum rx_frame_type))
 
static int rx_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
 
static int rx_exception_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
 
static CORE_ADDR rx_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
static CORE_ADDR rx_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
static struct frame_id rx_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
static CORE_ADDR rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
 
static enum return_value_convention rx_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
typedef BP_MANIPULATION (rx_break_insn)
 
static struct gdbarchrx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_rx_tdep (void)
 

Variables

static const struct frame_unwind rx_frame_unwind
 
static const struct frame_unwind rx_exception_unwind
 
constexpr gdb_byte rx_break_insn [] = { 0x00 }
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RX_SP_REGNUM 
RX_R1_REGNUM 
RX_R4_REGNUM 
RX_FP_REGNUM 
RX_R15_REGNUM 
RX_USP_REGNUM 
RX_PSW_REGNUM 
RX_PC_REGNUM 
RX_BPSW_REGNUM 
RX_BPC_REGNUM 
RX_FPSW_REGNUM 
RX_ACC_REGNUM 
RX_NUM_REGS 

Definition at line 42 of file rx-tdep.c.

◆ rx_frame_type

Enumerator
RX_FRAME_TYPE_NORMAL 
RX_FRAME_TYPE_EXCEPTION 
RX_FRAME_TYPE_FAST_INTERRUPT 

Definition at line 60 of file rx-tdep.c.

Function Documentation

◆ _initialize_rx_tdep()

void _initialize_rx_tdep ( void  )

Definition at line 1164 of file rx-tdep.c.

References register_gdbarch_init(), and rx_gdbarch_init().

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( rx_break_insn  )

Definition at line 1050 of file rx-tdep.c.

References RX_PC_REGNUM, and RX_PSW_REGNUM.

◆ check_for_saved()

static void check_for_saved ( void *  result_untyped,
pv_t  addr,
CORE_ADDR  size,
pv_t  value 
)
static

◆ exception_frame_p()

static int exception_frame_p ( enum rx_frame_type  frame_type)
static

Definition at line 668 of file rx-tdep.c.

References RX_FRAME_TYPE_EXCEPTION, and RX_FRAME_TYPE_FAST_INTERRUPT.

Referenced by rx_exception_sniffer().

◆ normal_frame_p()

static int normal_frame_p ( enum rx_frame_type  frame_type)
static

Definition at line 659 of file rx-tdep.c.

References RX_FRAME_TYPE_NORMAL.

Referenced by rx_frame_sniffer().

◆ rx_analyze_frame_prologue()

static struct rx_prologue* rx_analyze_frame_prologue ( struct frame_info this_frame,
enum rx_frame_type  frame_type,
void **  this_prologue_cache 
)
static

◆ rx_analyze_prologue()

static void rx_analyze_prologue ( CORE_ADDR  start_pc,
CORE_ADDR  limit_pc,
enum rx_frame_type  frame_type,
struct rx_prologue result 
)
static

◆ rx_dummy_id()

static struct frame_id rx_dummy_id ( struct gdbarch gdbarch,
struct frame_info this_frame 
)
static

Definition at line 776 of file rx-tdep.c.

References frame_id_build(), get_frame_pc(), get_frame_register_unsigned(), and RX_SP_REGNUM.

Referenced by rx_gdbarch_init().

◆ rx_exception_sniffer()

static int rx_exception_sniffer ( const struct frame_unwind self,
struct frame_info this_frame,
void **  this_cache 
)
static

Definition at line 721 of file rx-tdep.c.

References exception_frame_p(), and rx_frame_sniffer_common().

◆ rx_fpsw_type()

static struct type* rx_fpsw_type ( struct gdbarch gdbarch)
static

◆ rx_frame_base()

static CORE_ADDR rx_frame_base ( struct frame_info this_frame,
void **  this_cache 
)
static

◆ rx_frame_prev_register()

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

◆ rx_frame_sniffer()

static int rx_frame_sniffer ( const struct frame_unwind self,
struct frame_info this_frame,
void **  this_cache 
)
static

Definition at line 710 of file rx-tdep.c.

References normal_frame_p(), and rx_frame_sniffer_common().

◆ rx_frame_sniffer_common()

static int rx_frame_sniffer_common ( const struct frame_unwind self,
struct frame_info this_frame,
void **  this_cache,
int(*)(enum rx_frame_type sniff_p 
)
static

◆ rx_frame_this_id()

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

Definition at line 594 of file rx-tdep.c.

References frame_id_build(), get_frame_func(), and rx_frame_base().

◆ rx_frame_type()

static enum rx_frame_type rx_frame_type ( struct frame_info this_frame,
void **  this_cache 
)
static

◆ rx_gdbarch_init()

static struct gdbarch* rx_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
)
static

◆ rx_get_opcode_byte()

static int rx_get_opcode_byte ( void *  handle)
static

Definition at line 260 of file rx-tdep.c.

References rx_get_opcode_byte_handle::pc, status, and target_read_code().

Referenced by rx_analyze_prologue(), and rx_frame_type().

◆ rx_psw_type()

static struct type* rx_psw_type ( struct gdbarch gdbarch)
static

◆ rx_push_dummy_call()

static CORE_ADDR rx_push_dummy_call ( struct gdbarch gdbarch,
struct value function,
struct regcache regcache,
CORE_ADDR  bp_addr,
int  nargs,
struct value **  args,
CORE_ADDR  sp,
int  struct_return,
CORE_ADDR  struct_addr 
)
static

◆ rx_register_name()

static const char* rx_register_name ( struct gdbarch gdbarch,
int  regnr 
)
static

Definition at line 119 of file rx-tdep.c.

Referenced by rx_gdbarch_init().

◆ rx_register_type()

static struct type* rx_register_type ( struct gdbarch gdbarch,
int  reg_nr 
)
static

◆ rx_return_value()

static enum return_value_convention rx_return_value ( struct gdbarch gdbarch,
struct value function,
struct type valtype,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
)
static

◆ rx_skip_prologue()

static CORE_ADDR rx_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static

◆ rx_unwind_pc()

static CORE_ADDR rx_unwind_pc ( struct gdbarch gdbarch,
struct frame_info this_frame 
)
static

Definition at line 756 of file rx-tdep.c.

References frame_unwind_register_unsigned(), and RX_PC_REGNUM.

Referenced by rx_gdbarch_init().

◆ rx_unwind_sp()

static CORE_ADDR rx_unwind_sp ( struct gdbarch gdbarch,
struct frame_info this_frame 
)
static

Definition at line 766 of file rx-tdep.c.

References frame_unwind_register_unsigned(), and RX_SP_REGNUM.

Referenced by rx_gdbarch_init().

Variable Documentation

◆ rx_break_insn

constexpr gdb_byte rx_break_insn[] = { 0x00 }

Definition at line 1048 of file rx-tdep.c.

◆ rx_exception_unwind

const struct frame_unwind rx_exception_unwind
static
Initial value:
= {
NULL,
}
static struct value * rx_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: rx-tdep.c:604
static void rx_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: rx-tdep.c:594
static int rx_exception_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: rx-tdep.c:721
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 744 of file rx-tdep.c.

Referenced by rx_gdbarch_init().

◆ rx_frame_unwind

const struct frame_unwind rx_frame_unwind
static
Initial value:
= {
NULL,
}
static struct value * rx_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: rx-tdep.c:604
static void rx_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: rx-tdep.c:594
static int rx_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: rx-tdep.c:710
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 732 of file rx-tdep.c.

Referenced by rx_gdbarch_init().