GDBserver
|
#include <stddef.h>
#include <signal.h>
#include <limits.h>
#include <inttypes.h>
#include "server.h"
#include "linux-low.h"
#include "i387-fp.h"
#include "i386-low.h"
#include "i386-xstate.h"
#include "elf/common.h"
#include "gdb_proc_service.h"
#include "agent.h"
#include "tdesc.h"
#include "tracepoint.h"
#include "ax.h"
#include <sys/reg.h>
#include <sys/procfs.h>
#include <sys/ptrace.h>
#include <sys/uio.h>
Go to the source code of this file.
Classes | |
struct | arch_process_info |
struct | arch_lwp_info |
Defines | |
#define | PTRACE_GETREGSET 0x4204 |
#define | PTRACE_SETREGSET 0x4205 |
#define | PTRACE_GET_THREAD_AREA 25 |
#define | PTRACE_ARCH_PRCTL 30 |
#define | ARCH_SET_GS 0x1001 |
#define | ARCH_SET_FS 0x1002 |
#define | ARCH_GET_FS 0x1003 |
#define | ARCH_GET_GS 0x1004 |
#define | I386_NUM_REGS (sizeof (i386_regmap) / sizeof (i386_regmap[0])) |
#define | x86_breakpoint_len 1 |
#define | I386_LINUX_XSAVE_XCR0_OFFSET 464 |
#define | EMIT_ASM(NAME, INSNS) |
#define | EMIT_ASM32(NAME, INSNS) EMIT_ASM(NAME,INSNS) |
Functions | |
void | init_registers_i386_linux (void) |
void | init_registers_i386_mmx_linux (void) |
void | init_registers_i386_avx_linux (void) |
ps_err_e | ps_get_thread_area (const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base) |
static int | x86_get_thread_area (int lwpid, CORE_ADDR *addr) |
static int | x86_cannot_store_register (int regno) |
static int | x86_cannot_fetch_register (int regno) |
static void | x86_fill_gregset (struct regcache *regcache, void *buf) |
static void | x86_store_gregset (struct regcache *regcache, const void *buf) |
static void | x86_fill_fpregset (struct regcache *regcache, void *buf) |
static void | x86_store_fpregset (struct regcache *regcache, const void *buf) |
static void | x86_fill_fpxregset (struct regcache *regcache, void *buf) |
static void | x86_store_fpxregset (struct regcache *regcache, const void *buf) |
static void | x86_fill_xstateregset (struct regcache *regcache, void *buf) |
static void | x86_store_xstateregset (struct regcache *regcache, const void *buf) |
static CORE_ADDR | x86_get_pc (struct regcache *regcache) |
static void | x86_set_pc (struct regcache *regcache, CORE_ADDR pc) |
static int | x86_breakpoint_at (CORE_ADDR pc) |
static unsigned long | x86_linux_dr_get (ptid_t ptid, int regnum) |
static void | x86_linux_dr_set (ptid_t ptid, int regnum, unsigned long value) |
static int | update_debug_registers_callback (struct inferior_list_entry *entry, void *pid_p) |
void | i386_dr_low_set_addr (const struct i386_debug_reg_state *state, int regnum) |
CORE_ADDR | i386_dr_low_get_addr (int regnum) |
void | i386_dr_low_set_control (const struct i386_debug_reg_state *state) |
unsigned | i386_dr_low_get_control (void) |
unsigned | i386_dr_low_get_status (void) |
static int | x86_insert_point (char type, CORE_ADDR addr, int len) |
static int | x86_remove_point (char type, CORE_ADDR addr, int len) |
static int | x86_stopped_by_watchpoint (void) |
static CORE_ADDR | x86_stopped_data_address (void) |
static struct arch_process_info * | x86_linux_new_process (void) |
static struct arch_lwp_info * | x86_linux_new_thread (void) |
static void | x86_linux_prepare_to_resume (struct lwp_info *lwp) |
static int | x86_siginfo_fixup (siginfo_t *native, void *inf, int direction) |
static struct target_desc * | x86_linux_read_description (void) |
static int | same_process_callback (struct inferior_list_entry *entry, void *data) |
static void | x86_arch_setup_process_callback (struct inferior_list_entry *entry) |
static void | x86_linux_update_xmltarget (void) |
static void | x86_linux_process_qsupported (const char *query) |
struct regs_info * | x86_linux_regs_info (void) |
static void | x86_arch_setup (void) |
static int | x86_supports_tracepoints (void) |
static void | append_insns (CORE_ADDR *to, size_t len, const unsigned char *buf) |
static int | push_opcode (unsigned char *buf, char *op) |
static int | i386_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err) |
static int | x86_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err) |
static int | x86_get_min_fast_tracepoint_insn_len (void) |
static void | add_insns (unsigned char *start, int len) |
static void | i386_emit_prologue (void) |
static void | i386_emit_epilogue (void) |
static void | i386_emit_add (void) |
static void | i386_emit_sub (void) |
static void | i386_emit_mul (void) |
static void | i386_emit_lsh (void) |
static void | i386_emit_rsh_signed (void) |
static void | i386_emit_rsh_unsigned (void) |
static void | i386_emit_ext (int arg) |
static void | i386_emit_log_not (void) |
static void | i386_emit_bit_and (void) |
static void | i386_emit_bit_or (void) |
static void | i386_emit_bit_xor (void) |
static void | i386_emit_bit_not (void) |
static void | i386_emit_equal (void) |
static void | i386_emit_less_signed (void) |
static void | i386_emit_less_unsigned (void) |
static void | i386_emit_ref (int size) |
static void | i386_emit_if_goto (int *offset_p, int *size_p) |
static void | i386_emit_goto (int *offset_p, int *size_p) |
static void | i386_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size) |
static void | i386_emit_const (LONGEST num) |
static void | i386_emit_call (CORE_ADDR fn) |
static void | i386_emit_reg (int reg) |
static void | i386_emit_pop (void) |
static void | i386_emit_stack_flush (void) |
static void | i386_emit_zero_ext (int arg) |
static void | i386_emit_swap (void) |
static void | i386_emit_stack_adjust (int n) |
static void | i386_emit_int_call_1 (CORE_ADDR fn, int arg1) |
static void | i386_emit_void_call_2 (CORE_ADDR fn, int arg1) |
void | i386_emit_eq_goto (int *offset_p, int *size_p) |
void | i386_emit_ne_goto (int *offset_p, int *size_p) |
void | i386_emit_lt_goto (int *offset_p, int *size_p) |
void | i386_emit_le_goto (int *offset_p, int *size_p) |
void | i386_emit_gt_goto (int *offset_p, int *size_p) |
void | i386_emit_ge_goto (int *offset_p, int *size_p) |
static struct emit_ops * | x86_emit_ops (void) |
static int | x86_supports_range_stepping (void) |
void | initialize_low_arch (void) |
Variables | |
struct target_desc * | tdesc_i386_linux |
struct target_desc * | tdesc_i386_mmx_linux |
struct target_desc * | tdesc_i386_avx_linux |
static struct target_desc * | tdesc_i386_linux_no_xml |
static unsigned char | jump_insn [] = { 0xe9, 0, 0, 0, 0 } |
static unsigned char | small_jump_insn [] = { 0x66, 0xe9, 0, 0 } |
static const char * | xmltarget_i386_linux_no_xml |
static int | i386_regmap [] |
static struct regset_info | x86_regsets [] |
static const unsigned char | x86_breakpoint [] = { 0xCC } |
static int | use_xml |
int | have_ptrace_getfpxregs |
static int | have_ptrace_getregset = -1 |
static struct regsets_info | x86_regsets_info |
static struct usrregs_info | i386_linux_usrregs_info |
static struct regs_info | i386_linux_regs_info |
struct emit_ops | i386_emit_ops |
struct linux_target_ops | the_low_target |
#define ARCH_GET_FS 0x1003 |
Definition at line 118 of file linux-x86-low.c.
Referenced by ps_get_thread_area(), and x86_get_thread_area().
#define ARCH_GET_GS 0x1004 |
Definition at line 119 of file linux-x86-low.c.
Referenced by ps_get_thread_area().
#define ARCH_SET_FS 0x1002 |
Definition at line 117 of file linux-x86-low.c.
#define ARCH_SET_GS 0x1001 |
Definition at line 116 of file linux-x86-low.c.
#define EMIT_ASM | ( | NAME, | |
INSNS | |||
) |
do \ { \ extern unsigned char start_ ## NAME, end_ ## NAME; \ add_insns (&start_ ## NAME, &end_ ## NAME - &start_ ## NAME); \ __asm__ ("jmp end_" #NAME "\n" \ "\t" "start_" #NAME ":" \ "\t" INSNS "\n" \ "\t" "end_" #NAME ":"); \ } while (0)
Definition at line 1993 of file linux-x86-low.c.
#define EMIT_ASM32 | ( | NAME, | |
INSNS | |||
) | EMIT_ASM(NAME,INSNS) |
Definition at line 2021 of file linux-x86-low.c.
Referenced by i386_emit_add(), i386_emit_bit_and(), i386_emit_bit_not(), i386_emit_bit_or(), i386_emit_bit_xor(), i386_emit_epilogue(), i386_emit_eq_goto(), i386_emit_equal(), i386_emit_ext(), i386_emit_ge_goto(), i386_emit_goto(), i386_emit_gt_goto(), i386_emit_if_goto(), i386_emit_int_call_1(), i386_emit_le_goto(), i386_emit_less_signed(), i386_emit_less_unsigned(), i386_emit_log_not(), i386_emit_lt_goto(), i386_emit_ne_goto(), i386_emit_pop(), i386_emit_prologue(), i386_emit_ref(), i386_emit_reg(), i386_emit_stack_flush(), i386_emit_sub(), i386_emit_swap(), i386_emit_void_call_2(), and i386_emit_zero_ext().
#define I386_LINUX_XSAVE_XCR0_OFFSET 464 |
Definition at line 1213 of file linux-x86-low.c.
Referenced by x86_linux_read_description().
#define I386_NUM_REGS (sizeof (i386_regmap) / sizeof (i386_regmap[0])) |
Definition at line 184 of file linux-x86-low.c.
Referenced by x86_cannot_fetch_register(), x86_cannot_store_register(), x86_fill_gregset(), and x86_store_gregset().
#define PTRACE_ARCH_PRCTL 30 |
Definition at line 110 of file linux-x86-low.c.
Referenced by ps_get_thread_area(), and x86_get_thread_area().
#define PTRACE_GET_THREAD_AREA 25 |
Definition at line 105 of file linux-x86-low.c.
Referenced by ps_get_thread_area(), and x86_get_thread_area().
#define PTRACE_GETREGSET 0x4204 |
Definition at line 96 of file linux-x86-low.c.
Referenced by x86_linux_read_description().
#define PTRACE_SETREGSET 0x4205 |
Definition at line 100 of file linux-x86-low.c.
#define x86_breakpoint_len 1 |
Definition at line 473 of file linux-x86-low.c.
static void add_insns | ( | unsigned char * | start, |
int | len | ||
) | [static] |
Definition at line 1975 of file linux-x86-low.c.
References append_insns(), current_insn_ptr, debug_threads, and paddress().
static void append_insns | ( | CORE_ADDR * | to, |
size_t | len, | ||
const unsigned char * | buf | ||
) | [static] |
Definition at line 1484 of file linux-x86-low.c.
References write_inferior_memory().
Referenced by add_insns(), i386_emit_call(), i386_emit_const(), i386_emit_int_call_1(), i386_emit_reg(), i386_emit_stack_adjust(), i386_emit_void_call_2(), and i386_install_fast_tracepoint_jump_pad().
CORE_ADDR i386_dr_low_get_addr | ( | int | regnum | ) |
Definition at line 560 of file linux-x86-low.c.
References current_inferior, DR_FIRSTADDR, DR_LASTADDR, gdb_assert, get_thread_lwp, ptid_of, and x86_linux_dr_get().
unsigned i386_dr_low_get_control | ( | void | ) |
Definition at line 585 of file linux-x86-low.c.
References current_inferior, DR_CONTROL, get_thread_lwp, ptid_of, and x86_linux_dr_get().
unsigned i386_dr_low_get_status | ( | void | ) |
Definition at line 597 of file linux-x86-low.c.
References current_inferior, DR_STATUS, get_thread_lwp, ptid_of, and x86_linux_dr_get().
void i386_dr_low_set_addr | ( | const struct i386_debug_reg_state * | state, |
int | regnum | ||
) |
Definition at line 546 of file linux-x86-low.c.
References all_lwps, current_inferior, DR_FIRSTADDR, DR_LASTADDR, fatal(), find_inferior(), get_thread_lwp, pid_of, and update_debug_registers_callback().
void i386_dr_low_set_control | ( | const struct i386_debug_reg_state * | state | ) |
Definition at line 574 of file linux-x86-low.c.
References all_lwps, current_inferior, find_inferior(), get_thread_lwp, pid_of, and update_debug_registers_callback().
static void i386_emit_add | ( | void | ) | [static] |
Definition at line 2634 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_bit_and | ( | void | ) | [static] |
Definition at line 2716 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_bit_not | ( | void | ) | [static] |
Definition at line 2743 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_bit_or | ( | void | ) | [static] |
Definition at line 2725 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_bit_xor | ( | void | ) | [static] |
Definition at line 2734 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_call | ( | CORE_ADDR | fn | ) | [static] |
Definition at line 2906 of file linux-x86-low.c.
References append_insns(), current_insn_ptr, memcpy(), and offset.
Referenced by i386_emit_int_call_1(), i386_emit_reg(), and i386_emit_void_call_2().
static void i386_emit_const | ( | LONGEST | num | ) | [static] |
Definition at line 2879 of file linux-x86-low.c.
References append_insns(), current_insn_ptr, and memcpy().
static void i386_emit_epilogue | ( | void | ) | [static] |
Definition at line 2621 of file linux-x86-low.c.
References EMIT_ASM32.
void i386_emit_eq_goto | ( | int * | offset_p, |
int * | size_p | ||
) |
Definition at line 3081 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_equal | ( | void | ) | [static] |
Definition at line 2751 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_ext | ( | int | arg | ) | [static] |
Definition at line 2677 of file linux-x86-low.c.
References EMIT_ASM32, and emit_error.
void i386_emit_ge_goto | ( | int * | offset_p, |
int * | size_p | ||
) |
Definition at line 3210 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_goto | ( | int * | offset_p, |
int * | size_p | ||
) | [static] |
Definition at line 2850 of file linux-x86-low.c.
References EMIT_ASM32.
void i386_emit_gt_goto | ( | int * | offset_p, |
int * | size_p | ||
) |
Definition at line 3184 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_if_goto | ( | int * | offset_p, |
int * | size_p | ||
) | [static] |
Definition at line 2832 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_int_call_1 | ( | CORE_ADDR | fn, |
int | arg1 | ||
) | [static] |
Definition at line 3018 of file linux-x86-low.c.
References append_insns(), current_insn_ptr, EMIT_ASM32, i386_emit_call(), and memcpy().
void i386_emit_le_goto | ( | int * | offset_p, |
int * | size_p | ||
) |
Definition at line 3158 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_less_signed | ( | void | ) | [static] |
Definition at line 2769 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_less_unsigned | ( | void | ) | [static] |
Definition at line 2788 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_log_not | ( | void | ) | [static] |
Definition at line 2705 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_lsh | ( | void | ) | [static] |
Definition at line 2659 of file linux-x86-low.c.
References emit_error.
void i386_emit_lt_goto | ( | int * | offset_p, |
int * | size_p | ||
) |
Definition at line 3132 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_mul | ( | void | ) | [static] |
Definition at line 2653 of file linux-x86-low.c.
References emit_error.
void i386_emit_ne_goto | ( | int * | offset_p, |
int * | size_p | ||
) |
Definition at line 3106 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_pop | ( | void | ) | [static] |
Definition at line 2948 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_prologue | ( | void | ) | [static] |
Definition at line 2610 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_ref | ( | int | size | ) | [static] |
Definition at line 2807 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_reg | ( | int | reg | ) | [static] |
Definition at line 2922 of file linux-x86-low.c.
References append_insns(), current_insn_ptr, EMIT_ASM32, get_raw_reg_func_addr(), i386_emit_call(), and memcpy().
static void i386_emit_rsh_signed | ( | void | ) | [static] |
Definition at line 2665 of file linux-x86-low.c.
References emit_error.
static void i386_emit_rsh_unsigned | ( | void | ) | [static] |
Definition at line 2671 of file linux-x86-low.c.
References emit_error.
static void i386_emit_stack_adjust | ( | int | n | ) | [static] |
Definition at line 3000 of file linux-x86-low.c.
References append_insns(), and current_insn_ptr.
static void i386_emit_stack_flush | ( | void | ) | [static] |
Definition at line 2956 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_sub | ( | void | ) | [static] |
Definition at line 2643 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_swap | ( | void | ) | [static] |
Definition at line 2988 of file linux-x86-low.c.
References EMIT_ASM32.
static void i386_emit_void_call_2 | ( | CORE_ADDR | fn, |
int | arg1 | ||
) | [static] |
Definition at line 3046 of file linux-x86-low.c.
References append_insns(), current_insn_ptr, EMIT_ASM32, i386_emit_call(), and memcpy().
static void i386_emit_zero_ext | ( | int | arg | ) | [static] |
Definition at line 2964 of file linux-x86-low.c.
References EMIT_ASM32, and emit_error.
static int i386_install_fast_tracepoint_jump_pad | ( | CORE_ADDR | tpoint, |
CORE_ADDR | tpaddr, | ||
CORE_ADDR | collector, | ||
CORE_ADDR | lockaddr, | ||
ULONGEST | orig_size, | ||
CORE_ADDR * | jump_entry, | ||
CORE_ADDR * | trampoline, | ||
ULONGEST * | trampoline_size, | ||
unsigned char * | jjump_pad_insn, | ||
ULONGEST * | jjump_pad_insn_size, | ||
CORE_ADDR * | adjusted_insn_addr, | ||
CORE_ADDR * | adjusted_insn_addr_end, | ||
char * | err | ||
) | [static] |
Definition at line 1707 of file linux-x86-low.c.
References append_insns(), claim_trampoline_space(), jump_insn, memcpy(), offset, push_opcode(), relocate_instruction(), small_jump_insn, and write_inferior_memory().
Referenced by x86_install_fast_tracepoint_jump_pad().
static void i386_write_goto_address | ( | CORE_ADDR | from, |
CORE_ADDR | to, | ||
int | size | ||
) | [static] |
Definition at line 2862 of file linux-x86-low.c.
References emit_error, memcpy(), and write_inferior_memory().
void init_registers_i386_avx_linux | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_i386_linux | ( | void | ) |
void init_registers_i386_mmx_linux | ( | void | ) |
Referenced by initialize_low_arch().
void initialize_low_arch | ( | void | ) |
Definition at line 3335 of file linux-x86-low.c.
References copy_target_description(), init_registers_amd64_linux(), init_registers_i386_avx_linux(), init_registers_i386_linux(), init_registers_i386_mmx_linux(), xmalloc(), target_desc::xmltarget, and xmltarget_i386_linux_no_xml.
ps_err_e ps_get_thread_area | ( | const struct ps_prochandle * | ph, |
lwpid_t | lwpid, | ||
int | idx, | ||
void ** | base | ||
) |
Definition at line 207 of file linux-x86-low.c.
References ARCH_GET_FS, ARCH_GET_GS, PS_BADADDR, PS_ERR, PS_OK, PTRACE_ARCH_PRCTL, and PTRACE_GET_THREAD_AREA.
static int push_opcode | ( | unsigned char * | buf, |
char * | op | ||
) | [static] |
Definition at line 1491 of file linux-x86-low.c.
Referenced by i386_install_fast_tracepoint_jump_pad().
static int same_process_callback | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 1356 of file linux-x86-low.c.
References inferior_list_entry::id, and ptid_get_pid().
Referenced by x86_arch_setup_process_callback().
static int update_debug_registers_callback | ( | struct inferior_list_entry * | entry, |
void * | pid_p | ||
) | [static] |
Definition at line 521 of file linux-x86-low.c.
References lwp_info::arch_private, arch_lwp_info::debug_registers_changed, linux_stop_lwp(), pid_of, and lwp_info::stopped.
Referenced by i386_dr_low_set_addr(), and i386_dr_low_set_control().
static void x86_arch_setup | ( | void | ) | [static] |
Definition at line 1472 of file linux-x86-low.c.
References current_process(), process_info::tdesc, and x86_linux_read_description().
static void x86_arch_setup_process_callback | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 1367 of file linux-x86-low.c.
References all_threads, linux_target_ops::arch_setup, current_inferior, find_inferior(), inferior_list_entry::id, ptid_get_pid(), same_process_callback(), and the_low_target.
Referenced by x86_linux_update_xmltarget().
static int x86_breakpoint_at | ( | CORE_ADDR | pc | ) | [static] |
Definition at line 476 of file linux-x86-low.c.
References target_ops::read_memory, and the_target.
static int x86_cannot_fetch_register | ( | int | regno | ) | [static] |
Definition at line 305 of file linux-x86-low.c.
References I386_NUM_REGS.
static int x86_cannot_store_register | ( | int | regno | ) | [static] |
Definition at line 294 of file linux-x86-low.c.
References I386_NUM_REGS.
static struct emit_ops* x86_emit_ops | ( | void | ) | [static, read] |
Definition at line 3278 of file linux-x86-low.c.
References i386_emit_ops.
static void x86_fill_fpregset | ( | struct regcache * | regcache, |
void * | buf | ||
) | [static] |
Definition at line 360 of file linux-x86-low.c.
References i387_cache_to_fsave(), and i387_cache_to_fxsave().
static void x86_fill_fpxregset | ( | struct regcache * | regcache, |
void * | buf | ||
) | [static] |
Definition at line 382 of file linux-x86-low.c.
References i387_cache_to_fxsave().
static void x86_fill_gregset | ( | struct regcache * | regcache, |
void * | buf | ||
) | [static] |
Definition at line 316 of file linux-x86-low.c.
References collect_register(), collect_register_by_name(), I386_NUM_REGS, i386_regmap, register_size(), and regcache::tdesc.
static void x86_fill_xstateregset | ( | struct regcache * | regcache, |
void * | buf | ||
) | [static] |
Definition at line 396 of file linux-x86-low.c.
References i387_cache_to_xsave().
static int x86_get_min_fast_tracepoint_insn_len | ( | void | ) | [static] |
Definition at line 1931 of file linux-x86-low.c.
References agent_loaded_p(), have_fast_tracepoint_trampoline_buffer(), IPA_BUFSIZ, and warning().
static CORE_ADDR x86_get_pc | ( | struct regcache * | regcache | ) | [static] |
Definition at line 437 of file linux-x86-low.c.
References collect_register_by_name(), register_size(), and regcache::tdesc.
static int x86_get_thread_area | ( | int | lwpid, |
CORE_ADDR * | addr | ||
) | [static] |
Definition at line 251 of file linux-x86-low.c.
References ARCH_GET_FS, collect_register_by_name(), find_lwp_pid(), get_lwp_thread, get_thread_regcache(), lwpid_of, pid_to_ptid(), PTRACE_ARCH_PRCTL, and PTRACE_GET_THREAD_AREA.
static int x86_insert_point | ( | char | type, |
CORE_ADDR | addr, | ||
int | len | ||
) | [static] |
Definition at line 608 of file linux-x86-low.c.
References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, done_accessing_memory, i386_low_insert_watchpoint(), prepare_to_access_memory, process_info::private, and set_gdb_breakpoint_at().
static int x86_install_fast_tracepoint_jump_pad | ( | CORE_ADDR | tpoint, |
CORE_ADDR | tpaddr, | ||
CORE_ADDR | collector, | ||
CORE_ADDR | lockaddr, | ||
ULONGEST | orig_size, | ||
CORE_ADDR * | jump_entry, | ||
CORE_ADDR * | trampoline, | ||
ULONGEST * | trampoline_size, | ||
unsigned char * | jjump_pad_insn, | ||
ULONGEST * | jjump_pad_insn_size, | ||
CORE_ADDR * | adjusted_insn_addr, | ||
CORE_ADDR * | adjusted_insn_addr_end, | ||
char * | err | ||
) | [static] |
Definition at line 1890 of file linux-x86-low.c.
References i386_install_fast_tracepoint_jump_pad().
static unsigned long x86_linux_dr_get | ( | ptid_t | ptid, |
int | regnum | ||
) | [static] |
Definition at line 490 of file linux-x86-low.c.
References errno, error(), and ptid_get_lwp().
Referenced by i386_dr_low_get_addr(), i386_dr_low_get_control(), and i386_dr_low_get_status().
static void x86_linux_dr_set | ( | ptid_t | ptid, |
int | regnum, | ||
unsigned long | value | ||
) | [static] |
Definition at line 507 of file linux-x86-low.c.
References errno, error(), and ptid_get_lwp().
Referenced by x86_linux_prepare_to_resume().
static struct arch_process_info* x86_linux_new_process | ( | void | ) | [static, read] |
Definition at line 687 of file linux-x86-low.c.
References arch_process_info::debug_reg_state, i386_low_init_dregs(), and xcalloc().
static struct arch_lwp_info* x86_linux_new_thread | ( | void | ) | [static, read] |
Definition at line 699 of file linux-x86-low.c.
References arch_lwp_info::debug_registers_changed, and xcalloc().
static void x86_linux_prepare_to_resume | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 712 of file linux-x86-low.c.
References process_info_private::arch_private, lwp_info::arch_private, arch_process_info::debug_reg_state, arch_lwp_info::debug_registers_changed, DR_CONTROL, i386_debug_reg_state::dr_control_mirror, DR_FIRSTADDR, DR_LASTADDR, i386_debug_reg_state::dr_mirror, i386_debug_reg_state::dr_ref_count, DR_STATUS, find_process_pid(), process_info::private, ptid_get_pid(), ptid_of, lwp_info::stopped_by_watchpoint, and x86_linux_dr_set().
static void x86_linux_process_qsupported | ( | const char * | query | ) | [static] |
Definition at line 1401 of file linux-x86-low.c.
References strtok(), x86_linux_update_xmltarget(), and xstrdup().
static struct target_desc* x86_linux_read_description | ( | void | ) | [static, read] |
Definition at line 1232 of file linux-x86-low.c.
References _, current_inferior, error(), gdb_assert_not_reached, get_thread_lwp, I386_LINUX_XSAVE_XCR0_OFFSET, I386_XSTATE_AVX_MASK, I386_XSTATE_SIZE, I386_XSTATE_SSE_MASK, I386_XSTATE_SSE_SIZE, linux_pid_exe_is_elf_64_file(), lwpid_of, PTRACE_GETREGSET, tdesc_i386_linux_no_xml, x86_regsets, and x86_xcr0.
Referenced by x86_arch_setup().
struct regs_info* x86_linux_regs_info | ( | void | ) | [read] |
Definition at line 1458 of file linux-x86-low.c.
References i386_linux_regs_info.
static void x86_linux_update_xmltarget | ( | void | ) | [static] |
Definition at line 1383 of file linux-x86-low.c.
References all_processes, current_inferior, for_each_inferior(), regcache_release(), and x86_arch_setup_process_callback().
Referenced by x86_linux_process_qsupported().
static int x86_remove_point | ( | char | type, |
CORE_ADDR | addr, | ||
int | len | ||
) | [static] |
Definition at line 638 of file linux-x86-low.c.
References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, delete_gdb_breakpoint_at(), done_accessing_memory, i386_low_remove_watchpoint(), prepare_to_access_memory, and process_info::private.
static void x86_set_pc | ( | struct regcache * | regcache, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 456 of file linux-x86-low.c.
References register_size(), supply_register_by_name(), and regcache::tdesc.
static int x86_siginfo_fixup | ( | siginfo_t * | native, |
void * | inf, | ||
int | direction | ||
) | [static] |
Definition at line 1152 of file linux-x86-low.c.
References current_inferior, fatal(), get_thread_lwp, linux_pid_exe_is_elf_64_file(), and lwpid_of.
static int x86_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 667 of file linux-x86-low.c.
References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, i386_low_stopped_by_watchpoint(), and process_info::private.
static CORE_ADDR x86_stopped_data_address | ( | void | ) | [static] |
Definition at line 674 of file linux-x86-low.c.
References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, i386_low_stopped_data_address(), and process_info::private.
static void x86_store_fpregset | ( | struct regcache * | regcache, |
const void * | buf | ||
) | [static] |
Definition at line 370 of file linux-x86-low.c.
References i387_fsave_to_cache(), and i387_fxsave_to_cache().
static void x86_store_fpxregset | ( | struct regcache * | regcache, |
const void * | buf | ||
) | [static] |
Definition at line 388 of file linux-x86-low.c.
References i387_fxsave_to_cache().
static void x86_store_gregset | ( | struct regcache * | regcache, |
const void * | buf | ||
) | [static] |
Definition at line 338 of file linux-x86-low.c.
References I386_NUM_REGS, i386_regmap, register_size(), supply_register(), supply_register_by_name(), and regcache::tdesc.
static void x86_store_xstateregset | ( | struct regcache * | regcache, |
const void * | buf | ||
) | [static] |
Definition at line 402 of file linux-x86-low.c.
References i387_xsave_to_cache().
static int x86_supports_range_stepping | ( | void | ) | [static] |
Definition at line 3289 of file linux-x86-low.c.
static int x86_supports_tracepoints | ( | void | ) | [static] |
Definition at line 1478 of file linux-x86-low.c.
0
Definition at line 1218 of file linux-x86-low.c.
int have_ptrace_getregset = -1 [static] |
Definition at line 1227 of file linux-x86-low.c.
struct emit_ops i386_emit_ops |
Definition at line 3235 of file linux-x86-low.c.
Referenced by x86_emit_ops().
struct regs_info i386_linux_regs_info [static] |
{ NULL, &i386_linux_usrregs_info, &x86_regsets_info }
Definition at line 1450 of file linux-x86-low.c.
Referenced by x86_linux_regs_info().
struct usrregs_info i386_linux_usrregs_info [static] |
{ I386_NUM_REGS, i386_regmap, }
Definition at line 1444 of file linux-x86-low.c.
int i386_regmap[] [static] |
{ EAX * 4, ECX * 4, EDX * 4, EBX * 4, UESP * 4, EBP * 4, ESI * 4, EDI * 4, EIP * 4, EFL * 4, CS * 4, SS * 4, DS * 4, ES * 4, FS * 4, GS * 4 }
Definition at line 176 of file linux-x86-low.c.
Referenced by x86_fill_gregset(), and x86_store_gregset().
unsigned char jump_insn[] = { 0xe9, 0, 0, 0, 0 } [static] |
Definition at line 73 of file linux-x86-low.c.
Referenced by i386_install_fast_tracepoint_jump_pad().
unsigned char small_jump_insn[] = { 0x66, 0xe9, 0, 0 } [static] |
Definition at line 74 of file linux-x86-low.c.
Referenced by i386_install_fast_tracepoint_jump_pad().
struct target_desc* tdesc_i386_avx_linux |
struct target_desc* tdesc_i386_linux |
struct target_desc* tdesc_i386_linux_no_xml [static] |
Definition at line 70 of file linux-x86-low.c.
Referenced by x86_linux_read_description().
struct target_desc* tdesc_i386_mmx_linux |
struct linux_target_ops the_low_target |
Definition at line 3297 of file linux-x86-low.c.
int use_xml [static] |
Definition at line 1192 of file linux-x86-low.c.
const unsigned char x86_breakpoint[] = { 0xCC } [static] |
Definition at line 472 of file linux-x86-low.c.
struct regset_info x86_regsets[] [static] |
{ { 0, 0, 0, -1, -1, NULL, NULL } }
Definition at line 414 of file linux-x86-low.c.
Referenced by x86_linux_read_description().
struct regsets_info x86_regsets_info [static] |
{ x86_regsets, 0, NULL, }
Definition at line 1429 of file linux-x86-low.c.
const char* xmltarget_i386_linux_no_xml [static] |
"@<target>\ <architecture>i386</architecture>\ <osabi>GNU/Linux</osabi>\ </target>"
Definition at line 78 of file linux-x86-low.c.
Referenced by initialize_low_arch().