GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
moxie-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 "record.h"
#include "record-full.h"
#include "moxie-tdep.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  moxie_frame_cache
 
struct  moxie_unwind_cache
 

Macros

#define INST2OFFSET(o)   ((((signed short)((o & ((1<<10)-1))<<6))>>6)<<1)
 

Enumerations

enum  { REG_UNAVAIL = (CORE_ADDR) -1 }
 

Functions

static CORE_ADDR moxie_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
typedef BP_MANIPULATION (moxie_break_insn)
 
static const char * moxie_register_name (struct gdbarch *gdbarch, int reg_nr)
 
static struct typemoxie_register_type (struct gdbarch *gdbarch, int reg_nr)
 
static void moxie_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 
static CORE_ADDR moxie_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr, struct moxie_frame_cache *cache, struct gdbarch *gdbarch)
 
static CORE_ADDR moxie_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static ULONGEST moxie_process_readu (CORE_ADDR addr, gdb_byte *buf, int length, enum bfd_endian byte_order)
 
static std::vector< CORE_ADDR > moxie_software_single_step (struct regcache *regcache)
 
static void moxie_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *dst)
 
static enum return_value_convention moxie_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static struct moxie_frame_cachemoxie_alloc_frame_cache (void)
 
static struct moxie_frame_cachemoxie_frame_cache (frame_info_ptr this_frame, void **this_cache)
 
static void moxie_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valuemoxie_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR moxie_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 
static int moxie_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
 
static struct gdbarchmoxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_moxie_tdep ()
 

Variables

constexpr gdb_byte moxie_break_insn [] = { 0x35, 0x00 }
 
static const struct frame_unwind moxie_frame_unwind
 
static const struct frame_base moxie_frame_base
 

Macro Definition Documentation

◆ INST2OFFSET

#define INST2OFFSET (   o)    ((((signed short)((o & ((1<<10)-1))<<6))>>6)<<1)

Definition at line 292 of file moxie-tdep.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REG_UNAVAIL 

Definition at line 45 of file moxie-tdep.c.

Function Documentation

◆ _initialize_moxie_tdep()

void _initialize_moxie_tdep ( )

Definition at line 1106 of file moxie-tdep.c.

References gdbarch_register(), and moxie_gdbarch_init().

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( moxie_break_insn  )

Definition at line 69 of file moxie-tdep.c.

◆ moxie_alloc_frame_cache()

static struct moxie_frame_cache * moxie_alloc_frame_cache ( void  )
static

◆ moxie_analyze_prologue()

static CORE_ADDR moxie_analyze_prologue ( CORE_ADDR  start_addr,
CORE_ADDR  end_addr,
struct moxie_frame_cache cache,
struct gdbarch gdbarch 
)
static

◆ moxie_extract_return_value()

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

◆ moxie_frame_align()

static CORE_ADDR moxie_frame_align ( struct gdbarch gdbarch,
CORE_ADDR  sp 
)
static

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

Referenced by moxie_gdbarch_init().

◆ moxie_frame_base_address()

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

Definition at line 600 of file moxie-tdep.c.

References moxie_frame_cache::base.

◆ moxie_frame_cache()

static struct moxie_frame_cache * moxie_frame_cache ( frame_info_ptr  this_frame,
void **  this_cache 
)
static

◆ moxie_frame_prev_register()

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

◆ moxie_frame_this_id()

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

◆ moxie_gdbarch_init()

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

◆ moxie_process_readu()

static ULONGEST moxie_process_readu ( CORE_ADDR  addr,
gdb_byte *  buf,
int  length,
enum bfd_endian  byte_order 
)
static

◆ moxie_process_record()

static int moxie_process_record ( struct gdbarch gdbarch,
struct regcache regcache,
CORE_ADDR  addr 
)
static

◆ moxie_register_name()

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

Definition at line 82 of file moxie-tdep.c.

References gdb_static_assert(), and MOXIE_NUM_REGS.

Referenced by moxie_gdbarch_init().

◆ moxie_register_type()

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

◆ moxie_return_value()

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

◆ moxie_skip_prologue()

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

◆ moxie_software_single_step()

static std::vector< CORE_ADDR > moxie_software_single_step ( struct regcache regcache)
static

◆ moxie_store_return_value()

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

Variable Documentation

◆ moxie_break_insn

constexpr gdb_byte moxie_break_insn[] = { 0x35, 0x00 }
constexpr

Definition at line 67 of file moxie-tdep.c.

◆ moxie_frame_base

const struct frame_base moxie_frame_base
static
Initial value:
= {
}
static const struct frame_unwind moxie_frame_unwind
Definition moxie-tdep.c:587
static CORE_ADDR moxie_frame_base_address(frame_info_ptr this_frame, void **this_cache)
Definition moxie-tdep.c:600

Definition at line 608 of file moxie-tdep.c.

Referenced by moxie_gdbarch_init().

◆ moxie_frame_unwind

const struct frame_unwind moxie_frame_unwind
static
Initial value:
= {
"moxie 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:179
static struct value * moxie_frame_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
Definition moxie-tdep.c:569
static void moxie_frame_this_id(frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition moxie-tdep.c:553

Definition at line 587 of file moxie-tdep.c.

Referenced by moxie_gdbarch_init().