GDB (xrefs)
Classes | Macros | Functions | Variables
/tmp/gdb-7.10/gdb/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 "gdb/callback.h"
#include "gdb/remote-sim.h"
#include "sim-regno.h"
#include "arch-utils.h"
#include "regcache.h"
#include "trad-frame.h"
#include "reggroups.h"
#include "opcodes/lm32-desc.h"

Go to the source code of this file.

Classes

struct  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 void lm32_add_reggroups (struct gdbarch *gdbarch)
 
static int lm32_register_reggroup_p (struct gdbarch *gdbarch, int regnum, 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)
 
static const gdb_bytelm32_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 
static CORE_ADDR lm32_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 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 CORE_ADDR lm32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 
static CORE_ADDR lm32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
 
static struct frame_id lm32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
static struct lm32_frame_cachelm32_frame_cache (struct frame_info *this_frame, void **this_prologue_cache)
 
static void lm32_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
 
static struct valuelm32_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR lm32_frame_base_address (struct frame_info *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 (void)
 

Variables

static const struct frame_unwind lm32_frame_unwind
 
static const struct frame_base lm32_frame_base
 
initialize_file_ftype _initialize_lm32_tdep
 

Macro Definition Documentation

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

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

Referenced by lm32_analyze_prologue().

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

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

Referenced by lm32_analyze_prologue().

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

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

Referenced by lm32_analyze_prologue().

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

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

Referenced by lm32_analyze_prologue().

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

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

Referenced by lm32_analyze_prologue().

Function Documentation

void _initialize_lm32_tdep ( void  )

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

References lm32_gdbarch_init(), and register_gdbarch_init().

static void lm32_add_reggroups ( struct gdbarch gdbarch)
static

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

References all_reggroup, general_reggroup, reggroup_add(), and system_reggroup.

Referenced by lm32_gdbarch_init().

static CORE_ADDR lm32_analyze_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc,
CORE_ADDR  limit,
struct lm32_frame_cache info 
)
static
static const gdb_byte* lm32_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR pcptr,
int lenptr 
)
static

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

Referenced by lm32_gdbarch_init().

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

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

Referenced by lm32_gdbarch_init().

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

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

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

Referenced by lm32_gdbarch_init().

static void lm32_extract_return_value ( struct type type,
struct regcache regcache,
gdb_byte valbuf 
)
static
static CORE_ADDR lm32_frame_align ( struct gdbarch gdbarch,
CORE_ADDR  sp 
)
static

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

Referenced by lm32_gdbarch_init().

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

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

References lm32_frame_cache::base, and lm32_frame_cache().

static struct lm32_frame_cache* lm32_frame_cache ( struct frame_info this_frame,
void **  this_prologue_cache 
)
static
static struct value* lm32_frame_prev_register ( struct frame_info this_frame,
void **  this_prologue_cache,
int  regnum 
)
static
static void lm32_frame_this_id ( struct frame_info this_frame,
void **  this_cache,
struct frame_id this_id 
)
static
static struct gdbarch* lm32_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
)
static
static CORE_ADDR lm32_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
static const char* lm32_register_name ( struct gdbarch gdbarch,
int  reg_nr 
)
static

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

Referenced by lm32_gdbarch_init().

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

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

References default_register_reggroup_p(), general_reggroup, and system_reggroup.

Referenced by lm32_gdbarch_init().

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

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

References builtin_type::builtin_int32, and builtin_type().

Referenced by lm32_gdbarch_init().

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
static CORE_ADDR lm32_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static
static void lm32_store_return_value ( struct type type,
struct regcache regcache,
const gdb_byte valbuf 
)
static
static CORE_ADDR lm32_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
)
static

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

References frame_unwind_register_unsigned().

Referenced by lm32_gdbarch_init().

static CORE_ADDR lm32_unwind_sp ( struct gdbarch gdbarch,
struct frame_info next_frame 
)
static

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

References frame_unwind_register_unsigned().

Referenced by lm32_gdbarch_init().

Variable Documentation

initialize_file_ftype _initialize_lm32_tdep
const struct frame_base lm32_frame_base
static
Initial value:
= {
lm32_frame_base_address
}
static const struct frame_unwind lm32_frame_unwind
Definition: lm32-tdep.c:484
static CORE_ADDR lm32_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: lm32-tdep.c:494

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

const struct frame_unwind lm32_frame_unwind
static
Initial value:
= {
NULL,
}
static void lm32_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: lm32-tdep.c:462
static struct value * lm32_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
Definition: lm32-tdep.c:475
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:170
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:180

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