GDB (xrefs)
|
#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.
#define EXTRACT_LEN 2 |
Referenced by score3_adjust_pc_and_fetch_inst().
#define G_FLD | ( | _i, | |
_ms, | |||
_ls | |||
) | ((unsigned)((_i) << (31 - (_ms))) >> (31 - (_ms) + (_ls))) |
Definition at line 41 of file score-tdep.c.
Referenced by score3_analyze_prologue(), score3_in_function_epilogue_p(), score3_skip_prologue(), score7_analyze_prologue(), score7_fetch_inst(), score7_in_function_epilogue_p(), and score7_skip_prologue().
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] |
Definition at line 180 of file score-tdep.c.
References _, error(), EXTRACT_LEN, extract_unsigned_integer(), gdb_assert, inst_t::len, inst_t::raw, target_read_memory(), and inst_t::v.
Referenced by score3_analyze_prologue(), score3_breakpoint_from_pc(), score3_in_function_epilogue_p(), score3_skip_prologue(), and score_adjust_breakpoint_address().
static void score3_analyze_prologue | ( | CORE_ADDR | startaddr, |
CORE_ADDR | pc, | ||
struct frame_info * | this_frame, | ||
struct score_frame_cache * | this_cache | ||
) | [static] |
Definition at line 1071 of file score-tdep.c.
References trad_frame_saved_reg::addr, score_frame_cache::base, gdbarch::byte_order, score_frame_cache::fp, G_FLD, gdbarch_byte_order(), get_frame_arch(), get_frame_register_unsigned(), inst_t::len, score_frame_cache::saved_regs, score3_adjust_pc_and_fetch_inst(), SCORE_FP_REGNUM, SCORE_PC_REGNUM, SCORE_RA_REGNUM, SCORE_SP_REGNUM, sp, and inst_t::v.
Referenced by score_make_prologue_cache().
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] |
Definition at line 766 of file score-tdep.c.
References G_FLD, gdbarch_byte_order(), inst_t::len, score3_adjust_pc_and_fetch_inst(), and inst_t::v.
Referenced by score_gdbarch_init().
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] |
Definition at line 685 of file score-tdep.c.
References G_FLD, gdbarch_byte_order(), inst_t::len, score3_adjust_pc_and_fetch_inst(), and inst_t::v.
Referenced by score_gdbarch_init().
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] |
Definition at line 864 of file score-tdep.c.
References trad_frame_saved_reg::addr, score_frame_cache::base, score_frame_cache::fp, G_FLD, get_frame_arch(), get_frame_register_unsigned(), int, inst_t::len, score_frame_cache::saved_regs, SCORE16_INSTLEN, score7_adjust_memblock_ptr(), score7_fetch_inst(), score7_free_memblock(), score7_malloc_and_get_memblock(), SCORE_FP_REGNUM, SCORE_INSTLEN, SCORE_PC_REGNUM, SCORE_RA_REGNUM, SCORE_SP_REGNUM, sp, and inst_t::v.
Referenced by score_make_prologue_cache().
static const gdb_byte* score7_breakpoint_from_pc | ( | struct gdbarch * | gdbarch, |
CORE_ADDR * | pcptr, | ||
int * | lenptr | ||
) | [static] |
Definition at line 311 of file score-tdep.c.
References _, error(), extract_unsigned_integer(), gdbarch_byte_order(), SCORE_INSTLEN, and target_read_memory().
Referenced by score_gdbarch_init().
static inst_t* score7_fetch_inst | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | addr, | ||
gdb_byte * | memblock | ||
) | [static] |
Definition at line 140 of file score-tdep.c.
References _, error(), extract_unsigned_integer(), G_FLD, gdbarch_byte_order(), inst_t::len, memcpy(), inst_t::raw, SCORE_INSTLEN, target_has_execution, target_read_memory(), and inst_t::v.
Referenced by score7_analyze_prologue(), score7_in_function_epilogue_p(), and score7_skip_prologue().
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] |
Definition at line 1454 of file score-tdep.c.
References gdb_assert, gdbarch_tdep(), gdbarch_tdep::gregset, regset_alloc(), and score7_linux_supply_gregset().
Referenced by score_gdbarch_init().
static void score7_linux_supply_gregset | ( | const struct regset * | regset, |
struct regcache * | regcache, | ||
int | regnum, | ||
const void * | gregs_buf, | ||
size_t | len | ||
) | [static] |
Definition at line 1406 of file score-tdep.c.
References pt_regs::ceh, pt_regs::cel, pt_regs::cp0_condition, pt_regs::cp0_ecr, pt_regs::cp0_ema, pt_regs::cp0_epc, pt_regs::cp0_psr, gdb_assert, regcache_raw_supply(), regnum, pt_regs::regs, pt_regs::sr0, and pt_regs::sr1.
Referenced by score7_linux_regset_from_core_section().
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] |
Definition at line 398 of file score-tdep.c.
References align_down(), gdbarch_byte_order(), score3_adjust_pc_and_fetch_inst(), and target_mach.
Referenced by score_gdbarch_init().
static struct frame_id score_dummy_id | ( | struct gdbarch * | gdbarch, |
struct frame_info * | this_frame | ||
) | [static, read] |
Definition at line 481 of file score-tdep.c.
References frame_id_build(), get_frame_pc(), get_frame_register_unsigned(), and SCORE_SP_REGNUM.
Referenced by score_gdbarch_init().
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] |
Definition at line 1317 of file score-tdep.c.
References score_frame_cache::base, find_pc_partial_function(), FRAME_OBSTACK_ZALLOC, get_frame_pc(), score_frame_cache::saved_regs, score3_analyze_prologue(), score7_analyze_prologue(), SCORE_SP_REGNUM, target_mach, trad_frame_alloc_saved_regs(), and trad_frame_set_value().
Referenced by score_prologue_frame_base_address(), score_prologue_prev_register(), and score_prologue_this_id().
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] |
Definition at line 1359 of file score-tdep.c.
References score_frame_cache::saved_regs, score_make_prologue_cache(), and trad_frame_get_prev_register().
static void score_prologue_this_id | ( | struct frame_info * | this_frame, |
void ** | this_cache, | ||
struct frame_id * | this_id | ||
) | [static] |
Definition at line 1350 of file score-tdep.c.
References score_frame_cache::base, frame_id_build(), get_frame_func(), and score_make_prologue_cache().
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] |
Definition at line 510 of file score-tdep.c.
References frame_info::addr, align_down(), align_up(), check_typedef(), extract_unsigned_integer(), gdbarch_byte_order(), regcache_cooked_write_unsigned(), SCORE_BEGIN_ARG_REGNUM, SCORE_LAST_ARG_REGNUM, SCORE_RA_REGNUM, SCORE_REGSIZE, SCORE_SP_REGNUM, score_type_needs_double_align(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_LENGTH, ULONGEST, value_contents(), value_type(), and write_memory().
Referenced by score_gdbarch_init().
static struct type* score_register_type | ( | struct gdbarch * | gdbarch, |
int | regnum | ||
) | [static, read] |
Definition at line 60 of file score-tdep.c.
References builtin_type(), builtin_type::builtin_uint32, gdb_assert, SCORE3_NUM_REGS, SCORE7_NUM_REGS, and target_mach.
Referenced by score_gdbarch_init().
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] |
Definition at line 452 of file score-tdep.c.
References gdbarch_byte_order(), offset, regnum, RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, SCORE_A0_REGNUM, SCORE_REGSIZE, score_xfer_register(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_LENGTH.
Referenced by score_gdbarch_init().
static int score_type_needs_double_align | ( | struct type * | type | ) | [static] |
Definition at line 489 of file score-tdep.c.
References TYPE_CODE, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD_TYPE, TYPE_LENGTH, and TYPE_NFIELDS.
Referenced by score_push_dummy_call().
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] |
Definition at line 418 of file score-tdep.c.
References _, error(), gdb_assert, reg_offset, regcache_cooked_read_part(), regcache_cooked_write_part(), SCORE3_NUM_REGS, SCORE7_NUM_REGS, SCORE_REGSIZE, and target_mach.
Referenced by score_return_value().
Referenced by initialize_all_files().
struct frame_base score_prologue_frame_base [static] |
{ &score_prologue_unwind, score_prologue_frame_base_address, score_prologue_frame_base_address, score_prologue_frame_base_address, }
Definition at line 1387 of file score-tdep.c.
Referenced by score_prologue_frame_base_sniffer().
struct frame_unwind score_prologue_unwind [static] |
{ NORMAL_FRAME, default_frame_unwind_stop_reason, score_prologue_this_id, score_prologue_prev_register, NULL, default_frame_sniffer, NULL }
Definition at line 1367 of file score-tdep.c.
int target_mach = bfd_mach_score7 [static] |
Definition at line 57 of file score-tdep.c.
Referenced by score_adjust_breakpoint_address(), score_gdbarch_init(), score_make_prologue_cache(), score_register_type(), and score_xfer_register().