GDB (xrefs)
Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-7.10/gdb/ft32-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 "ft32-tdep.h"
#include "gdb/sim-ft32.h"

Go to the source code of this file.

Classes

struct  ft32_frame_cache
 

Macros

#define RAM_BIAS   0x800000 /* Bias added to RAM addresses. */
 
#define IS_PUSH(inst)    (((inst) & 0xfff00000) == 0x84000000)
 
#define PUSH_REG(inst)   (FT32_R0_REGNUM + (((inst) >> 15) & 0x1f))
 
#define IS_LINK(inst)    (((inst) & 0xffff0000) == 0x95d00000)
 
#define LINK_SIZE(inst)   ((inst) & 0xffff)
 

Enumerations

enum  { REG_UNAVAIL = (CORE_ADDR) (-1) }
 

Functions

void _initialize_ft32_tdep (void)
 
static CORE_ADDR ft32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
static const unsigned char * ft32_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 
static const char * ft32_register_name (struct gdbarch *gdbarch, int reg_nr)
 
static struct typeft32_register_type (struct gdbarch *gdbarch, int reg_nr)
 
static void ft32_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
 
static CORE_ADDR ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr, struct ft32_frame_cache *cache, struct gdbarch *gdbarch)
 
static CORE_ADDR ft32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static CORE_ADDR ft32_read_pc (struct regcache *regcache)
 
static void ft32_write_pc (struct regcache *regcache, CORE_ADDR val)
 
static CORE_ADDR ft32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
 
static void ft32_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *dst)
 
static enum return_value_convention ft32_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static struct ft32_frame_cacheft32_alloc_frame_cache (void)
 
static struct ft32_frame_cacheft32_frame_cache (struct frame_info *this_frame, void **this_cache)
 
static CORE_ADDR ft32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 
static void ft32_frame_this_id (struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valueft32_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum)
 
static CORE_ADDR ft32_frame_base_address (struct frame_info *this_frame, void **this_cache)
 
static struct frame_id ft32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
static struct gdbarchft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 

Variables

static const char *const ft32_register_names []
 
static const struct frame_unwind ft32_frame_unwind
 
static const struct frame_base ft32_frame_base
 

Macro Definition Documentation

#define IS_LINK (   inst)    (((inst) & 0xffff0000) == 0x95d00000)

Definition at line 158 of file ft32-tdep.c.

Referenced by ft32_analyze_prologue().

#define IS_PUSH (   inst)    (((inst) & 0xfff00000) == 0x84000000)

Definition at line 156 of file ft32-tdep.c.

Referenced by ft32_analyze_prologue().

#define LINK_SIZE (   inst)    ((inst) & 0xffff)

Definition at line 159 of file ft32-tdep.c.

Referenced by ft32_analyze_prologue().

#define PUSH_REG (   inst)    (FT32_R0_REGNUM + (((inst) >> 15) & 0x1f))

Definition at line 157 of file ft32-tdep.c.

Referenced by ft32_analyze_prologue().

#define RAM_BIAS   0x800000 /* Bias added to RAM addresses. */

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

Referenced by ft32_frame_prev_register().

Enumeration Type Documentation

anonymous enum
Enumerator
REG_UNAVAIL 

Definition at line 50 of file ft32-tdep.c.

Function Documentation

void _initialize_ft32_tdep ( void  )

Definition at line 544 of file ft32-tdep.c.

References ft32_gdbarch_init(), and register_gdbarch_init().

static struct ft32_frame_cache* ft32_alloc_frame_cache ( void  )
static

Definition at line 349 of file ft32-tdep.c.

References FRAME_OBSTACK_ZALLOC, REG_UNAVAIL, and ft32_frame_cache::saved_regs.

Referenced by ft32_frame_cache().

static CORE_ADDR ft32_analyze_prologue ( CORE_ADDR  start_addr,
CORE_ADDR  end_addr,
struct ft32_frame_cache cache,
struct gdbarch gdbarch 
)
static
static const unsigned char* ft32_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR pcptr,
int lenptr 
)
static

Definition at line 81 of file ft32-tdep.c.

Referenced by ft32_gdbarch_init().

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

Definition at line 477 of file ft32-tdep.c.

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

Referenced by ft32_gdbarch_init().

static void ft32_extract_return_value ( struct type type,
struct regcache regcache,
gdb_byte dst 
)
static
static CORE_ADDR ft32_frame_align ( struct gdbarch gdbarch,
CORE_ADDR  sp 
)
static

Definition at line 71 of file ft32-tdep.c.

Referenced by ft32_gdbarch_init().

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

Definition at line 460 of file ft32-tdep.c.

References ft32_frame_cache::base, and ft32_frame_cache().

static struct ft32_frame_cache* ft32_frame_cache ( struct frame_info this_frame,
void **  this_cache 
)
static
static struct value* ft32_frame_prev_register ( struct frame_info this_frame,
void **  this_prologue_cache,
int  regnum 
)
static
static void ft32_frame_this_id ( struct frame_info this_frame,
void **  this_prologue_cache,
struct frame_id this_id 
)
static
static struct gdbarch* ft32_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
)
static
static CORE_ADDR ft32_read_pc ( struct regcache regcache)
static

Definition at line 276 of file ft32-tdep.c.

References ft32_frame_cache::pc, and regcache_cooked_read_unsigned().

Referenced by ft32_gdbarch_init().

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

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

References ft32_register_names.

Referenced by ft32_gdbarch_init().

static struct type* ft32_register_type ( struct gdbarch gdbarch,
int  reg_nr 
)
static
static enum return_value_convention ft32_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 ft32_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static
static void ft32_store_return_value ( struct type type,
struct regcache regcache,
const gdb_byte valbuf 
)
static
static CORE_ADDR ft32_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
)
static

Definition at line 404 of file ft32-tdep.c.

References frame_unwind_register_unsigned().

Referenced by ft32_gdbarch_init().

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

Definition at line 295 of file ft32-tdep.c.

References frame_unwind_register_unsigned().

Referenced by ft32_gdbarch_init().

static void ft32_write_pc ( struct regcache regcache,
CORE_ADDR  val 
)
static

Definition at line 287 of file ft32-tdep.c.

References regcache_cooked_write_unsigned().

Referenced by ft32_gdbarch_init().

Variable Documentation

const struct frame_base ft32_frame_base
static
Initial value:
=
{
ft32_frame_base_address
}
static CORE_ADDR ft32_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: ft32-tdep.c:460
static const struct frame_unwind ft32_frame_unwind
Definition: ft32-tdep.c:447

Definition at line 468 of file ft32-tdep.c.

const struct frame_unwind ft32_frame_unwind
static
Initial value:
=
{
NULL,
}
static void ft32_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition: ft32-tdep.c:413
static struct value * ft32_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
Definition: ft32-tdep.c:429
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 447 of file ft32-tdep.c.

const char* const ft32_register_names[]
static
Initial value:
=
{
"fp", "sp",
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
"r24", "r25", "r26", "r27", "r28", "cc",
"pc"
}

Definition at line 92 of file ft32-tdep.c.

Referenced by ft32_register_name().