GDB (xrefs)
|
#include "defs.h"
#include "opcode/i386.h"
#include "dis-asm.h"
#include "arch-utils.h"
#include "block.h"
#include "dummy-frame.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "inferior.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "objfiles.h"
#include "regcache.h"
#include "regset.h"
#include "symfile.h"
#include "disasm.h"
#include "gdb_assert.h"
#include "exceptions.h"
#include "amd64-tdep.h"
#include "i387-tdep.h"
#include "features/i386/amd64.c"
#include "features/i386/amd64-avx.c"
#include "features/i386/x32.c"
#include "features/i386/x32-avx.c"
#include "ax.h"
#include "ax-gdb.h"
Go to the source code of this file.
#define AMD64_NUM_LOWER_BYTE_REGS 16 |
Definition at line 242 of file amd64-tdep.c.
Referenced by amd64_pseudo_register_read_value(), and amd64_pseudo_register_write().
#define AMD64_NUM_SAVED_REGS AMD64_NUM_GREGS |
Definition at line 1664 of file amd64-tdep.c.
Referenced by amd64_frame_cache_1(), amd64_init_frame_cache(), and amd64_sigtramp_frame_cache().
enum amd64_reg_class |
AMD64_INTEGER | |
AMD64_SSE | |
AMD64_SSEUP | |
AMD64_X87 | |
AMD64_X87UP | |
AMD64_COMPLEX_X87 | |
AMD64_NO_CLASS | |
AMD64_MEMORY |
Definition at line 392 of file amd64-tdep.c.
void _initialize_amd64_tdep | ( | void | ) |
Definition at line 2985 of file amd64-tdep.c.
References initialize_tdesc_amd64(), initialize_tdesc_amd64_avx(), initialize_tdesc_x32(), and initialize_tdesc_x32_avx().
static int amd64_absolute_call_p | ( | const struct amd64_insn * | details | ) | [static] |
Definition at line 1343 of file amd64-tdep.c.
References amd64_insn::opcode_offset, and amd64_insn::raw_insn.
Referenced by amd64_call_p(), and amd64_displaced_step_fixup().
static int amd64_absolute_jmp_p | ( | const struct amd64_insn * | details | ) | [static] |
Definition at line 1324 of file amd64-tdep.c.
References amd64_insn::opcode_offset, and amd64_insn::raw_insn.
Referenced by amd64_displaced_step_fixup().
static struct amd64_frame_cache* amd64_alloc_frame_cache | ( | void | ) | [static, read] |
Definition at line 1713 of file amd64-tdep.c.
References amd64_init_frame_cache(), and FRAME_OBSTACK_ZALLOC.
Referenced by amd64_epilogue_frame_cache(), amd64_frame_cache(), and amd64_sigtramp_frame_cache().
static CORE_ADDR amd64_analyze_prologue | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc, | ||
CORE_ADDR | current_pc, | ||
struct amd64_frame_cache * | cache | ||
) | [static] |
Definition at line 2078 of file amd64-tdep.c.
References amd64_analyze_stack_align(), AMD64_RBP_REGNUM, amd64_x32_analyze_stack_align(), amd64_frame_cache::frameless_p, gdbarch_byte_order(), gdbarch_ptr_bit(), memcmp(), amd64_frame_cache::pc, read_memory(), read_memory_unsigned_integer(), amd64_frame_cache::saved_regs, and amd64_frame_cache::sp_offset.
Referenced by amd64_frame_cache_1(), and amd64_skip_prologue().
static CORE_ADDR amd64_analyze_stack_align | ( | CORE_ADDR | pc, |
CORE_ADDR | current_pc, | ||
struct amd64_frame_cache * | cache | ||
) | [static] |
Definition at line 1729 of file amd64-tdep.c.
References amd64_arch_reg_to_regnum(), min, offset, amd64_frame_cache::pc, amd64_frame_cache::saved_sp_reg, and target_read_memory().
Referenced by amd64_analyze_prologue().
static int amd64_arch_reg_to_regnum | ( | int | reg | ) | [static] |
Definition at line 225 of file amd64-tdep.c.
References gdb_assert.
Referenced by amd64_analyze_stack_align(), amd64_x32_analyze_stack_align(), and fixup_riprel().
static int amd64_call_p | ( | const struct amd64_insn * | details | ) | [static] |
Definition at line 1382 of file amd64-tdep.c.
References amd64_absolute_call_p(), amd64_insn::opcode_offset, and amd64_insn::raw_insn.
Referenced by amd64_displaced_step_fixup().
static void amd64_classify | ( | struct type * | type, |
enum amd64_reg_class | class[2] | ||
) | [static] |
Definition at line 562 of file amd64-tdep.c.
References amd64_classify_aggregate(), AMD64_COMPLEX_X87, AMD64_INTEGER, AMD64_NO_CLASS, AMD64_SSE, AMD64_SSEUP, AMD64_X87, AMD64_X87UP, code, len, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_COMPLEX, TYPE_CODE_DECFLOAT, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_LENGTH.
Referenced by amd64_classify_aggregate(), amd64_push_arguments(), and amd64_return_value().
static void amd64_classify_aggregate | ( | struct type * | type, |
enum amd64_reg_class | class[2] | ||
) | [static] |
Definition at line 459 of file amd64-tdep.c.
References amd64_classify(), AMD64_MEMORY, amd64_merge_classes(), AMD64_NO_CLASS, amd64_non_pod_p(), AMD64_SSE, AMD64_SSEUP, check_typedef(), field_is_static(), gdb_assert, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD, TYPE_FIELD_BITPOS, TYPE_FIELD_BITSIZE, TYPE_FIELD_TYPE, TYPE_LENGTH, TYPE_NFIELDS, and TYPE_TARGET_TYPE.
Referenced by amd64_classify().
static void amd64_collect_fpregset | ( | const struct regset * | regset, |
const struct regcache * | regcache, | ||
int | regnum, | ||
void * | fpregs, | ||
size_t | len | ||
) | [static] |
Definition at line 2721 of file amd64-tdep.c.
References amd64_collect_fxsave(), regset::arch, gdb_assert, gdbarch_tdep(), and gdbarch_tdep::sizeof_fpregset.
Referenced by amd64_regset_from_core_section().
void amd64_collect_fxsave | ( | const struct regcache * | regcache, |
int | regnum, | ||
void * | fxsave | ||
) |
Definition at line 3058 of file amd64-tdep.c.
References gdbarch_bfd_arch_info(), gdbarch_tdep(), get_regcache_arch(), i387_collect_fxsave(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, regcache_raw_collect(), and gdbarch_tdep::regs.
Referenced by amd64_collect_fpregset(), amd64_linux_store_inferior_registers(), amd64bsd_store_inferior_registers(), fill_fpregset(), and i386_darwin_store_inferior_registers().
void amd64_collect_xsave | ( | const struct regcache * | regcache, |
int | regnum, | ||
void * | xsave, | ||
int | gcore | ||
) |
Definition at line 3079 of file amd64-tdep.c.
References gdbarch_bfd_arch_info(), gdbarch_tdep(), get_regcache_arch(), i387_collect_xsave(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, regcache_raw_collect(), and gdbarch_tdep::regs.
Referenced by amd64_collect_xstateregset(), and amd64_linux_store_inferior_registers().
static void amd64_collect_xstateregset | ( | const struct regset * | regset, |
const struct regcache * | regcache, | ||
int | regnum, | ||
void * | xstateregs, | ||
size_t | len | ||
) | [static] |
Definition at line 2744 of file amd64-tdep.c.
References amd64_collect_xsave().
Referenced by amd64_regset_from_core_section().
struct displaced_step_closure* amd64_displaced_step_copy_insn | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | from, | ||
CORE_ADDR | to, | ||
struct regcache * | regs | ||
) | [read] |
Definition at line 1272 of file amd64-tdep.c.
References amd64_get_insn_details(), amd64_syscall_p(), debug_displaced, displaced_step_dump_bytes(), fixup_displaced_copy(), fprintf_unfiltered(), gdb_stdlog, gdbarch_max_insn_length(), displaced_step_closure::insn_buf, displaced_step_closure::insn_details, len, displaced_step_closure::max_len, memset(), amd64_insn::opcode_offset, paddress(), read_memory(), displaced_step_closure::tmp_used, write_memory(), and xmalloc().
Referenced by amd64_linux_init_abi_common().
void amd64_displaced_step_fixup | ( | struct gdbarch * | gdbarch, |
struct displaced_step_closure * | dsc, | ||
CORE_ADDR | from, | ||
CORE_ADDR | to, | ||
struct regcache * | regs | ||
) |
Definition at line 1417 of file amd64-tdep.c.
References amd64_absolute_call_p(), amd64_absolute_jmp_p(), amd64_call_p(), amd64_ret_p(), AMD64_RIP_REGNUM, AMD64_RSP_REGNUM, amd64_syscall_p(), debug_displaced, fprintf_unfiltered(), from, gdb_stdlog, gdbarch_byte_order(), displaced_step_closure::insn_buf, displaced_step_closure::insn_details, paddress(), read_memory_unsigned_integer(), regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), displaced_step_closure::tmp_regno, displaced_step_closure::tmp_save, displaced_step_closure::tmp_used, ULONGEST, and write_memory_unsigned_integer().
Referenced by amd64_linux_init_abi_common().
static struct frame_id amd64_dummy_id | ( | struct gdbarch * | gdbarch, |
struct frame_info * | this_frame | ||
) | [static, read] |
Definition at line 2683 of file amd64-tdep.c.
References AMD64_RBP_REGNUM, frame_id_build(), get_frame_pc(), and get_frame_register_unsigned().
Referenced by amd64_init_abi().
static int amd64_dwarf_reg_to_regnum | ( | struct gdbarch * | gdbarch, |
int | reg | ||
) | [static] |
Definition at line 178 of file amd64-tdep.c.
References _, amd64_dwarf_regmap, amd64_dwarf_regmap_len, gdbarch_tdep(), i386_xmm_regnum_p(), I387_XMM0_REGNUM, regnum, warning(), and gdbarch_tdep::ymm0_regnum.
Referenced by amd64_init_abi().
static struct amd64_frame_cache* amd64_epilogue_frame_cache | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static, read] |
Definition at line 2607 of file amd64-tdep.c.
References amd64_alloc_frame_cache(), AMD64_RIP_REGNUM, AMD64_RSP_REGNUM, amd64_frame_cache::base, amd64_frame_cache::base_p, gdbarch::byte_order, gdb_exception::error, extract_unsigned_integer(), gdbarch_byte_order(), get_frame_arch(), get_frame_pc(), get_frame_register(), NOT_AVAILABLE_ERROR, amd64_frame_cache::pc, gdb_exception::reason, RETURN_MASK_ERROR, amd64_frame_cache::saved_regs, amd64_frame_cache::saved_sp, amd64_frame_cache::sp_offset, throw_exception(), and TRY_CATCH.
Referenced by amd64_epilogue_frame_this_id(), and amd64_epilogue_frame_unwind_stop_reason().
static int amd64_epilogue_frame_sniffer | ( | const struct frame_unwind * | self, |
struct frame_info * | this_frame, | ||
void ** | this_prologue_cache | ||
) | [static] |
Definition at line 2595 of file amd64-tdep.c.
References amd64_in_function_epilogue_p(), frame_relative_level(), get_frame_arch(), and get_frame_pc().
static void amd64_epilogue_frame_this_id | ( | struct frame_info * | this_frame, |
void ** | this_cache, | ||
struct frame_id * | this_id | ||
) | [static] |
Definition at line 2659 of file amd64-tdep.c.
References amd64_epilogue_frame_cache(), amd64_frame_cache::base, amd64_frame_cache::base_p, frame_id_build(), and amd64_frame_cache::pc.
static enum unwind_stop_reason amd64_epilogue_frame_unwind_stop_reason | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static] |
Definition at line 2646 of file amd64-tdep.c.
References amd64_epilogue_frame_cache(), and amd64_frame_cache::base_p.
static CORE_ADDR amd64_frame_align | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | sp | ||
) | [static] |
Definition at line 2695 of file amd64-tdep.c.
Referenced by amd64_init_abi().
static CORE_ADDR amd64_frame_base_address | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static] |
Definition at line 2553 of file amd64-tdep.c.
References amd64_frame_cache(), and amd64_frame_cache::base.
static struct amd64_frame_cache* amd64_frame_cache | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static, read] |
Definition at line 2329 of file amd64-tdep.c.
References amd64_alloc_frame_cache(), amd64_frame_cache_1(), gdb_exception::error, NOT_AVAILABLE_ERROR, gdb_exception::reason, RETURN_MASK_ERROR, throw_exception(), and TRY_CATCH.
Referenced by amd64_frame_base_address(), amd64_frame_prev_register(), amd64_frame_this_id(), and amd64_frame_unwind_stop_reason().
static void amd64_frame_cache_1 | ( | struct frame_info * | this_frame, |
struct amd64_frame_cache * | cache | ||
) | [static] |
Definition at line 2260 of file amd64-tdep.c.
References amd64_analyze_prologue(), AMD64_NUM_SAVED_REGS, AMD64_RBP_REGNUM, AMD64_RIP_REGNUM, AMD64_RSP_REGNUM, amd64_frame_cache::base, amd64_frame_cache::base_p, gdbarch::byte_order, extract_unsigned_integer(), amd64_frame_cache::frameless_p, gdbarch_byte_order(), get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register(), amd64_frame_cache::pc, amd64_frame_cache::saved_regs, amd64_frame_cache::saved_sp, amd64_frame_cache::saved_sp_reg, and amd64_frame_cache::sp_offset.
Referenced by amd64_frame_cache().
static struct value* amd64_frame_prev_register | ( | struct frame_info * | this_frame, |
void ** | this_cache, | ||
int | regnum | ||
) | [static, read] |
Definition at line 2385 of file amd64-tdep.c.
References amd64_frame_cache(), frame_unwind_got_constant(), frame_unwind_got_memory(), frame_unwind_got_register(), gdb_assert, gdbarch_sp_regnum(), get_frame_arch(), amd64_frame_cache::saved_regs, and amd64_frame_cache::saved_sp.
Referenced by amd64_sigtramp_frame_prev_register().
static void amd64_frame_this_id | ( | struct frame_info * | this_frame, |
void ** | this_cache, | ||
struct frame_id * | this_id | ||
) | [static] |
Definition at line 2368 of file amd64-tdep.c.
References amd64_frame_cache(), amd64_frame_cache::base, amd64_frame_cache::base_p, frame_id_build(), and amd64_frame_cache::pc.
static enum unwind_stop_reason amd64_frame_unwind_stop_reason | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static] |
Definition at line 2351 of file amd64-tdep.c.
References amd64_frame_cache(), amd64_frame_cache::base, and amd64_frame_cache::base_p.
static void amd64_gen_return_address | ( | struct gdbarch * | gdbarch, |
struct agent_expr * | ax, | ||
struct axs_value * | value, | ||
CORE_ADDR | scope | ||
) | [static] |
Definition at line 2417 of file amd64-tdep.c.
References AMD64_RBP_REGNUM, AMD64_RIP_REGNUM, ax_const_l(), ax_reg(), ax_simple(), axs_lvalue_memory, axs_value::kind, register_type(), and axs_value::type.
Referenced by amd64_init_abi().
static void amd64_get_insn_details | ( | gdb_byte * | insn, |
struct amd64_insn * | details | ||
) | [static] |
Definition at line 1130 of file amd64-tdep.c.
References amd64_skip_prefixes(), amd64_insn::modrm_offset, amd64_insn::opcode_len, amd64_insn::opcode_offset, amd64_insn::raw_insn, amd64_insn::rex_offset, and rex_prefix_p().
Referenced by amd64_displaced_step_copy_insn(), and amd64_relocate_instruction().
static int amd64_get_longjmp_target | ( | struct frame_info * | frame, |
CORE_ADDR * | pc | ||
) | [static] |
Definition at line 2790 of file amd64-tdep.c.
References AMD64_RDI_REGNUM, extract_typed_address(), gdbarch_tdep(), get_frame_arch(), get_frame_register(), gdbarch_tdep::jb_pc_offset, len, target_read_memory(), and TYPE_LENGTH.
Referenced by amd64_init_abi().
static int amd64_get_unused_input_int_reg | ( | const struct amd64_insn * | details | ) | [static] |
Definition at line 1061 of file amd64-tdep.c.
References _, gdb_assert, internal_error(), amd64_insn::modrm_offset, amd64_insn::opcode_len, amd64_insn::opcode_offset, and amd64_insn::raw_insn.
Referenced by fixup_riprel().
static int amd64_in_function_epilogue_p | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 2576 of file amd64-tdep.c.
References symtab::epilogue_unwind_valid, find_pc_symtab(), and target_read_memory().
Referenced by amd64_epilogue_frame_sniffer().
void amd64_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch | ||
) |
Definition at line 2825 of file amd64-tdep.c.
References amd64_dummy_id(), amd64_dwarf_reg_to_regnum(), AMD64_EFLAGS_REGNUM, amd64_frame_align(), amd64_gen_return_address(), amd64_get_longjmp_target(), AMD64_NUM_GREGS, AMD64_NUM_REGS, amd64_pseudo_register_name(), amd64_pseudo_register_read_value(), amd64_pseudo_register_write(), amd64_push_dummy_call(), amd64_record_regmap, amd64_register_names, amd64_regset_from_core_section(), amd64_relocate_instruction(), amd64_return_value(), AMD64_RIP_REGNUM, AMD64_RSP_REGNUM, amd64_skip_prologue(), AMD64_ST0_REGNUM, AMD64_YMM0H_REGNUM, amd64_ymmh_names, frame_base_set_default(), frame_unwind_append_unwinder(), frame_unwind_prepend_unwinder(), gdbarch_tdep(), gdbarch_tdep::gregset_reg_offset, i386_stap_is_single_operand(), i386_stap_parse_special_token(), i387_convert_register_p(), I387_NUM_REGS, i387_register_to_value(), I387_SIZEOF_FXSAVE, i387_value_to_register(), gdbarch_tdep::num_byte_regs, gdbarch_tdep::num_core_regs, gdbarch_tdep::num_dword_regs, gdbarch_tdep::num_mmx_regs, gdbarch_tdep::num_word_regs, gdbarch_tdep::num_xmm_regs, gdbarch_tdep::num_ymm_regs, gdbarch_tdep::record_regmap, gdbarch_tdep::register_names, set_gdbarch_convert_register_p(), set_gdbarch_dummy_id(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_fp0_regnum(), set_gdbarch_frame_align(), set_gdbarch_frame_red_zone_size(), set_gdbarch_gen_return_address(), set_gdbarch_get_longjmp_target(), set_gdbarch_long_bit(), set_gdbarch_long_double_bit(), set_gdbarch_long_long_bit(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_ps_regnum(), set_gdbarch_pseudo_register_read_value(), set_gdbarch_pseudo_register_write(), set_gdbarch_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_register_to_value(), set_gdbarch_regset_from_core_section(), set_gdbarch_relocate_instruction(), set_gdbarch_return_value(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_stab_reg_to_regnum(), set_gdbarch_stap_integer_prefix(), set_gdbarch_stap_is_single_operand(), set_gdbarch_stap_parse_special_token(), set_gdbarch_stap_register_indirection_prefix(), set_gdbarch_stap_register_indirection_suffix(), set_gdbarch_stap_register_prefix(), set_gdbarch_value_to_register(), set_tdesc_pseudo_register_name(), gdbarch_tdep::sizeof_fpregset, gdbarch_tdep::st0_regnum, gdbarch_info::target_desc, gdbarch_tdep::tdesc, tdesc_amd64, tdesc_find_feature(), tdesc_has_registers(), gdbarch_tdep::ymm0h_regnum, and gdbarch_tdep::ymmh_register_names.
Referenced by amd64_dicos_init_abi(), amd64_linux_init_abi(), amd64_sol2_init_abi(), amd64_windows_init_abi(), amd64_x32_init_abi(), amd64fbsd_init_abi(), amd64nbsd_init_abi(), amd64obsd_init_abi(), and x86_darwin_init_abi_64().
static void amd64_init_frame_cache | ( | struct amd64_frame_cache * | cache | ) | [static] |
Definition at line 1686 of file amd64-tdep.c.
References AMD64_NUM_SAVED_REGS, amd64_frame_cache::base, amd64_frame_cache::base_p, amd64_frame_cache::frameless_p, amd64_frame_cache::pc, amd64_frame_cache::saved_regs, amd64_frame_cache::saved_sp, amd64_frame_cache::saved_sp_reg, and amd64_frame_cache::sp_offset.
Referenced by amd64_alloc_frame_cache(), and amd64_skip_prologue().
static enum amd64_reg_class amd64_merge_classes | ( | enum amd64_reg_class | class1, |
enum amd64_reg_class | class2 | ||
) | [static] |
Definition at line 408 of file amd64-tdep.c.
References AMD64_COMPLEX_X87, AMD64_INTEGER, AMD64_MEMORY, AMD64_NO_CLASS, AMD64_SSE, AMD64_X87, and AMD64_X87UP.
Referenced by amd64_classify_aggregate().
static int amd64_non_pod_p | ( | struct type * | type | ) | [static] |
Definition at line 445 of file amd64-tdep.c.
References TYPE_CODE, TYPE_CODE_STRUCT, and TYPE_N_BASECLASSES.
Referenced by amd64_classify_aggregate().
static const char* amd64_pseudo_register_name | ( | struct gdbarch * | gdbarch, |
int | regnum | ||
) | [static] |
Definition at line 264 of file amd64-tdep.c.
References gdbarch_tdep::al_regnum, amd64_ymm_names, gdbarch_tdep::ax_regnum, gdbarch_tdep::eax_regnum, gdbarch_tdep(), i386_byte_regnum_p(), i386_dword_regnum_p(), i386_pseudo_register_name(), i386_word_regnum_p(), i386_ymm_regnum_p(), and gdbarch_tdep::ymm0_regnum.
Referenced by amd64_init_abi().
static struct value* amd64_pseudo_register_read_value | ( | struct gdbarch * | gdbarch, |
struct regcache * | regcache, | ||
int | regnum | ||
) | [static, read] |
Definition at line 280 of file amd64-tdep.c.
References gdbarch_tdep::al_regnum, allocate_value(), AMD64_NUM_LOWER_BYTE_REGS, gdbarch_tdep::eax_regnum, gdbarch_tdep(), i386_byte_regnum_p(), i386_dword_regnum_p(), i386_pseudo_register_read_into_value(), lval_register, mark_value_bytes_unavailable(), MAX_REGISTER_SIZE, memcpy(), REG_VALID, regcache_raw_read(), register_type(), regnum, exsummary::status, TYPE_LENGTH, value_contents_raw(), VALUE_LVAL, VALUE_REGNUM, and value_type().
Referenced by amd64_init_abi().
static void amd64_pseudo_register_write | ( | struct gdbarch * | gdbarch, |
struct regcache * | regcache, | ||
int | regnum, | ||
const gdb_byte * | buf | ||
) | [static] |
Definition at line 341 of file amd64-tdep.c.
References gdbarch_tdep::al_regnum, AMD64_NUM_LOWER_BYTE_REGS, gdbarch_tdep::eax_regnum, gdbarch_tdep(), i386_byte_regnum_p(), i386_dword_regnum_p(), i386_pseudo_register_write(), MAX_REGISTER_SIZE, memcpy(), regcache_raw_read(), and regcache_raw_write().
Referenced by amd64_init_abi().
static CORE_ADDR amd64_push_arguments | ( | struct regcache * | regcache, |
int | nargs, | ||
struct value ** | args, | ||
CORE_ADDR | sp, | ||
int | struct_return | ||
) | [static] |
Definition at line 759 of file amd64-tdep.c.
References amd64_classify(), AMD64_INTEGER, AMD64_R8_REGNUM, AMD64_R9_REGNUM, AMD64_RAX_REGNUM, AMD64_RCX_REGNUM, AMD64_RDI_REGNUM, AMD64_RDX_REGNUM, AMD64_RSI_REGNUM, AMD64_SSE, AMD64_SSEUP, AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM, gdb_assert, len, memcpy(), memset(), min, offset, regcache_raw_write_part(), regcache_raw_write_unsigned(), regnum, TYPE_LENGTH, value_contents(), value_type(), and write_memory().
Referenced by amd64_push_dummy_call().
static CORE_ADDR amd64_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 891 of file amd64-tdep.c.
References amd64_push_arguments(), AMD64_RBP_REGNUM, AMD64_RDI_REGNUM, AMD64_RSP_REGNUM, gdbarch_byte_order(), regcache_cooked_write(), store_unsigned_integer(), and write_memory().
Referenced by amd64_init_abi().
static struct regset* amd64_regset_from_core_section | ( | struct gdbarch * | gdbarch, |
const char * | sect_name, | ||
size_t | sect_size | ||
) | [static, read] |
Definition at line 2755 of file amd64-tdep.c.
References amd64_collect_fpregset(), amd64_collect_xstateregset(), amd64_supply_fpregset(), amd64_supply_xstateregset(), gdbarch_tdep::fpregset, gdbarch_tdep(), i386_regset_from_core_section(), regset_alloc(), gdbarch_tdep::sizeof_fpregset, and gdbarch_tdep::xstateregset.
Referenced by amd64_init_abi().
static void amd64_relocate_instruction | ( | struct gdbarch * | gdbarch, |
CORE_ADDR * | to, | ||
CORE_ADDR | oldloc | ||
) | [static] |
Definition at line 1569 of file amd64-tdep.c.
References amd64_get_insn_details(), amd64_skip_prefixes(), append_insns(), debug_displaced, extract_signed_integer(), fprintf_unfiltered(), gdb_buffered_insn_length(), gdb_stdlog, gdbarch_byte_order(), gdbarch_max_insn_length(), hex_string(), len, LONGEST, memset(), offset, paddress(), read_memory(), rip_relative_offset(), store_signed_integer(), store_unsigned_integer(), to, and xmalloc().
Referenced by amd64_init_abi().
static int amd64_ret_p | ( | const struct amd64_insn * | details | ) | [static] |
Definition at line 1362 of file amd64-tdep.c.
References amd64_insn::opcode_offset, and amd64_insn::raw_insn.
Referenced by amd64_displaced_step_fixup().
static enum return_value_convention amd64_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 625 of file amd64-tdep.c.
References amd64_classify(), AMD64_COMPLEX_X87, AMD64_FTAG_REGNUM, AMD64_INTEGER, AMD64_MEMORY, AMD64_NO_CLASS, AMD64_RAX_REGNUM, AMD64_RDX_REGNUM, AMD64_SSE, AMD64_SSEUP, AMD64_ST0_REGNUM, AMD64_ST1_REGNUM, AMD64_X87, AMD64_X87UP, AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM, gdb_assert, i387_return_value(), len, min, offset, read_memory(), regcache_raw_read(), regcache_raw_read_part(), regcache_raw_read_unsigned(), regcache_raw_write(), regcache_raw_write_part(), regcache_raw_write_unsigned(), regnum, RETURN_VALUE_ABI_RETURNS_ADDRESS, RETURN_VALUE_REGISTER_CONVENTION, TYPE_LENGTH, and ULONGEST.
Referenced by amd64_init_abi().
static struct amd64_frame_cache* amd64_sigtramp_frame_cache | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static, read] |
Definition at line 2438 of file amd64-tdep.c.
References amd64_alloc_frame_cache(), AMD64_NUM_SAVED_REGS, AMD64_RSP_REGNUM, amd64_frame_cache::base, amd64_frame_cache::base_p, gdb_exception::error, extract_unsigned_integer(), gdb_assert, gdbarch_byte_order(), gdbarch_tdep(), get_frame_arch(), get_frame_register(), NOT_AVAILABLE_ERROR, gdb_exception::reason, RETURN_MASK_ERROR, amd64_frame_cache::saved_regs, gdbarch_tdep::sc_num_regs, gdbarch_tdep::sc_reg_offset, gdbarch_tdep::sigcontext_addr, throw_exception(), and TRY_CATCH.
Referenced by amd64_sigtramp_frame_prev_register(), amd64_sigtramp_frame_this_id(), and amd64_sigtramp_frame_unwind_stop_reason().
static struct value* amd64_sigtramp_frame_prev_register | ( | struct frame_info * | this_frame, |
void ** | this_cache, | ||
int | regnum | ||
) | [static, read] |
Definition at line 2502 of file amd64-tdep.c.
References amd64_frame_prev_register(), and amd64_sigtramp_frame_cache().
static int amd64_sigtramp_frame_sniffer | ( | const struct frame_unwind * | self, |
struct frame_info * | this_frame, | ||
void ** | this_cache | ||
) | [static] |
Definition at line 2512 of file amd64-tdep.c.
References gdb_assert, gdbarch_tdep(), get_frame_arch(), get_frame_pc(), gdbarch_tdep::pc, gdbarch_tdep::sigcontext_addr, gdbarch_tdep::sigtramp_end, gdbarch_tdep::sigtramp_p, and gdbarch_tdep::sigtramp_start.
static void amd64_sigtramp_frame_this_id | ( | struct frame_info * | this_frame, |
void ** | this_cache, | ||
struct frame_id * | this_id | ||
) | [static] |
Definition at line 2489 of file amd64-tdep.c.
References amd64_sigtramp_frame_cache(), amd64_frame_cache::base, amd64_frame_cache::base_p, frame_id_build(), and get_frame_pc().
static enum unwind_stop_reason amd64_sigtramp_frame_unwind_stop_reason | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static] |
Definition at line 2476 of file amd64-tdep.c.
References amd64_sigtramp_frame_cache(), and amd64_frame_cache::base_p.
static gdb_byte* amd64_skip_prefixes | ( | gdb_byte * | insn | ) | [static] |
Definition at line 1025 of file amd64-tdep.c.
Referenced by amd64_get_insn_details(), and amd64_relocate_instruction().
static CORE_ADDR amd64_skip_prologue | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | start_pc | ||
) | [static] |
Definition at line 2226 of file amd64-tdep.c.
References amd64_analyze_prologue(), amd64_init_frame_cache(), amd64_skip_xmm_prologue(), find_pc_partial_function(), find_pc_symtab(), amd64_frame_cache::frameless_p, max, amd64_frame_cache::pc, symtab::producer, and skip_prologue_using_sal().
Referenced by amd64_init_abi().
static CORE_ADDR amd64_skip_xmm_prologue | ( | CORE_ADDR | pc, |
CORE_ADDR | start_pc | ||
) | [static] |
Definition at line 2162 of file amd64-tdep.c.
References symtab_and_line::end, find_pc_sect_line(), symtab_and_line::line, offset, symtab_and_line::pc, symtab::producer, producer_is_gcc_ge_4(), symtab_and_line::symtab, and target_read_memory().
Referenced by amd64_skip_prologue().
static void amd64_supply_fpregset | ( | const struct regset * | regset, |
struct regcache * | regcache, | ||
int | regnum, | ||
const void * | fpregs, | ||
size_t | len | ||
) | [static] |
Definition at line 2706 of file amd64-tdep.c.
References amd64_supply_fxsave(), regset::arch, gdb_assert, gdbarch_tdep(), and gdbarch_tdep::sizeof_fpregset.
Referenced by amd64_regset_from_core_section().
void amd64_supply_fxsave | ( | struct regcache * | regcache, |
int | regnum, | ||
const void * | fxsave | ||
) |
Definition at line 3007 of file amd64-tdep.c.
References gdbarch_bfd_arch_info(), gdbarch_tdep(), get_regcache_arch(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, i387_supply_fxsave(), regcache_raw_supply(), and gdbarch_tdep::regs.
Referenced by amd64_linux_fetch_inferior_registers(), amd64_supply_fpregset(), amd64bsd_fetch_inferior_registers(), amd64obsd_supply_regset(), i386_darwin_fetch_inferior_registers(), and supply_fpregset().
void amd64_supply_xsave | ( | struct regcache * | regcache, |
int | regnum, | ||
const void * | xsave | ||
) |
Definition at line 3030 of file amd64-tdep.c.
References gdbarch_bfd_arch_info(), gdbarch_tdep(), get_regcache_arch(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, i387_supply_xsave(), regcache_raw_supply(), and gdbarch_tdep::regs.
Referenced by amd64_linux_fetch_inferior_registers(), and amd64_supply_xstateregset().
static void amd64_supply_xstateregset | ( | const struct regset * | regset, |
struct regcache * | regcache, | ||
int | regnum, | ||
const void * | xstateregs, | ||
size_t | len | ||
) | [static] |
Definition at line 2734 of file amd64-tdep.c.
References amd64_supply_xsave().
Referenced by amd64_regset_from_core_section().
static int amd64_syscall_p | ( | const struct amd64_insn * | insn, |
int * | lengthp | ||
) | [static] |
Definition at line 1400 of file amd64-tdep.c.
References amd64_insn::opcode_offset, and amd64_insn::raw_insn.
Referenced by amd64_displaced_step_copy_insn(), and amd64_displaced_step_fixup().
static CORE_ADDR amd64_x32_analyze_stack_align | ( | CORE_ADDR | pc, |
CORE_ADDR | current_pc, | ||
struct amd64_frame_cache * | cache | ||
) | [static] |
Definition at line 1880 of file amd64-tdep.c.
References amd64_arch_reg_to_regnum(), min, offset, amd64_frame_cache::pc, amd64_frame_cache::saved_sp_reg, and target_read_memory().
Referenced by amd64_analyze_prologue().
void amd64_x32_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch | ||
) |
Definition at line 2963 of file amd64-tdep.c.
References amd64_init_abi(), amd64_x32_pseudo_register_type(), gdbarch_tdep(), gdbarch_tdep::num_dword_regs, set_gdbarch_long_bit(), set_gdbarch_ptr_bit(), set_tdesc_pseudo_register_type(), gdbarch_info::target_desc, gdbarch_tdep::tdesc, tdesc_has_registers(), and tdesc_x32.
Referenced by amd64_x32_linux_init_abi().
static struct type* amd64_x32_pseudo_register_type | ( | struct gdbarch * | gdbarch, |
int | regnum | ||
) | [static, read] |
Definition at line 2946 of file amd64-tdep.c.
References AMD64_RBP_REGNUM, AMD64_RIP_REGNUM, AMD64_RSP_REGNUM, builtin_type::builtin_data_ptr, builtin_type::builtin_func_ptr, builtin_type(), gdbarch_tdep::eax_regnum, gdbarch_tdep(), and i386_pseudo_register_type().
Referenced by amd64_x32_init_abi().
static void append_insns | ( | CORE_ADDR * | to, |
ULONGEST | len, | ||
const gdb_byte * | buf | ||
) | [static] |
Definition at line 1562 of file amd64-tdep.c.
References len, and target_write_memory().
Referenced by amd64_relocate_instruction().
static void fixup_displaced_copy | ( | struct gdbarch * | gdbarch, |
struct displaced_step_closure * | dsc, | ||
CORE_ADDR | from, | ||
CORE_ADDR | to, | ||
struct regcache * | regs | ||
) | [static] |
Definition at line 1252 of file amd64-tdep.c.
References fixup_riprel(), displaced_step_closure::insn_details, amd64_insn::modrm_offset, and amd64_insn::raw_insn.
Referenced by amd64_displaced_step_copy_insn().
static void fixup_riprel | ( | struct gdbarch * | gdbarch, |
struct displaced_step_closure * | dsc, | ||
CORE_ADDR | from, | ||
CORE_ADDR | to, | ||
struct regcache * | regs | ||
) | [static] |
Definition at line 1200 of file amd64-tdep.c.
References amd64_arch_reg_to_regnum(), amd64_get_unused_input_int_reg(), debug_displaced, extract_signed_integer(), fprintf_unfiltered(), gdb_buffered_insn_length(), gdb_stdlog, gdbarch_byte_order(), displaced_step_closure::insn_buf, displaced_step_closure::insn_details, displaced_step_closure::max_len, amd64_insn::modrm_offset, paddress(), amd64_insn::raw_insn, regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), amd64_insn::rex_offset, displaced_step_closure::tmp_regno, displaced_step_closure::tmp_save, displaced_step_closure::tmp_used, and ULONGEST.
Referenced by fixup_displaced_copy().
static int rex_prefix_p | ( | gdb_byte | pfx | ) | [static] |
Definition at line 1015 of file amd64-tdep.c.
Referenced by amd64_get_insn_details().
static int rip_relative_offset | ( | struct amd64_insn * | insn | ) | [static] |
Definition at line 1545 of file amd64-tdep.c.
References amd64_insn::modrm_offset, and amd64_insn::raw_insn.
Referenced by amd64_relocate_instruction().
const int amd64_arch_regmap[16] [static] |
{ AMD64_RAX_REGNUM, AMD64_RCX_REGNUM, AMD64_RDX_REGNUM, AMD64_RBX_REGNUM, AMD64_RSP_REGNUM, AMD64_RBP_REGNUM, AMD64_RSI_REGNUM, AMD64_RDI_REGNUM, AMD64_R8_REGNUM, AMD64_R9_REGNUM, AMD64_R10_REGNUM, AMD64_R11_REGNUM, AMD64_R12_REGNUM, AMD64_R13_REGNUM, AMD64_R14_REGNUM, AMD64_R15_REGNUM }
Definition at line 198 of file amd64-tdep.c.
const int amd64_arch_regmap_len [static] |
(sizeof (amd64_arch_regmap) / sizeof (amd64_arch_regmap[0]))
Definition at line 218 of file amd64-tdep.c.
const char* amd64_byte_names[] [static] |
{ "al", "bl", "cl", "dl", "sil", "dil", "bpl", "spl", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l", "ah", "bh", "ch", "dh" }
Definition at line 234 of file amd64-tdep.c.
int amd64_dwarf_regmap[] [static] |
Definition at line 98 of file amd64-tdep.c.
Referenced by amd64_dwarf_reg_to_regnum().
const int amd64_dwarf_regmap_len [static] |
(sizeof (amd64_dwarf_regmap) / sizeof (amd64_dwarf_regmap[0]))
Definition at line 171 of file amd64-tdep.c.
Referenced by amd64_dwarf_reg_to_regnum().
const char* amd64_dword_names[] [static] |
{ "eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "esp", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d", "eip" }
Definition at line 254 of file amd64-tdep.c.
struct frame_unwind amd64_epilogue_frame_unwind [static] |
{ NORMAL_FRAME, amd64_epilogue_frame_unwind_stop_reason, amd64_epilogue_frame_this_id, amd64_frame_prev_register, NULL, amd64_epilogue_frame_sniffer }
Definition at line 2672 of file amd64-tdep.c.
struct frame_base amd64_frame_base [static] |
{ &amd64_frame_unwind, amd64_frame_base_address, amd64_frame_base_address, amd64_frame_base_address }
Definition at line 2561 of file amd64-tdep.c.
struct frame_unwind amd64_frame_unwind [static] |
{ NORMAL_FRAME, amd64_frame_unwind_stop_reason, amd64_frame_this_id, amd64_frame_prev_register, NULL, default_frame_sniffer }
Definition at line 2404 of file amd64-tdep.c.
const int amd64_record_regmap[] [static] |
{ AMD64_RAX_REGNUM, AMD64_RCX_REGNUM, AMD64_RDX_REGNUM, AMD64_RBX_REGNUM, AMD64_RSP_REGNUM, AMD64_RBP_REGNUM, AMD64_RSI_REGNUM, AMD64_RDI_REGNUM, AMD64_R8_REGNUM, AMD64_R9_REGNUM, AMD64_R10_REGNUM, AMD64_R11_REGNUM, AMD64_R12_REGNUM, AMD64_R13_REGNUM, AMD64_R14_REGNUM, AMD64_R15_REGNUM, AMD64_RIP_REGNUM, AMD64_EFLAGS_REGNUM, AMD64_CS_REGNUM, AMD64_SS_REGNUM, AMD64_DS_REGNUM, AMD64_ES_REGNUM, AMD64_FS_REGNUM, AMD64_GS_REGNUM }
Definition at line 2814 of file amd64-tdep.c.
Referenced by amd64_init_abi().
const char* amd64_register_names[] [static] |
{ "rax", "rbx", "rcx", "rdx", "rsi", "rdi", "rbp", "rsp", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "rip", "eflags", "cs", "ss", "ds", "es", "fs", "gs", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "fctrl", "fstat", "ftag", "fiseg", "fioff", "foseg", "fooff", "fop", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15", "mxcsr", }
Definition at line 61 of file amd64-tdep.c.
Referenced by amd64_init_abi().
struct frame_unwind amd64_sigtramp_frame_unwind [static] |
{ SIGTRAMP_FRAME, amd64_sigtramp_frame_unwind_stop_reason, amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register, NULL, amd64_sigtramp_frame_sniffer }
Definition at line 2541 of file amd64-tdep.c.
const char* amd64_word_names[] [static] |
{ "ax", "bx", "cx", "dx", "si", "di", "bp", "", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }
Definition at line 246 of file amd64-tdep.c.
const char* amd64_ymm_names[] [static] |
{ "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", "ymm7", "ymm8", "ymm9", "ymm10", "ymm11", "ymm12", "ymm13", "ymm14", "ymm15" }
Definition at line 79 of file amd64-tdep.c.
Referenced by amd64_pseudo_register_name().
const char* amd64_ymmh_names[] [static] |
{ "ymm0h", "ymm1h", "ymm2h", "ymm3h", "ymm4h", "ymm5h", "ymm6h", "ymm7h", "ymm8h", "ymm9h", "ymm10h", "ymm11h", "ymm12h", "ymm13h", "ymm14h", "ymm15h" }
Definition at line 87 of file amd64-tdep.c.
Referenced by amd64_init_abi().
const unsigned char onebyte_has_modrm[256] [static] |
{ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 }
Definition at line 966 of file amd64-tdep.c.
const unsigned char twobyte_has_modrm[256] [static] |
{ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 }
Definition at line 989 of file amd64-tdep.c.