GDB (xrefs)

Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/amd64-tdep.h File Reference
`#include "i386-tdep.h"`

Go to the source code of this file.

## Macros
#define | AMD64_NUM_GREGS 24
#define | AMD64_NUM_REGS (AMD64_GSBASE_REGNUM + 1)

## Enumerations
enum | amd64_regnum { AMD64_RAX_REGNUM, AMD64_RBX_REGNUM, AMD64_RCX_REGNUM, AMD64_RDX_REGNUM, AMD64_RSI_REGNUM, AMD64_RDI_REGNUM, AMD64_RBP_REGNUM, AMD64_RSP_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, AMD64_ST0_REGNUM = 24, AMD64_ST1_REGNUM, AMD64_FCTRL_REGNUM = AMD64_ST0_REGNUM + 8, AMD64_FSTAT_REGNUM = AMD64_ST0_REGNUM + 9, AMD64_FTAG_REGNUM = AMD64_ST0_REGNUM + 10, AMD64_XMM0_REGNUM = 40, AMD64_XMM1_REGNUM, AMD64_MXCSR_REGNUM = AMD64_XMM0_REGNUM + 16, AMD64_YMM0H_REGNUM, AMD64_YMM15H_REGNUM = AMD64_YMM0H_REGNUM + 15, AMD64_BND0R_REGNUM = AMD64_YMM15H_REGNUM + 1, AMD64_BND3R_REGNUM = AMD64_BND0R_REGNUM + 3, AMD64_BNDCFGU_REGNUM, AMD64_BNDSTATUS_REGNUM, AMD64_XMM16_REGNUM, AMD64_XMM31_REGNUM = AMD64_XMM16_REGNUM + 15, AMD64_YMM16H_REGNUM, AMD64_YMM31H_REGNUM = AMD64_YMM16H_REGNUM + 15, AMD64_K0_REGNUM, AMD64_K7_REGNUM = AMD64_K0_REGNUM + 7, AMD64_ZMM0H_REGNUM, AMD64_ZMM31H_REGNUM = AMD64_ZMM0H_REGNUM + 31, AMD64_PKRU_REGNUM, AMD64_FSBASE_REGNUM, AMD64_GSBASE_REGNUM }

## Functions
struct displaced_step_closure * | amd64_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
void | amd64_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
void | amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, const target_desc *default_tdesc)
void | amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, const target_desc *default_tdesc)
const struct target_desc * | amd64_target_description (uint64_t xcr0)
void | amd64_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
void | amd64_supply_xsave (struct regcache *regcache, int regnum, const void *xsave)
void | amd64_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
void | amd64_collect_xsave (const struct regcache *regcache, int regnum, void *xsave, int gcore)

## Variables
const struct regset | amd64_fpregset
int | amd64_linux_gregset_reg_offset []
int | amd64nbsd_r_reg_offset []
int | amd64obsd_r_reg_offset []
CORE_ADDR | amd64fbsd_sigtramp_start_addr
CORE_ADDR | amd64fbsd_sigtramp_end_addr
int | amd64fbsd_sc_reg_offset []

## Macro Definition Documentation

## ◆ AMD64_NUM_GREGS

#define AMD64_NUM_GREGS 24

Definition at line 86 of file amd64-tdep.h.

Referenced by _initialize_amd64nbsd_tdep(), _initialize_amd64obsd_tdep(), and amd64_init_abi().

## ◆ AMD64_NUM_REGS

#define AMD64_NUM_REGS (AMD64_GSBASE_REGNUM + 1)

Definition at line 88 of file amd64-tdep.h.

Referenced by amd64_init_abi().

## Enumeration Type Documentation

## ◆ amd64_regnum

enum amd64_regnum

Enumerator
AMD64_RAX_REGNUM |
AMD64_RBX_REGNUM |
AMD64_RCX_REGNUM |
AMD64_RDX_REGNUM |
AMD64_RSI_REGNUM |
AMD64_RDI_REGNUM |
AMD64_RBP_REGNUM |
AMD64_RSP_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 |
AMD64_ST0_REGNUM |
AMD64_ST1_REGNUM |
AMD64_FCTRL_REGNUM |
AMD64_FSTAT_REGNUM |
AMD64_FTAG_REGNUM |
AMD64_XMM0_REGNUM |
AMD64_XMM1_REGNUM |
AMD64_MXCSR_REGNUM |
AMD64_YMM0H_REGNUM |
AMD64_YMM15H_REGNUM |
AMD64_BND0R_REGNUM |
AMD64_BND3R_REGNUM |
AMD64_BNDCFGU_REGNUM |
AMD64_BNDSTATUS_REGNUM |
AMD64_XMM16_REGNUM |
AMD64_XMM31_REGNUM |
AMD64_YMM16H_REGNUM |
AMD64_YMM31H_REGNUM |
AMD64_K0_REGNUM |
AMD64_K7_REGNUM |
AMD64_ZMM0H_REGNUM |
AMD64_ZMM31H_REGNUM |
AMD64_PKRU_REGNUM |
AMD64_FSBASE_REGNUM |
AMD64_GSBASE_REGNUM |

Definition at line 32 of file amd64-tdep.h.

## Function Documentation

## ◆ amd64_collect_fxsave()

void amd64_collect_fxsave | ( | const struct regcache * | regcache,
|  | int | regnum,
|  | void * | fxsave
| ) |  |

Definition at line 3355 of file amd64-tdep.c.

References regcache::arch(), gdbarch_bfd_arch_info(), gdbarch_tdep(), i387_collect_fxsave(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, regcache_raw_collect(), regnum, 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().

## ◆ amd64_collect_xsave()

void amd64_collect_xsave | ( | const struct regcache * | regcache,
|  | int | regnum,
|  | void * | xsave,
|  | int | gcore
| ) |  |

Definition at line 3376 of file amd64-tdep.c.

References regcache::arch(), gdbarch_bfd_arch_info(), gdbarch_tdep(), i387_collect_xsave(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, regcache_raw_collect(), regnum, and gdbarch_tdep::regs.

Referenced by amd64_linux_collect_xstateregset(), amd64_linux_store_inferior_registers(), amd64bsd_store_inferior_registers(), and amd64fbsd_collect_xstateregset().

## ◆ amd64_displaced_step_copy_insn()

struct displaced_step_closure* amd64_displaced_step_copy_insn | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | from,
|  | CORE_ADDR | to,
|  | struct regcache * | regs
| ) |  |

Definition at line 1416 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(), amd64_displaced_step_closure::insn_buf, amd64_displaced_step_closure::insn_details, memset(), amd64_insn::opcode_offset, paddress(), read_memory(), and write_memory().

Referenced by amd64_linux_init_abi_common().

## ◆ amd64_displaced_step_fixup()

void amd64_displaced_step_fixup | ( | struct gdbarch * | gdbarch,
|  | struct displaced_step_closure * | closure,
|  | CORE_ADDR | from,
|  | CORE_ADDR | to,
|  | struct regcache * | regs
| ) |  |

Definition at line 1622 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(), gdb_stdlog, gdbarch_byte_order(), amd64_displaced_step_closure::insn_buf, amd64_displaced_step_closure::insn_details, paddress(), read_memory_unsigned_integer(), regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), amd64_displaced_step_closure::tmp_regno, amd64_displaced_step_closure::tmp_save, amd64_displaced_step_closure::tmp_used, and write_memory_unsigned_integer().

Referenced by amd64_linux_init_abi_common().

## ◆ amd64_init_abi()

void amd64_init_abi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch,
|  | const target_desc * | default_tdesc
| ) |  |

Definition at line 3037 of file amd64-tdep.c.

References amd64_ax_pseudo_register_collect(), AMD64_BND0R_REGNUM, AMD64_BNDCFGU_REGNUM, amd64_dummy_id(), amd64_dwarf_reg_to_regnum(), AMD64_EFLAGS_REGNUM, amd64_epilogue_frame_unwind, amd64_fpregset, amd64_frame_align(), amd64_frame_base, amd64_frame_unwind, AMD64_FSBASE_REGNUM, amd64_gen_return_address(), amd64_get_longjmp_target(), AMD64_GSBASE_REGNUM, amd64_insn_is_call(), amd64_insn_is_jump(), amd64_insn_is_ret(), AMD64_K0_REGNUM, amd64_k_names, amd64_mpx_names, AMD64_NUM_GREGS, AMD64_NUM_REGS, amd64_pkeys_names, AMD64_PKRU_REGNUM, amd64_pseudo_register_name(), amd64_pseudo_register_read_value(), amd64_pseudo_register_write(), amd64_push_dummy_call(), amd64_record_regmap, amd64_register_names, amd64_relocate_instruction(), amd64_return_value(), AMD64_RIP_REGNUM, AMD64_RSP_REGNUM, amd64_sigtramp_frame_unwind, amd64_skip_prologue(), AMD64_ST0_REGNUM, AMD64_XMM16_REGNUM, amd64_xmm_avx512_names, AMD64_YMM0H_REGNUM, AMD64_YMM16H_REGNUM, amd64_ymmh_avx512_names, amd64_ymmh_names, AMD64_ZMM0H_REGNUM, amd64_zmmh_names, gdbarch_tdep::bnd0r_regnum, gdbarch_tdep::bndcfgu_regnum, gdbarch_tdep::fpregset, frame_base_set_default(), frame_unwind_append_unwinder(), frame_unwind_prepend_unwinder(), gdbarch_tdep(), 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::k0_regnum, gdbarch_tdep::k_register_names, gdbarch_tdep::mpx_register_names, gdbarch_tdep::num_byte_regs, gdbarch_tdep::num_core_regs, gdbarch_tdep::num_dword_regs, gdbarch_tdep::num_mmx_regs, gdbarch_tdep::num_pkeys_regs, gdbarch_tdep::num_word_regs, gdbarch_tdep::num_xmm_avx512_regs, gdbarch_tdep::num_xmm_regs, gdbarch_tdep::num_ymm_avx512_regs, gdbarch_tdep::num_ymm_regs, gdbarch_tdep::num_zmm_regs, gdbarch_tdep::pkeys_register_names, gdbarch_tdep::pkru_regnum, gdbarch_tdep::record_regmap, gdbarch_tdep::register_names, set_gdbarch_ax_pseudo_register_collect(), 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_insn_is_call(), set_gdbarch_insn_is_jump(), set_gdbarch_insn_is_ret(), 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_relocate_instruction(), set_gdbarch_return_value(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_stab_reg_to_regnum(), set_gdbarch_stap_integer_prefixes(), set_gdbarch_stap_is_single_operand(), set_gdbarch_stap_parse_special_token(), set_gdbarch_stap_register_indirection_prefixes(), set_gdbarch_stap_register_indirection_suffixes(), set_gdbarch_stap_register_prefixes(), set_gdbarch_value_to_register(), set_tdesc_pseudo_register_name(), gdbarch_tdep::sizeof_fpregset, gdbarch_tdep::st0_regnum, gdbarch_info::target_desc, gdbarch_info::tdep_info, gdbarch_tdep::tdesc, tdesc_find_feature(), tdesc_has_registers(), tdesc_numbered_register(), gdbarch_tdep::xmm16_regnum, gdbarch_tdep::xmm_avx512_register_names, gdbarch_tdep::ymm0h_regnum, gdbarch_tdep::ymm16h_register_names, gdbarch_tdep::ymm16h_regnum, gdbarch_tdep::ymmh_register_names, gdbarch_tdep::zmm0h_regnum, and gdbarch_tdep::zmmh_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().

## ◆ amd64_supply_fxsave()

void amd64_supply_fxsave | ( | struct regcache * | regcache,
|  | int | regnum,
|  | const void * | fxsave
| ) |  |

Definition at line 3304 of file amd64-tdep.c.

References regcache::arch(), gdbarch_bfd_arch_info(), gdbarch_tdep(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, i387_supply_fxsave(), regcache_raw_supply(), regnum, and gdbarch_tdep::regs.

Referenced by amd64_linux_fetch_inferior_registers(), amd64_supply_fpregset(), amd64bsd_fetch_inferior_registers(), i386_darwin_fetch_inferior_registers(), and supply_fpregset().

## ◆ amd64_supply_xsave()

void amd64_supply_xsave | ( | struct regcache * | regcache,
|  | int | regnum,
|  | const void * | xsave
| ) |  |

Definition at line 3327 of file amd64-tdep.c.

References regcache::arch(), gdbarch_bfd_arch_info(), gdbarch_tdep(), I387_FISEG_REGNUM, I387_FOSEG_REGNUM, i387_supply_xsave(), regcache_raw_supply(), regnum, and gdbarch_tdep::regs.

Referenced by amd64_linux_fetch_inferior_registers(), amd64_linux_supply_xstateregset(), amd64bsd_fetch_inferior_registers(), and amd64fbsd_supply_xstateregset().

## ◆ amd64_target_description()

const struct target_desc* amd64_target_description | ( | uint64_t | xcr0 | ) |

Definition at line 3246 of file amd64-tdep.c.

References amd64_create_target_description(), X86_XSTATE_AVX, X86_XSTATE_AVX512, X86_XSTATE_MPX, and X86_XSTATE_PKRU.

Referenced by _initialize_amd64_tdep(), amd64_dicos_init_abi(), amd64_sol2_init_abi(), amd64_windows_init_abi(), amd64fbsd_core_read_description(), amd64fbsd_init_abi(), amd64fbsd_read_description(), amd64nbsd_init_abi(), amd64obsd_init_abi(), and x86_darwin_init_abi_64().

## ◆ amd64_x32_init_abi()

void amd64_x32_init_abi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch,
|  | const target_desc * | default_tdesc
| ) |  |

Definition at line 3229 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(), and set_tdesc_pseudo_register_type().

Referenced by amd64_x32_linux_init_abi().

## Variable Documentation

## ◆ amd64_fpregset

const struct regset amd64_fpregset

Definition at line 2989 of file amd64-tdep.c.

Referenced by amd64_init_abi(), amd64_linux_iterate_over_regset_sections(), and amd64fbsd_iterate_over_regset_sections().

## ◆ amd64_linux_gregset_reg_offset

int amd64_linux_gregset_reg_offset[]

Definition at line 55 of file amd64-linux-tdep.c.

Referenced by _initialize_amd64_linux_nat(), amd64_linux_init_abi(), and amd64_x32_linux_init_abi().

## ◆ amd64fbsd_sc_reg_offset

int amd64fbsd_sc_reg_offset[]

Definition at line 124 of file amd64-fbsd-tdep.c.

Referenced by amd64fbsd_init_abi().

## ◆ amd64fbsd_sigtramp_end_addr

CORE_ADDR amd64fbsd_sigtramp_end_addr

Definition at line 121 of file amd64-fbsd-tdep.c.

Referenced by _initialize_amd64fbsd_nat(), and amd64fbsd_init_abi().

## ◆ amd64fbsd_sigtramp_start_addr

CORE_ADDR amd64fbsd_sigtramp_start_addr

Definition at line 120 of file amd64-fbsd-tdep.c.

Referenced by _initialize_amd64fbsd_nat(), and amd64fbsd_init_abi().

## ◆ amd64nbsd_r_reg_offset

int amd64nbsd_r_reg_offset[]

Definition at line 69 of file amd64-nbsd-tdep.c.

Referenced by _initialize_amd64nbsd_nat(), _initialize_amd64nbsd_tdep(), and amd64nbsd_init_abi().

## ◆ amd64obsd_r_reg_offset

int amd64obsd_r_reg_offset[]

Definition at line 130 of file amd64-obsd-tdep.c.

Referenced by _initialize_amd64obsd_nat(), _initialize_amd64obsd_tdep(), and amd64obsd_init_abi().