GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
lm32-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "inferior.h"
#include "dis-asm.h"
#include "symfile.h"
#include "remote.h"
#include "gdbcore.h"
#include "gdb/sim-lm32.h"
#include "arch-utils.h"
#include "regcache.h"
#include "trad-frame.h"
#include "reggroups.h"
#include "opcodes/lm32-desc.h"
#include <algorithm>
#include "gdbarch.h"

Go to the source code of this file.

Classes

struct  lm32_gdbarch_tdep
 
struct  lm32_frame_cache
 

Macros

#define LM32_OPCODE(insn)   ((insn >> 26) & 0x3f)
 
#define LM32_REG0(insn)   ((insn >> 21) & 0x1f)
 
#define LM32_REG1(insn)   ((insn >> 16) & 0x1f)
 
#define LM32_REG2(insn)   ((insn >> 11) & 0x1f)
 
#define LM32_IMM16(insn)   ((((long)insn & 0xffff) << 16) >> 16)
 

Functions

static int lm32_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
 
static const char * lm32_register_name (struct gdbarch *gdbarch, int reg_nr)
 
static struct typelm32_register_type (struct gdbarch *gdbarch, int reg_nr)
 
static int lm32_cannot_store_register (struct gdbarch *gdbarch, int regno)
 
static CORE_ADDR lm32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit, struct lm32_frame_cache *info)
 
static CORE_ADDR lm32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
typedef BP_MANIPULATION (lm32_break_insn)
 
static void lm32_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *valbuf)
 
static void lm32_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 
static enum return_value_convention lm32_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static struct lm32_frame_cachelm32_frame_cache (frame_info_ptr this_frame, void **this_prologue_cache)
 
static void lm32_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
 
static struct valuelm32_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR lm32_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 
static CORE_ADDR lm32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
static struct gdbarchlm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_lm32_tdep ()
 

Variables

constexpr gdb_byte lm32_break_insn [4] = { OP_RAISE << 2, 0, 0, 2 }
 
static const struct frame_unwind lm32_frame_unwind
 
static const struct frame_base lm32_frame_base
 

Macro Definition Documentation

◆ LM32_IMM16

#define LM32_IMM16 (   insn)    ((((long)insn & 0xffff) << 16) >> 16)

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

◆ LM32_OPCODE

#define LM32_OPCODE (   insn)    ((insn >> 26) & 0x3f)

Definition at line 40 of file lm32-tdep.c.

◆ LM32_REG0

#define LM32_REG0 (   insn)    ((insn >> 21) & 0x1f)

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

◆ LM32_REG1

#define LM32_REG1 (   insn)    ((insn >> 16) & 0x1f)

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

◆ LM32_REG2

#define LM32_REG2 (   insn)    ((insn >> 11) & 0x1f)

Definition at line 43 of file lm32-tdep.c.

Function Documentation

◆ _initialize_lm32_tdep()

void _initialize_lm32_tdep ( )

Definition at line 538 of file lm32-tdep.c.

References gdbarch_register(), and lm32_gdbarch_init().

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( lm32_break_insn  )

◆ lm32_analyze_prologue()

static CORE_ADDR lm32_analyze_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc,
CORE_ADDR  limit,
struct lm32_frame_cache info 
)
static

◆ lm32_cannot_store_register()

static int lm32_cannot_store_register ( struct gdbarch gdbarch,
int  regno 
)
static

Definition at line 105 of file lm32-tdep.c.

Referenced by lm32_gdbarch_init().

◆ lm32_extract_return_value()

static void lm32_extract_return_value ( struct type type,
struct regcache regcache,
gdb_byte *  valbuf 
)
static

◆ lm32_frame_align()

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

Definition at line 472 of file lm32-tdep.c.

Referenced by lm32_gdbarch_init().

◆ lm32_frame_base_address()

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

Definition at line 457 of file lm32-tdep.c.

◆ lm32_frame_cache()

static struct lm32_frame_cache * lm32_frame_cache ( frame_info_ptr  this_frame,
void **  this_prologue_cache 
)
static

◆ lm32_frame_prev_register()

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

Definition at line 437 of file lm32-tdep.c.

References regnum, and trad_frame_get_prev_register().

◆ lm32_frame_this_id()

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

Definition at line 424 of file lm32-tdep.c.

References lm32_frame_cache::base, frame_id_build(), and lm32_frame_cache::pc.

◆ lm32_gdbarch_init()

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

◆ lm32_register_name()

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

Definition at line 80 of file lm32-tdep.c.

References gdb_static_assert().

Referenced by lm32_gdbarch_init().

◆ lm32_register_reggroup_p()

static int lm32_register_reggroup_p ( struct gdbarch gdbarch,
int  regnum,
const struct reggroup group 
)
static

Definition at line 65 of file lm32-tdep.c.

References default_register_reggroup_p(), general_reggroup, regnum, and system_reggroup.

Referenced by lm32_gdbarch_init().

◆ lm32_register_type()

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

Definition at line 97 of file lm32-tdep.c.

References builtin_type::builtin_int32.

Referenced by lm32_gdbarch_init().

◆ lm32_return_value()

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

◆ lm32_skip_prologue()

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

◆ lm32_store_return_value()

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

Variable Documentation

◆ lm32_break_insn

constexpr gdb_byte lm32_break_insn[4] = { OP_RAISE << 2, 0, 0, 2 }
constexpr

Definition at line 204 of file lm32-tdep.c.

◆ lm32_frame_base

const struct frame_base lm32_frame_base
static
Initial value:
= {
}
static CORE_ADDR lm32_frame_base_address(frame_info_ptr this_frame, void **this_cache)
Definition lm32-tdep.c:457
static const struct frame_unwind lm32_frame_unwind
Definition lm32-tdep.c:446

Definition at line 464 of file lm32-tdep.c.

Referenced by lm32_gdbarch_init().

◆ lm32_frame_unwind

const struct frame_unwind lm32_frame_unwind
static
Initial value:
= {
"lm32 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 void lm32_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
Definition lm32-tdep.c:424
static struct value * lm32_frame_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
Definition lm32-tdep.c:437

Definition at line 446 of file lm32-tdep.c.

Referenced by lm32_gdbarch_init().