GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/score-tdep.c File Reference
#include "defs.h"
#include "gdb_assert.h"
#include "inferior.h"
#include "symtab.h"
#include "objfiles.h"
#include "gdbcore.h"
#include "target.h"
#include "arch-utils.h"
#include "regcache.h"
#include "regset.h"
#include "dis-asm.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "trad-frame.h"
#include "dwarf2-frame.h"
#include "score-tdep.h"

Go to the source code of this file.

Classes

struct  inst_t
struct  score_frame_cache

Defines

#define G_FLD(_i, _ms, _ls)   ((unsigned)((_i) << (31 - (_ms))) >> (31 - (_ms) + (_ls)))
#define EXTRACT_LEN   2

Functions

static struct typescore_register_type (struct gdbarch *gdbarch, int regnum)
static CORE_ADDR score_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static const char * score7_register_name (struct gdbarch *gdbarch, int regnum)
static const char * score3_register_name (struct gdbarch *gdbarch, int regnum)
static int score_print_insn (bfd_vma memaddr, struct disassemble_info *info)
static inst_tscore7_fetch_inst (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)
static inst_tscore3_adjust_pc_and_fetch_inst (CORE_ADDR *pcptr, int *lenptr, enum bfd_endian byte_order)
static const gdb_bytescore7_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
static const gdb_bytescore3_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
static CORE_ADDR score_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
static CORE_ADDR score_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
static void score_xfer_register (struct regcache *regcache, int regnum, int length, enum bfd_endian endian, gdb_byte *readbuf, const gdb_byte *writebuf, int buf_offset)
static enum return_value_convention score_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static struct frame_id score_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
static int score_type_needs_double_align (struct type *type)
static CORE_ADDR score_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 CORE_ADDR score7_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static CORE_ADDR score3_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static int score7_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
static int score3_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
static gdb_bytescore7_malloc_and_get_memblock (CORE_ADDR addr, CORE_ADDR size)
static void score7_free_memblock (gdb_byte *memblock)
static void score7_adjust_memblock_ptr (gdb_byte **memblock, CORE_ADDR prev_pc, CORE_ADDR cur_pc)
static void score7_analyze_prologue (CORE_ADDR startaddr, CORE_ADDR pc, struct frame_info *this_frame, struct score_frame_cache *this_cache)
static void score3_analyze_prologue (CORE_ADDR startaddr, CORE_ADDR pc, struct frame_info *this_frame, struct score_frame_cache *this_cache)
static struct score_frame_cachescore_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
static void score_prologue_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct valuescore_prologue_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static CORE_ADDR score_prologue_frame_base_address (struct frame_info *this_frame, void **this_cache)
static struct frame_basescore_prologue_frame_base_sniffer (struct frame_info *this_frame)
static void score7_linux_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs_buf, size_t len)
static struct regsetscore7_linux_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
static struct gdbarchscore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
void _initialize_score_tdep (void)

Variables

static int target_mach = bfd_mach_score7
static struct frame_unwind score_prologue_unwind
static struct frame_base score_prologue_frame_base
initialize_file_ftype _initialize_score_tdep

Define Documentation

#define EXTRACT_LEN   2
#define G_FLD (   _i,
  _ms,
  _ls 
)    ((unsigned)((_i) << (31 - (_ms))) >> (31 - (_ms) + (_ls)))

Function Documentation

void _initialize_score_tdep ( void  )

Definition at line 1554 of file score-tdep.c.

References gdbarch_register(), and score_gdbarch_init().

static inst_t* score3_adjust_pc_and_fetch_inst ( CORE_ADDR pcptr,
int lenptr,
enum bfd_endian  byte_order 
) [static]
static void score3_analyze_prologue ( CORE_ADDR  startaddr,
CORE_ADDR  pc,
struct frame_info this_frame,
struct score_frame_cache this_cache 
) [static]
static const gdb_byte* score3_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR pcptr,
int lenptr 
) [static]

Definition at line 367 of file score-tdep.c.

References gdbarch_byte_order(), len, p, and score3_adjust_pc_and_fetch_inst().

Referenced by score_gdbarch_init().

static int score3_in_function_epilogue_p ( struct gdbarch gdbarch,
CORE_ADDR  cur_pc 
) [static]
static const char* score3_register_name ( struct gdbarch gdbarch,
int  regnum 
) [static]

Definition at line 101 of file score-tdep.c.

References gdb_assert, regnum, and SCORE3_NUM_REGS.

Referenced by score_gdbarch_init().

static CORE_ADDR score3_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static void score7_adjust_memblock_ptr ( gdb_byte **  memblock,
CORE_ADDR  prev_pc,
CORE_ADDR  cur_pc 
) [static]

Definition at line 844 of file score-tdep.c.

References SCORE_INSTLEN.

Referenced by score7_analyze_prologue().

static void score7_analyze_prologue ( CORE_ADDR  startaddr,
CORE_ADDR  pc,
struct frame_info this_frame,
struct score_frame_cache this_cache 
) [static]
static const gdb_byte* score7_breakpoint_from_pc ( struct gdbarch gdbarch,
CORE_ADDR pcptr,
int lenptr 
) [static]
static inst_t* score7_fetch_inst ( struct gdbarch gdbarch,
CORE_ADDR  addr,
gdb_byte memblock 
) [static]
static void score7_free_memblock ( gdb_byte memblock) [static]

Definition at line 838 of file score-tdep.c.

References xfree().

Referenced by score7_analyze_prologue().

static int score7_in_function_epilogue_p ( struct gdbarch gdbarch,
CORE_ADDR  cur_pc 
) [static]

Definition at line 742 of file score-tdep.c.

References G_FLD, score7_fetch_inst(), and inst_t::v.

Referenced by score_gdbarch_init().

static struct regset* score7_linux_regset_from_core_section ( struct gdbarch gdbarch,
const char *  sect_name,
size_t  sect_size 
) [static, read]
static void score7_linux_supply_gregset ( const struct regset regset,
struct regcache regcache,
int  regnum,
const void *  gregs_buf,
size_t  len 
) [static]
static gdb_byte* score7_malloc_and_get_memblock ( CORE_ADDR  addr,
CORE_ADDR  size 
) [static]

Definition at line 811 of file score-tdep.c.

References _, error(), memset(), target_read_memory(), and xmalloc().

Referenced by score7_analyze_prologue().

static const char* score7_register_name ( struct gdbarch gdbarch,
int  regnum 
) [static]

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

References gdb_assert, regnum, and SCORE7_NUM_REGS.

Referenced by score_gdbarch_init().

static CORE_ADDR score7_skip_prologue ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]

Definition at line 628 of file score-tdep.c.

References G_FLD, inst_t::len, SCORE16_INSTLEN, score7_fetch_inst(), SCORE_INSTLEN, and inst_t::v.

Referenced by score_gdbarch_init().

static CORE_ADDR score_adjust_breakpoint_address ( struct gdbarch gdbarch,
CORE_ADDR  bpaddr 
) [static]
static struct frame_id score_dummy_id ( struct gdbarch gdbarch,
struct frame_info this_frame 
) [static, read]
static CORE_ADDR score_frame_align ( struct gdbarch gdbarch,
CORE_ADDR  addr 
) [static]

Definition at line 412 of file score-tdep.c.

References align_down().

Referenced by score_gdbarch_init().

static struct gdbarch* score_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
) [static, read]

Definition at line 1476 of file score-tdep.c.

References AT_ENTRY_POINT, gdbarch_info::bfd_arch_info, core_addr_lessthan(), dwarf2_append_unwinders(), dwarf2_frame_base_sniffer(), frame_base_append_sniffer(), frame_unwind_append_unwinder(), gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_list_lookup_by_info(), score3_breakpoint_from_pc(), score3_in_function_epilogue_p(), SCORE3_NUM_REGS, score3_register_name(), score3_skip_prologue(), score7_breakpoint_from_pc(), score7_in_function_epilogue_p(), score7_linux_regset_from_core_section(), SCORE7_NUM_REGS, score7_register_name(), score7_skip_prologue(), score_adjust_breakpoint_address(), score_dummy_id(), score_frame_align(), SCORE_PC_REGNUM, score_print_insn(), score_prologue_frame_base_sniffer(), score_push_dummy_call(), score_register_type(), score_return_value(), SCORE_SP_REGNUM, score_unwind_pc(), score_unwind_sp(), set_gdbarch_adjust_breakpoint_address(), set_gdbarch_breakpoint_from_pc(), set_gdbarch_call_dummy_location(), set_gdbarch_double_bit(), set_gdbarch_dummy_id(), set_gdbarch_float_bit(), set_gdbarch_frame_align(), set_gdbarch_have_nonsteppable_watchpoint(), set_gdbarch_in_function_epilogue_p(), set_gdbarch_inner_than(), set_gdbarch_int_bit(), set_gdbarch_long_double_bit(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_print_insn(), set_gdbarch_push_dummy_call(), set_gdbarch_register_name(), set_gdbarch_register_sim_regno(), set_gdbarch_register_type(), set_gdbarch_regset_from_core_section(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_unwind_pc(), set_gdbarch_unwind_sp(), target_mach, and xcalloc().

Referenced by _initialize_score_tdep().

static struct score_frame_cache* score_make_prologue_cache ( struct frame_info this_frame,
void **  this_cache 
) [static, read]
static int score_print_insn ( bfd_vma  memaddr,
struct disassemble_info *  info 
) [static]

Definition at line 131 of file score-tdep.c.

Referenced by score_gdbarch_init().

static CORE_ADDR score_prologue_frame_base_address ( struct frame_info this_frame,
void **  this_cache 
) [static]

Definition at line 1379 of file score-tdep.c.

References score_frame_cache::fp, and score_make_prologue_cache().

static struct frame_base* score_prologue_frame_base_sniffer ( struct frame_info this_frame) [static, read]

Definition at line 1396 of file score-tdep.c.

References score_prologue_frame_base.

Referenced by score_gdbarch_init().

static struct value* score_prologue_prev_register ( struct frame_info this_frame,
void **  this_cache,
int  regnum 
) [static, read]
static void score_prologue_this_id ( struct frame_info this_frame,
void **  this_cache,
struct frame_id this_id 
) [static]
static CORE_ADDR score_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 struct type* score_register_type ( struct gdbarch gdbarch,
int  regnum 
) [static, read]
static enum return_value_convention score_return_value ( struct gdbarch gdbarch,
struct value function,
struct type type,
struct regcache regcache,
gdb_byte readbuf,
const gdb_byte writebuf 
) [static]
static int score_type_needs_double_align ( struct type type) [static]
static CORE_ADDR score_unwind_pc ( struct gdbarch gdbarch,
struct frame_info next_frame 
) [static]

Definition at line 75 of file score-tdep.c.

References frame_unwind_register_unsigned(), and SCORE_PC_REGNUM.

Referenced by score_gdbarch_init().

static CORE_ADDR score_unwind_sp ( struct gdbarch gdbarch,
struct frame_info next_frame 
) [static]

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

References frame_unwind_register_unsigned(), and SCORE_SP_REGNUM.

Referenced by score_gdbarch_init().

static void score_xfer_register ( struct regcache regcache,
int  regnum,
int  length,
enum bfd_endian  endian,
gdb_byte readbuf,
const gdb_byte writebuf,
int  buf_offset 
) [static]

Variable Documentation

Referenced by initialize_all_files().

int target_mach = bfd_mach_score7 [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines