GDB (xrefs)
|
#include "defs.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "trad-frame.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "gdbtypes.h"
#include "inferior.h"
#include "symfile.h"
#include "arch-utils.h"
#include "regcache.h"
#include "gdb_string.h"
#include "dis-asm.h"
Go to the source code of this file.
anonymous enum |
Definition at line 73 of file avr-tdep.c.
anonymous enum |
AVR_PROLOGUE_NONE | |
AVR_PROLOGUE_NORMAL | |
AVR_PROLOGUE_CALL | |
AVR_PROLOGUE_MAIN | |
AVR_PROLOGUE_INTR | |
AVR_PROLOGUE_SIG |
Definition at line 146 of file avr-tdep.c.
void _initialize_avr_tdep | ( | void | ) |
Definition at line 1537 of file avr-tdep.c.
References _, _initialize_avr_tdep, add_cmd(), avr_gdbarch_init(), avr_io_reg_read_command(), class_info, infolist, and register_gdbarch_init().
static void avr_address_to_pointer | ( | struct gdbarch * | gdbarch, |
struct type * | type, | ||
gdb_byte * | buf, | ||
CORE_ADDR | addr | ||
) | [static] |
Definition at line 292 of file avr-tdep.c.
References avr_convert_iaddr_to_raw(), avr_convert_saddr_to_raw(), gdbarch_byte_order(), store_unsigned_integer(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_LENGTH, and TYPE_TARGET_TYPE.
Referenced by avr_gdbarch_init().
static const unsigned char* avr_breakpoint_from_pc | ( | struct gdbarch * | gdbarch, |
CORE_ADDR * | pcptr, | ||
int * | lenptr | ||
) | [static] |
Definition at line 886 of file avr-tdep.c.
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_convert_iaddr_to_raw | ( | CORE_ADDR | x | ) | [static] |
Definition at line 242 of file avr-tdep.c.
Referenced by avr_address_to_pointer(), avr_push_dummy_call(), and avr_write_pc().
static CORE_ADDR avr_convert_saddr_to_raw | ( | CORE_ADDR | x | ) | [static] |
Definition at line 260 of file avr-tdep.c.
Referenced by avr_address_to_pointer(), and avr_push_dummy_call().
static struct frame_id avr_dummy_id | ( | struct gdbarch * | gdbarch, |
struct frame_info * | this_frame | ||
) | [static, read] |
Definition at line 1157 of file avr-tdep.c.
References avr_make_saddr(), AVR_SP_REGNUM, frame_info::base, frame_id_build(), get_frame_pc(), get_frame_register_unsigned(), and ULONGEST.
Referenced by avr_gdbarch_init().
static int avr_dwarf_reg_to_regnum | ( | struct gdbarch * | gdbarch, |
int | reg | ||
) | [static] |
Definition at line 1332 of file avr-tdep.c.
References _, AVR_SP_REGNUM, and warning().
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_frame_base_address | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static] |
Definition at line 1137 of file avr-tdep.c.
References avr_frame_unwind_cache(), and avr_unwind_cache::base.
static struct value* avr_frame_prev_register | ( | struct frame_info * | this_frame, |
void ** | this_prologue_cache, | ||
int | regnum | ||
) | [static, read] |
Definition at line 1077 of file avr-tdep.c.
References trad_frame_saved_reg::addr, avr_frame_unwind_cache(), AVR_PC_REGNUM, AVR_PSEUDO_PC_REGNUM, gdbarch::byte_order, gdbarch_tdep::call_length, frame_unwind_got_constant(), frame_unwind_got_optimized(), gdbarch_byte_order(), gdbarch_tdep(), get_frame_arch(), read_memory(), avr_unwind_cache::saved_regs, trad_frame_addr_p(), trad_frame_get_prev_register(), and ULONGEST.
static void avr_frame_this_id | ( | struct frame_info * | this_frame, |
void ** | this_prologue_cache, | ||
struct frame_id * | this_id | ||
) | [static] |
Definition at line 1052 of file avr-tdep.c.
References avr_frame_unwind_cache(), avr_unwind_cache::base, frame_id_build(), func, get_frame_func(), and avr_unwind_cache::prev_sp.
static struct avr_unwind_cache* avr_frame_unwind_cache | ( | struct frame_info * | this_frame, |
void ** | this_prologue_cache | ||
) | [static, read] |
Definition at line 949 of file avr-tdep.c.
References trad_frame_saved_reg::addr, AVR_FP_REGNUM, avr_make_saddr(), AVR_PC_REGNUM, AVR_PROLOGUE_MAIN, AVR_PROLOGUE_NONE, avr_scan_prologue(), AVR_SP_REGNUM, avr_unwind_cache::base, gdbarch_tdep::call_length, FRAME_OBSTACK_ZALLOC, gdbarch_num_regs(), gdbarch_tdep(), get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register_unsigned(), avr_unwind_cache::prev_sp, avr_unwind_cache::prologue_type, avr_unwind_cache::saved_regs, avr_unwind_cache::size, trad_frame_alloc_saved_regs(), trad_frame_set_value(), and ULONGEST.
Referenced by avr_frame_base_address(), avr_frame_prev_register(), and avr_frame_this_id().
static struct gdbarch* avr_gdbarch_init | ( | struct gdbarch_info | info, |
struct gdbarch_list * | arches | ||
) | [static, read] |
Definition at line 1347 of file avr-tdep.c.
References arch_type(), avr_address_to_pointer(), avr_breakpoint_from_pc(), avr_dummy_id(), avr_dwarf_reg_to_regnum(), avr_integer_to_address(), AVR_NUM_PSEUDO_REGS, AVR_NUM_REGS, AVR_PC_REGNUM, avr_pointer_to_address(), avr_pseudo_register_read(), avr_pseudo_register_write(), avr_push_dummy_call(), avr_read_pc(), avr_register_name(), avr_register_type(), avr_return_value(), avr_skip_prologue(), AVR_SP_REGNUM, avr_unwind_pc(), avr_unwind_sp(), avr_write_pc(), gdbarch_info::bfd_arch_info, gdbarch_tdep::call_length, core_addr_lessthan(), floatformats_ieee_single, frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_tdep::func_void_type, gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_list_lookup_by_info(), make_function_type(), gdbarch_list::next, gdbarch_tdep::pc_type, set_gdbarch_addr_bit(), set_gdbarch_address_to_pointer(), set_gdbarch_breakpoint_from_pc(), set_gdbarch_double_bit(), set_gdbarch_double_format(), set_gdbarch_dummy_id(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_float_bit(), set_gdbarch_float_format(), set_gdbarch_inner_than(), set_gdbarch_int_bit(), set_gdbarch_integer_to_address(), set_gdbarch_long_bit(), set_gdbarch_long_double_bit(), set_gdbarch_long_double_format(), set_gdbarch_long_long_bit(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_pointer_to_address(), set_gdbarch_print_insn(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_read_pc(), set_gdbarch_register_name(), set_gdbarch_register_type(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_unwind_pc(), set_gdbarch_unwind_sp(), set_gdbarch_write_pc(), TYPE_CODE_PTR, TYPE_CODE_VOID, TYPE_TARGET_TYPE, TYPE_UNSIGNED, gdbarch_tdep::void_type, and XMALLOC.
Referenced by _initialize_avr_tdep().
static CORE_ADDR avr_integer_to_address | ( | struct gdbarch * | gdbarch, |
struct type * | type, | ||
const gdb_byte * | buf | ||
) | [static] |
Definition at line 330 of file avr-tdep.c.
References avr_make_saddr(), ULONGEST, and unpack_long().
Referenced by avr_gdbarch_init().
static void avr_io_reg_read_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1464 of file avr-tdep.c.
References _, current_target, fprintf_unfiltered(), gdb_stderr, LONGEST, p, printf_filtered(), printf_unfiltered(), query(), reinitialize_more_filter(), TARGET_OBJECT_AVR, target_read_alloc(), and xfree().
Referenced by _initialize_avr_tdep().
static CORE_ADDR avr_make_iaddr | ( | CORE_ADDR | x | ) | [static] |
Definition at line 231 of file avr-tdep.c.
References AVR_IMEM_START.
Referenced by avr_pointer_to_address(), avr_read_pc(), and avr_unwind_pc().
static CORE_ADDR avr_make_saddr | ( | CORE_ADDR | x | ) | [static] |
Definition at line 250 of file avr-tdep.c.
References AVR_SMEM_START.
Referenced by avr_dummy_id(), avr_frame_unwind_cache(), avr_integer_to_address(), avr_pointer_to_address(), and avr_unwind_sp().
static CORE_ADDR avr_pointer_to_address | ( | struct gdbarch * | gdbarch, |
struct type * | type, | ||
const gdb_byte * | buf | ||
) | [static] |
Definition at line 313 of file avr-tdep.c.
References avr_make_iaddr(), avr_make_saddr(), extract_unsigned_integer(), gdbarch_byte_order(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_SPACE, TYPE_LENGTH, and TYPE_TARGET_TYPE.
Referenced by avr_gdbarch_init().
static enum register_status avr_pseudo_register_read | ( | struct gdbarch * | gdbarch, |
struct regcache * | regcache, | ||
int | regnum, | ||
gdb_byte * | buf | ||
) | [static] |
Definition at line 354 of file avr-tdep.c.
References _, AVR_PC_REGNUM, AVR_PSEUDO_PC_REGNUM, gdbarch_byte_order(), internal_error(), REG_VALID, regcache_raw_read_unsigned(), exsummary::status, store_unsigned_integer(), and ULONGEST.
Referenced by avr_gdbarch_init().
static void avr_pseudo_register_write | ( | struct gdbarch * | gdbarch, |
struct regcache * | regcache, | ||
int | regnum, | ||
const gdb_byte * | buf | ||
) | [static] |
Definition at line 375 of file avr-tdep.c.
References _, AVR_PC_REGNUM, AVR_PSEUDO_PC_REGNUM, extract_unsigned_integer(), gdbarch_byte_order(), internal_error(), regcache_raw_write_unsigned(), and ULONGEST.
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_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 1238 of file avr-tdep.c.
References AVR_ARGN_REGNUM, avr_convert_iaddr_to_raw(), avr_convert_saddr_to_raw(), AVR_SP_REGNUM, gdbarch_tdep::call_length, check_typedef(), stack_item::data, extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_tdep(), len, stack_item::len, pop_stack_item(), push_stack_item(), regcache_cooked_write_unsigned(), regnum, TYPE_LENGTH, ULONGEST, value_contents(), value_type(), and write_memory().
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_read_pc | ( | struct regcache * | regcache | ) | [static] |
Definition at line 339 of file avr-tdep.c.
References avr_make_iaddr(), AVR_PC_REGNUM, regcache_cooked_read_unsigned(), and ULONGEST.
Referenced by avr_gdbarch_init().
static const char* avr_register_name | ( | struct gdbarch * | gdbarch, |
int | regnum | ||
) | [static] |
static struct type* avr_register_type | ( | struct gdbarch * | gdbarch, |
int | reg_nr | ||
) | [static, read] |
Definition at line 217 of file avr-tdep.c.
References AVR_PC_REGNUM, AVR_PSEUDO_PC_REGNUM, AVR_SP_REGNUM, builtin_type::builtin_data_ptr, builtin_type(), builtin_type::builtin_uint32, builtin_type::builtin_uint8, gdbarch_tdep(), and gdbarch_tdep::pc_type.
Referenced by avr_gdbarch_init().
static enum return_value_convention avr_return_value | ( | struct gdbarch * | gdbarch, |
struct value * | function, | ||
struct type * | valtype, | ||
struct regcache * | regcache, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf | ||
) | [static] |
Definition at line 901 of file avr-tdep.c.
References gdb_assert_not_reached, regcache_cooked_read(), regcache_cooked_write(), RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_LENGTH.
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_scan_prologue | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc_beg, | ||
CORE_ADDR | pc_end, | ||
struct avr_unwind_cache * | info | ||
) | [static] |
Definition at line 488 of file avr-tdep.c.
References _, trad_frame_saved_reg::addr, AVR_FP_REGNUM, AVR_LAST_PUSHED_REGNUM, AVR_MAX_PROLOGUE_SIZE, AVR_MAX_PUSHES, AVR_PROLOGUE_CALL, AVR_PROLOGUE_INTR, AVR_PROLOGUE_MAIN, AVR_PROLOGUE_NORMAL, AVR_PROLOGUE_SIG, AVR_SREG_REGNUM, avr_unwind_cache::base, gdbarch_tdep::call_length, extract_unsigned_integer(), fprintf_unfiltered(), from, gdb_assert, gdb_stderr, gdbarch_byte_order(), gdbarch_tdep(), len, locals, lookup_minimal_symbol(), memcmp(), avr_unwind_cache::prologue_type, read_memory(), avr_unwind_cache::saved_regs, avr_unwind_cache::size, and SYMBOL_VALUE_ADDRESS.
Referenced by avr_frame_unwind_cache(), and avr_skip_prologue().
static CORE_ADDR avr_skip_prologue | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 843 of file avr-tdep.c.
References AVR_PROLOGUE_NONE, avr_scan_prologue(), find_pc_partial_function(), max, avr_unwind_cache::prologue_type, avr_unwind_cache::saved_regs, and skip_prologue_using_sal().
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_unwind_pc | ( | struct gdbarch * | gdbarch, |
struct frame_info * | next_frame | ||
) | [static] |
Definition at line 1029 of file avr-tdep.c.
References avr_make_iaddr(), AVR_PC_REGNUM, frame_unwind_register_unsigned(), gdbarch_tdep::pc, and ULONGEST.
Referenced by avr_gdbarch_init().
static CORE_ADDR avr_unwind_sp | ( | struct gdbarch * | gdbarch, |
struct frame_info * | next_frame | ||
) | [static] |
Definition at line 1039 of file avr-tdep.c.
References avr_make_saddr(), AVR_SP_REGNUM, frame_unwind_register_unsigned(), gdbarch_tdep::sp, and ULONGEST.
Referenced by avr_gdbarch_init().
static void avr_write_pc | ( | struct regcache * | regcache, |
CORE_ADDR | val | ||
) | [static] |
Definition at line 347 of file avr-tdep.c.
References avr_convert_iaddr_to_raw(), AVR_PC_REGNUM, and regcache_cooked_write_unsigned().
Referenced by avr_gdbarch_init().
static struct stack_item * pop_stack_item | ( | struct stack_item * | si | ) | [static, read] |
Definition at line 1189 of file avr-tdep.c.
References stack_item::data, stack_item::prev, and xfree().
Referenced by avr_push_dummy_call().
static struct stack_item* push_stack_item | ( | struct stack_item * | prev, |
const bfd_byte * | contents, | ||
int | len | ||
) | [static, read] |
Definition at line 1176 of file avr-tdep.c.
References stack_item::data, len, stack_item::len, memcpy(), stack_item::prev, and xmalloc().
Referenced by avr_push_dummy_call().
Referenced by _initialize_avr_tdep(), and initialize_all_files().
struct frame_base avr_frame_base [static] |
{ &avr_frame_unwind, avr_frame_base_address, avr_frame_base_address, avr_frame_base_address }
Definition at line 1145 of file avr-tdep.c.
struct frame_unwind avr_frame_unwind [static] |
{ NORMAL_FRAME, default_frame_unwind_stop_reason, avr_frame_this_id, avr_frame_prev_register, NULL, default_frame_sniffer }
Definition at line 1127 of file avr-tdep.c.