GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
m32r-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "value.h"
#include "inferior.h"
#include "symfile.h"
#include "objfiles.h"
#include "osabi.h"
#include "language.h"
#include "arch-utils.h"
#include "regcache.h"
#include "trad-frame.h"
#include "dis-asm.h"
#include "m32r-tdep.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  m32r_unwind_cache
 

Macros

#define M32R_ARG_REGISTER_SIZE   4
 
#define DEFAULT_SEARCH_LIMIT   128
 

Functions

static CORE_ADDR m32r_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
static int m32r_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
 
static int m32r_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
 
static int m32r_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
 
static const gdb_byte * m32r_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 
static const char * m32r_register_name (struct gdbarch *gdbarch, int reg_nr)
 
static struct typem32r_register_type (struct gdbarch *gdbarch, int reg_nr)
 
static void m32r_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 
static int decode_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR scan_limit, CORE_ADDR *pl_endptr, unsigned long *framelength)
 
static CORE_ADDR m32r_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static struct m32r_unwind_cachem32r_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache)
 
static CORE_ADDR m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr)
 
static void m32r_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *dst)
 
static enum return_value_convention m32r_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static void m32r_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valuem32r_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR m32r_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 
static struct gdbarchm32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_m32r_tdep ()
 

Variables

static const char *const m32r_register_names []
 
static const struct frame_unwind m32r_frame_unwind
 
static const struct frame_base m32r_frame_base
 
static gdbarch_init_ftype m32r_gdbarch_init
 

Macro Definition Documentation

◆ DEFAULT_SEARCH_LIMIT

#define DEFAULT_SEARCH_LIMIT   128

Definition at line 452 of file m32r-tdep.c.

Referenced by m32r_skip_prologue().

◆ M32R_ARG_REGISTER_SIZE

#define M32R_ARG_REGISTER_SIZE   4

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

Referenced by m32r_push_dummy_call().

Function Documentation

◆ _initialize_m32r_tdep()

void _initialize_m32r_tdep ( )

Definition at line 912 of file m32r-tdep.c.

References gdbarch_register(), and m32r_gdbarch_init.

◆ decode_prologue()

static int decode_prologue ( struct gdbarch * gdbarch,
CORE_ADDR start_pc,
CORE_ADDR scan_limit,
CORE_ADDR * pl_endptr,
unsigned long * framelength )
static

◆ m32r_breakpoint_kind_from_pc()

static int m32r_breakpoint_kind_from_pc ( struct gdbarch * gdbarch,
CORE_ADDR * pcptr )
static

Definition at line 171 of file m32r-tdep.c.

Referenced by m32r_gdbarch_init().

◆ m32r_extract_return_value()

static void m32r_extract_return_value ( struct type * type,
struct regcache * regcache,
gdb_byte * dst )
static

◆ m32r_frame_align()

static CORE_ADDR m32r_frame_align ( struct gdbarch * gdbarch,
CORE_ADDR sp )
static

Definition at line 47 of file m32r-tdep.c.

Referenced by m32r_gdbarch_init().

◆ m32r_frame_base_address()

static CORE_ADDR m32r_frame_base_address ( frame_info_ptr this_frame,
void ** this_cache )
static

Definition at line 845 of file m32r-tdep.c.

References m32r_frame_unwind_cache().

◆ m32r_frame_prev_register()

static struct value * m32r_frame_prev_register ( frame_info_ptr this_frame,
void ** this_prologue_cache,
int regnum )
static

Definition at line 826 of file m32r-tdep.c.

References m32r_frame_unwind_cache(), regnum, and trad_frame_get_prev_register().

◆ m32r_frame_this_id()

static void m32r_frame_this_id ( frame_info_ptr this_frame,
void ** this_prologue_cache,
struct frame_id * this_id )
static

◆ m32r_frame_unwind_cache()

static struct m32r_unwind_cache * m32r_frame_unwind_cache ( frame_info_ptr this_frame,
void ** this_prologue_cache )
static

◆ m32r_gdbarch_init()

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

◆ m32r_memory_insert_breakpoint()

static int m32r_memory_insert_breakpoint ( struct gdbarch * gdbarch,
struct bp_target_info * bp_tgt )
static

◆ m32r_memory_remove_breakpoint()

static int m32r_memory_remove_breakpoint ( struct gdbarch * gdbarch,
struct bp_target_info * bp_tgt )
static

◆ m32r_push_dummy_call()

static CORE_ADDR m32r_push_dummy_call ( struct gdbarch * gdbarch,
struct value * function,
struct regcache * regcache,
CORE_ADDR bp_addr,
int nargs,
struct value ** args,
CORE_ADDR sp,
function_call_return_method return_method,
CORE_ADDR struct_addr )
static

◆ m32r_register_name()

static const char * m32r_register_name ( struct gdbarch * gdbarch,
int reg_nr )
static

Definition at line 213 of file m32r-tdep.c.

References gdb_static_assert(), M32R_NUM_REGS, and m32r_register_names.

Referenced by m32r_gdbarch_init().

◆ m32r_register_type()

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

◆ m32r_return_value()

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

◆ m32r_skip_prologue()

static CORE_ADDR m32r_skip_prologue ( struct gdbarch * gdbarch,
CORE_ADDR pc )
static

◆ m32r_store_return_value()

static void m32r_store_return_value ( struct type * type,
struct regcache * regcache,
const gdb_byte * valbuf )
static

◆ m32r_sw_breakpoint_from_kind()

static const gdb_byte * m32r_sw_breakpoint_from_kind ( struct gdbarch * gdbarch,
int kind,
int * size )
static

Definition at line 182 of file m32r-tdep.c.

References gdbarch_byte_order(), and size.

Referenced by m32r_gdbarch_init().

Variable Documentation

◆ m32r_frame_base

const struct frame_base m32r_frame_base
static
Initial value:
= {
}
static CORE_ADDR m32r_frame_base_address(frame_info_ptr this_frame, void **this_cache)
Definition m32r-tdep.c:845
static const struct frame_unwind m32r_frame_unwind
Definition m32r-tdep.c:834

Definition at line 852 of file m32r-tdep.c.

Referenced by m32r_gdbarch_init().

◆ m32r_frame_unwind

const struct frame_unwind m32r_frame_unwind
static
Initial value:
= {
"m32r prologue",
NULL,
}
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
@ NORMAL_FRAME
Definition frame.h:187
static void m32r_frame_this_id(frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition m32r-tdep.c:796
static struct value * m32r_frame_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
Definition m32r-tdep.c:826

Definition at line 834 of file m32r-tdep.c.

Referenced by m32r_gdbarch_init().

◆ m32r_gdbarch_init

gdbarch_init_ftype m32r_gdbarch_init
static

Definition at line 859 of file m32r-tdep.c.

Referenced by _initialize_m32r_tdep().

◆ m32r_register_names

const char* const m32r_register_names[]
static
Initial value:
= {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp",
"psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
"evb"
}

Definition at line 205 of file m32r-tdep.c.

Referenced by m32r_register_name().