GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
mn10300-tdep.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "dis-asm.h"
#include "gdbtypes.h"
#include "regcache.h"
#include "gdbcore.h"
#include "value.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "symtab.h"
#include "dwarf2/frame.h"
#include "osabi.h"
#include "infcall.h"
#include "prologue-value.h"
#include "target.h"
#include "mn10300-tdep.h"

Go to the source code of this file.

Classes

struct  mn10300_prologue
 

Macros

#define MN10300_MAX_NUM_REGS   64
 
#define MN10300_MAX_REGISTER_SIZE   64
 

Functions

static int mn10300_type_align (struct type *type)
 
static int mn10300_use_struct_convention (struct type *type)
 
static void mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 
static void mn10300_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
 
static enum return_value_convention mn10300_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static const char * register_name (int reg, const char **regs, long num_regs)
 
static const char * mn10300_generic_register_name (struct gdbarch *gdbarch, int reg)
 
static const char * am33_register_name (struct gdbarch *gdbarch, int reg)
 
static const char * am33_2_register_name (struct gdbarch *gdbarch, int reg)
 
static struct typemn10300_register_type (struct gdbarch *gdbarch, int reg)
 
typedef BP_MANIPULATION (mn10300_break_insn)
 
static int translate_rreg (int rreg)
 
static void check_for_saved (void *result_untyped, pv_t addr, CORE_ADDR size, pv_t value)
 
static void mn10300_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR limit_pc, struct mn10300_prologue *result)
 
static CORE_ADDR mn10300_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static struct mn10300_prologuemn10300_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache)
 
static CORE_ADDR mn10300_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
 
static void mn10300_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valuemn10300_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
 
static void mn10300_frame_unwind_init (struct gdbarch *gdbarch)
 
static CORE_ADDR mn10300_push_dummy_call (struct gdbarch *gdbarch, struct value *target_func, 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 int mn10300_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2)
 
static struct gdbarchmn10300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
static void mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
 
void _initialize_mn10300_tdep ()
 

Variables

constexpr gdb_byte mn10300_break_insn [] = {0xff}
 
static const struct frame_unwind mn10300_frame_unwind
 

Macro Definition Documentation

◆ MN10300_MAX_NUM_REGS

#define MN10300_MAX_NUM_REGS   64

Definition at line 41 of file mn10300-tdep.c.

Referenced by mn10300_analyze_prologue().

◆ MN10300_MAX_REGISTER_SIZE

#define MN10300_MAX_REGISTER_SIZE   64

Definition at line 44 of file mn10300-tdep.c.

Referenced by mn10300_extract_return_value(), and mn10300_push_dummy_call().

Function Documentation

◆ _initialize_mn10300_tdep()

void _initialize_mn10300_tdep ( )

Definition at line 1417 of file mn10300-tdep.c.

References gdbarch_register(), mn10300_dump_tdep(), and mn10300_gdbarch_init().

◆ am33_2_register_name()

static const char * am33_2_register_name ( struct gdbarch * gdbarch,
int reg )
static

Definition at line 283 of file mn10300-tdep.c.

References register_name().

Referenced by mn10300_gdbarch_init().

◆ am33_register_name()

static const char * am33_register_name ( struct gdbarch * gdbarch,
int reg )
static

Definition at line 271 of file mn10300-tdep.c.

References register_name().

Referenced by mn10300_gdbarch_init().

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( mn10300_break_insn )

Definition at line 313 of file mn10300-tdep.c.

References E_SP_REGNUM, pv_add_constant(), regnum, and pv_area::store().

◆ check_for_saved()

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

◆ mn10300_analyze_frame_prologue()

static struct mn10300_prologue * mn10300_analyze_frame_prologue ( frame_info_ptr this_frame,
void ** this_prologue_cache )
static

◆ mn10300_analyze_prologue()

static void mn10300_analyze_prologue ( struct gdbarch * gdbarch,
CORE_ADDR start_pc,
CORE_ADDR limit_pc,
struct mn10300_prologue * result )
static

◆ mn10300_dump_tdep()

static void mn10300_dump_tdep ( struct gdbarch * gdbarch,
struct ui_file * file )
static

Definition at line 1408 of file mn10300-tdep.c.

References mn10300_gdbarch_tdep::am33_mode, and gdb_printf().

Referenced by _initialize_mn10300_tdep().

◆ mn10300_dwarf2_reg_to_regnum()

static int mn10300_dwarf2_reg_to_regnum ( struct gdbarch * gdbarch,
int dwarf2 )
static

◆ mn10300_extract_return_value()

static void mn10300_extract_return_value ( struct gdbarch * gdbarch,
struct type * type,
struct regcache * regcache,
void * valbuf )
static

◆ mn10300_frame_base()

static CORE_ADDR mn10300_frame_base ( frame_info_ptr this_frame,
void ** this_prologue_cache )
static

◆ mn10300_frame_prev_register()

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

◆ mn10300_frame_this_id()

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

Definition at line 1098 of file mn10300-tdep.c.

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

◆ mn10300_frame_unwind_init()

static void mn10300_frame_unwind_init ( struct gdbarch * gdbarch)
static

◆ mn10300_gdbarch_init()

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

◆ mn10300_generic_register_name()

static const char * mn10300_generic_register_name ( struct gdbarch * gdbarch,
int reg )
static

Definition at line 258 of file mn10300-tdep.c.

References register_name().

Referenced by mn10300_gdbarch_init().

◆ mn10300_push_dummy_call()

static CORE_ADDR mn10300_push_dummy_call ( struct gdbarch * gdbarch,
struct value * target_func,
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

◆ mn10300_register_type()

static struct type * mn10300_register_type ( struct gdbarch * gdbarch,
int reg )
static

Definition at line 300 of file mn10300-tdep.c.

References builtin_type::builtin_int, and builtin_type().

Referenced by mn10300_gdbarch_init().

◆ mn10300_return_value()

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

◆ mn10300_skip_prologue()

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

◆ mn10300_store_return_value()

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

◆ mn10300_type_align()

static int mn10300_type_align ( struct type * type)
static

◆ mn10300_use_struct_convention()

static int mn10300_use_struct_convention ( struct type * type)
static

◆ register_name()

static const char * register_name ( int reg,
const char ** regs,
long num_regs )
static

◆ translate_rreg()

static int translate_rreg ( int rreg)
static

Definition at line 328 of file mn10300-tdep.c.

References E_A0_REGNUM, E_D0_REGNUM, and E_E0_REGNUM.

Referenced by mn10300_analyze_prologue().

Variable Documentation

◆ mn10300_break_insn

constexpr gdb_byte mn10300_break_insn[] = {0xff}
constexpr

Definition at line 311 of file mn10300-tdep.c.

◆ mn10300_frame_unwind

const struct frame_unwind mn10300_frame_unwind
static
Initial value:
= {
"mn10300 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 mn10300_frame_this_id(frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
static struct value * mn10300_frame_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)

Definition at line 1130 of file mn10300-tdep.c.

Referenced by mn10300_frame_unwind_init().