GDBserver

Classes | Macros | Functions | Variables
linux-x86-low.c File Reference
`#include "server.h"`
`#include <signal.h>`
`#include <limits.h>`
`#include <inttypes.h>`
`#include "linux-low.h"`
`#include "i387-fp.h"`
`#include "x86-low.h"`
`#include "x86-xstate.h"`
`#include "nat/gdb_ptrace.h"`
`#include "gdb_proc_service.h"`
`#include "elf/common.h"`
`#include "agent.h"`
`#include "tdesc.h"`
`#include "tracepoint.h"`
`#include "ax.h"`
`#include "nat/linux-nat.h"`
`#include "nat/x86-linux.h"`
`#include "nat/x86-linux-dregs.h"`
`#include "linux-x86-tdesc.h"`
`#include <sys/reg.h>`
`#include <sys/procfs.h>`
`#include <sys/uio.h>`

Go to the source code of this file.

## Classes
struct | arch_process_info

## Macros
#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 | REGSIZE 4
#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
ps_err_e | ps_get_thread_area (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 int | x86_supports_z_point_type (char z_type)
static int | x86_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
static int | x86_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
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 void | x86_linux_delete_process (struct arch_process_info *info)
static void | x86_linux_new_fork (struct process_info *parent, struct process_info *child)
struct x86_debug_reg_state * | x86_debug_reg_state (pid_t pid)
static int | x86_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
static const struct target_desc * | x86_linux_read_description (void)
static void | x86_linux_update_xmltarget (void)
static void | x86_linux_process_qsupported (char **features, int count)
const struct regs_info * | x86_linux_regs_info (void)
static void | x86_arch_setup (void)
static void | x86_get_syscall_trapinfo (struct regcache *regcache, int *sysno)
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, const 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 const gdb_byte * | x86_sw_breakpoint_from_kind (int kind, int *size)
static int | x86_supports_range_stepping (void)
static int | x86_supports_hardware_single_step (void)
static int | x86_get_ipa_tdesc_idx (void)
void | initialize_low_arch (void)

## Variables
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 gdb_byte | x86_breakpoint [] = { 0xCC }
struct x86_dr_low_type | x86_dr_low
static int | use_xml
int | have_ptrace_getfpxregs
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

## Macro Definition Documentation

## ◆ ARCH_GET_FS

#define ARCH_GET_FS 0x1003

Definition at line 92 of file linux-x86-low.c.

Referenced by ps_get_thread_area(), x86_get_thread_area(), and x86_store_gregset().

## ◆ ARCH_GET_GS

#define ARCH_GET_GS 0x1004

Definition at line 93 of file linux-x86-low.c.

Referenced by ps_get_thread_area(), and x86_store_gregset().

## ◆ ARCH_SET_FS

#define ARCH_SET_FS 0x1002

Definition at line 91 of file linux-x86-low.c.

Referenced by x86_fill_gregset().

## ◆ ARCH_SET_GS

#define ARCH_SET_GS 0x1001

Definition at line 90 of file linux-x86-low.c.

Referenced by x86_fill_gregset().

## ◆ EMIT_ASM

#define EMIT_ASM | ( |  | NAME,
|  |  | INSNS
| ) |  |

Value:
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 1503 of file linux-x86-low.c.

## ◆ EMIT_ASM32

#define EMIT_ASM32 | ( |  | NAME,
|  |  | INSNS
| ) |  | EMIT_ASM(NAME,INSNS)

Definition at line 1531 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().

## ◆ I386_LINUX_XSAVE_XCR0_OFFSET

#define I386_LINUX_XSAVE_XCR0_OFFSET 464

Definition at line 720 of file linux-x86-low.c.

Referenced by x86_linux_read_description().

## ◆ I386_NUM_REGS

#define I386_NUM_REGS (sizeof (i386_regmap) / sizeof (i386_regmap[0]))

Definition at line 170 of file linux-x86-low.c.

Referenced by x86_cannot_fetch_register(), x86_cannot_store_register(), x86_fill_gregset(), and x86_store_gregset().

## ◆ PTRACE_ARCH_PRCTL

#define PTRACE_ARCH_PRCTL 30

Definition at line 84 of file linux-x86-low.c.

Referenced by ps_get_thread_area(), x86_fill_gregset(), x86_get_thread_area(), and x86_store_gregset().

## ◆ PTRACE_GET_THREAD_AREA

#define PTRACE_GET_THREAD_AREA 25

Definition at line 79 of file linux-x86-low.c.

Referenced by ps_get_thread_area(), and x86_get_thread_area().

## ◆ REGSIZE

#define REGSIZE 4

Definition at line 172 of file linux-x86-low.c.

Referenced by x86_fill_gregset(), and x86_store_gregset().

## ◆ x86_breakpoint_len

#define x86_breakpoint_len 1

Definition at line 497 of file linux-x86-low.c.

Referenced by x86_sw_breakpoint_from_kind().

## Function Documentation

## ◆ add_insns()

static void add_insns | ( | unsigned char * | start,
|  | int | len
| ) |  |
| static

Definition at line 1485 of file linux-x86-low.c.

References append_insns(), current_insn_ptr, debug_printf(), debug_threads, and paddress().

## ◆ append_insns()

static void append_insns | ( | CORE_ADDR * | to,
|  | size_t | len,
|  | const unsigned char * | buf
| ) |  |
| static

Definition at line 994 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().

## ◆ i386_emit_add()

static void i386_emit_add | ( | void |  | ) |
| static

Definition at line 2146 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_bit_and()

static void i386_emit_bit_and | ( | void |  | ) |
| static

Definition at line 2228 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_bit_not()

static void i386_emit_bit_not | ( | void |  | ) |
| static

Definition at line 2255 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_bit_or()

static void i386_emit_bit_or | ( | void |  | ) |
| static

Definition at line 2237 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_bit_xor()

static void i386_emit_bit_xor | ( | void |  | ) |
| static

Definition at line 2246 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_call()

static void i386_emit_call | ( | CORE_ADDR | fn | ) |
| static

Definition at line 2418 of file linux-x86-low.c.

References append_insns(), current_insn_ptr, and offset.

Referenced by i386_emit_int_call_1(), i386_emit_reg(), and i386_emit_void_call_2().

## ◆ i386_emit_const()

static void i386_emit_const | ( | LONGEST | num | ) |
| static

Definition at line 2391 of file linux-x86-low.c.

References append_insns(), and current_insn_ptr.

## ◆ i386_emit_epilogue()

static void i386_emit_epilogue | ( | void |  | ) |
| static

Definition at line 2133 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_eq_goto()

void i386_emit_eq_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |

Definition at line 2593 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_equal()

static void i386_emit_equal | ( | void |  | ) |
| static

Definition at line 2263 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_ext()

static void i386_emit_ext | ( | int | arg | ) |
| static

Definition at line 2189 of file linux-x86-low.c.

References EMIT_ASM32, and emit_error.

## ◆ i386_emit_ge_goto()

void i386_emit_ge_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |

Definition at line 2722 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_goto()

static void i386_emit_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

Definition at line 2362 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_gt_goto()

void i386_emit_gt_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |

Definition at line 2696 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_if_goto()

static void i386_emit_if_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

Definition at line 2344 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_int_call_1()

static void i386_emit_int_call_1 | ( | CORE_ADDR | fn,
|  | int | arg1
| ) |  |
| static

Definition at line 2530 of file linux-x86-low.c.

References append_insns(), current_insn_ptr, EMIT_ASM32, and i386_emit_call().

## ◆ i386_emit_le_goto()

void i386_emit_le_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |

Definition at line 2670 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_less_signed()

static void i386_emit_less_signed | ( | void |  | ) |
| static

Definition at line 2281 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_less_unsigned()

static void i386_emit_less_unsigned | ( | void |  | ) |
| static

Definition at line 2300 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_log_not()

static void i386_emit_log_not | ( | void |  | ) |
| static

Definition at line 2217 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_lsh()

static void i386_emit_lsh | ( | void |  | ) |
| static

Definition at line 2171 of file linux-x86-low.c.

References emit_error.

## ◆ i386_emit_lt_goto()

void i386_emit_lt_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |

Definition at line 2644 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_mul()

static void i386_emit_mul | ( | void |  | ) |
| static

Definition at line 2165 of file linux-x86-low.c.

References emit_error.

## ◆ i386_emit_ne_goto()

void i386_emit_ne_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |

Definition at line 2618 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_pop()

static void i386_emit_pop | ( | void |  | ) |
| static

Definition at line 2460 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_prologue()

static void i386_emit_prologue | ( | void |  | ) |
| static

Definition at line 2122 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_ref()

static void i386_emit_ref | ( | int | size | ) |
| static

Definition at line 2319 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_reg()

static void i386_emit_reg | ( | int | reg | ) |
| static

Definition at line 2434 of file linux-x86-low.c.

References append_insns(), current_insn_ptr, EMIT_ASM32, get_raw_reg_func_addr(), and i386_emit_call().

## ◆ i386_emit_rsh_signed()

static void i386_emit_rsh_signed | ( | void |  | ) |
| static

Definition at line 2177 of file linux-x86-low.c.

References emit_error.

## ◆ i386_emit_rsh_unsigned()

static void i386_emit_rsh_unsigned | ( | void |  | ) |
| static

Definition at line 2183 of file linux-x86-low.c.

References emit_error.

## ◆ i386_emit_stack_adjust()

static void i386_emit_stack_adjust | ( | int | n | ) |
| static

Definition at line 2512 of file linux-x86-low.c.

References append_insns(), and current_insn_ptr.

## ◆ i386_emit_stack_flush()

static void i386_emit_stack_flush | ( | void |  | ) |
| static

Definition at line 2468 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_sub()

static void i386_emit_sub | ( | void |  | ) |
| static

Definition at line 2155 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_swap()

static void i386_emit_swap | ( | void |  | ) |
| static

Definition at line 2500 of file linux-x86-low.c.

References EMIT_ASM32.

## ◆ i386_emit_void_call_2()

static void i386_emit_void_call_2 | ( | CORE_ADDR | fn,
|  | int | arg1
| ) |  |
| static

Definition at line 2558 of file linux-x86-low.c.

References append_insns(), current_insn_ptr, EMIT_ASM32, and i386_emit_call().

## ◆ i386_emit_zero_ext()

static void i386_emit_zero_ext | ( | int | arg | ) |
| static

Definition at line 2476 of file linux-x86-low.c.

References EMIT_ASM32, and emit_error.

## ◆ i386_install_fast_tracepoint_jump_pad()

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 1217 of file linux-x86-low.c.

References append_insns(), claim_trampoline_space(), jump_insn, offset, push_opcode(), relocate_instruction(), small_jump_insn, and write_inferior_memory().

Referenced by x86_install_fast_tracepoint_jump_pad().

## ◆ i386_write_goto_address()

static void i386_write_goto_address | ( | CORE_ADDR | from,
|  | CORE_ADDR | to,
|  | int | size
| ) |  |
| static

Definition at line 2374 of file linux-x86-low.c.

References emit_error, and write_inferior_memory().

## ◆ initialize_low_arch()

void initialize_low_arch | ( | void |  | ) |

Definition at line 2889 of file linux-x86-low.c.

References allocate_target_description(), copy_target_description(), i386_linux_read_description(), initialize_low_tdesc(), tdesc_i386_linux_no_xml, x86_regsets_info, X86_XSTATE_SSE_MASK, target_desc::xmltarget, and xmltarget_i386_linux_no_xml.

## ◆ ps_get_thread_area()

ps_err_e ps_get_thread_area | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | int | idx,
|  | void ** | base
| ) |  |

Definition at line 195 of file linux-x86-low.c.

References ARCH_GET_FS, ARCH_GET_GS, is_64bit_tdesc(), PS_BADADDR, PS_ERR, PS_OK, ptrace(), PTRACE_ARCH_PRCTL, and PTRACE_GET_THREAD_AREA.

## ◆ push_opcode()

static int push_opcode | ( | unsigned char * | buf,
|  | const char * | op
| ) |  |
| static

Definition at line 1001 of file linux-x86-low.c.

Referenced by i386_install_fast_tracepoint_jump_pad().

## ◆ x86_arch_setup()

static void x86_arch_setup | ( | void |  | ) |
| static

Definition at line 963 of file linux-x86-low.c.

References current_process(), process_info::tdesc, and x86_linux_read_description().

## ◆ x86_breakpoint_at()

static int x86_breakpoint_at | ( | CORE_ADDR | pc | ) |
| static

Definition at line 500 of file linux-x86-low.c.

References target_ops::read_memory, and the_target.

## ◆ x86_cannot_fetch_register()

static int x86_cannot_fetch_register | ( | int | regno | ) |
| static

Definition at line 294 of file linux-x86-low.c.

References I386_NUM_REGS, and is_64bit_tdesc().

## ◆ x86_cannot_store_register()

static int x86_cannot_store_register | ( | int | regno | ) |
| static

Definition at line 283 of file linux-x86-low.c.

References I386_NUM_REGS, and is_64bit_tdesc().

## ◆ x86_debug_reg_state()

struct x86_debug_reg_state* x86_debug_reg_state | ( | pid_t | pid | ) |

Definition at line 659 of file linux-x86-low.c.

References process_info_private::arch_private, arch_process_info::debug_reg_state, find_process_pid(), process_info::pid, and process_info::priv.

Referenced by x86_linux_update_debug_registers().

## ◆ x86_emit_ops()

static struct emit_ops* x86_emit_ops | ( | void |  | ) |
| static

Definition at line 2790 of file linux-x86-low.c.

References i386_emit_ops, and is_64bit_tdesc().

## ◆ x86_fill_fpregset()

static void x86_fill_fpregset | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

Definition at line 380 of file linux-x86-low.c.

References i387_cache_to_fsave(), and i387_cache_to_fxsave().

## ◆ x86_fill_fpxregset()

static void x86_fill_fpxregset | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

Definition at line 402 of file linux-x86-low.c.

References i387_cache_to_fxsave().

## ◆ x86_fill_gregset()

static void x86_fill_gregset | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

Definition at line 305 of file linux-x86-low.c.

References ARCH_SET_FS, ARCH_SET_GS, collect_register(), collect_register_by_name(), current_thread, I386_NUM_REGS, i386_regmap, lwpid_of(), memset(), ptrace(), PTRACE_ARCH_PRCTL, register_size(), REGSIZE, and regcache::tdesc.

## ◆ x86_fill_xstateregset()

static void x86_fill_xstateregset | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

Definition at line 416 of file linux-x86-low.c.

References i387_cache_to_xsave().

## ◆ x86_get_ipa_tdesc_idx()

static int x86_get_ipa_tdesc_idx | ( | void |  | ) |
| static

Definition at line 2825 of file linux-x86-low.c.

References current_thread, get_thread_regcache(), i386_get_ipa_tdesc_idx(), regcache::tdesc, tdesc_i386_linux_no_xml, and X86_TDESC_SSE.

## ◆ x86_get_min_fast_tracepoint_insn_len()

static int x86_get_min_fast_tracepoint_insn_len | ( | void |  | ) |
| static

Definition at line 1441 of file linux-x86-low.c.

References agent_loaded_p(), have_fast_tracepoint_trampoline_buffer(), IPA_BUFSIZ, is_64bit_tdesc(), and warning().

## ◆ x86_get_pc()

static CORE_ADDR x86_get_pc | ( | struct regcache * | regcache | ) |
| static

Definition at line 457 of file linux-x86-low.c.

References collect_register_by_name(), register_size(), and regcache::tdesc.

## ◆ x86_get_syscall_trapinfo()

static void x86_get_syscall_trapinfo | ( | struct regcache * | regcache,
|  | int * | sysno
| ) |  |
| static

Definition at line 972 of file linux-x86-low.c.

References collect_register_by_name(), register_size(), and regcache::tdesc.

## ◆ x86_get_thread_area()

static int x86_get_thread_area | ( | int | lwpid,
|  | CORE_ADDR * | addr
| ) |  |
| static

Definition at line 239 of file linux-x86-low.c.

References ARCH_GET_FS, collect_register_by_name(), find_lwp_pid(), get_lwp_thread, get_thread_regcache(), is_64bit_tdesc(), lwpid_of(), pid_to_ptid(), ptrace(), PTRACE_ARCH_PRCTL, and PTRACE_GET_THREAD_AREA.

## ◆ x86_insert_point()

static int x86_insert_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | size,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 540 of file linux-x86-low.c.

References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, process_info::priv, raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_to_target_hw_bp_type(), raw_bkpt_type_write_wp, and x86_dr_insert_watchpoint().

## ◆ x86_install_fast_tracepoint_jump_pad()

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 1400 of file linux-x86-low.c.

References i386_install_fast_tracepoint_jump_pad(), and is_64bit_tdesc().

## ◆ x86_linux_delete_process()

static void x86_linux_delete_process | ( | struct arch_process_info * | info | ) |
| static

Definition at line 623 of file linux-x86-low.c.

References xfree().

## ◆ x86_linux_new_fork()

static void x86_linux_new_fork | ( | struct process_info * | parent,
|  | struct process_info * | child
| ) |  |
| static

Definition at line 631 of file linux-x86-low.c.

References process_info_private::arch_private, gdb_assert, and process_info::priv.

## ◆ x86_linux_new_process()

static struct arch_process_info* x86_linux_new_process | ( | void |  | ) |
| static

Definition at line 611 of file linux-x86-low.c.

References arch_process_info::debug_reg_state, x86_low_init_dregs(), and XCNEW.

## ◆ x86_linux_process_qsupported()

static void x86_linux_process_qsupported | ( | char ** | features,
|  | int | count
| ) |  |
| static

Definition at line 886 of file linux-x86-low.c.

References free(), startswith(), use_xml, x86_linux_update_xmltarget(), and xstrdup().

## ◆ x86_linux_read_description()

static const struct target_desc* x86_linux_read_description | ( | void |  | ) |
| static

Definition at line 736 of file linux-x86-low.c.

References _, current_thread, error(), gdb_assert_not_reached, have_ptrace_getfpxregs, have_ptrace_getregset, i386_linux_read_description(), I386_LINUX_XSAVE_XCR0_OFFSET, linux_pid_exe_is_elf_64_file(), lwpid_of(), ptrace(), PTRACE_GETREGSET, tdesc_i386_linux_no_xml, use_xml, x86_regsets, x86_xcr0, X86_XSTATE_ALL_MASK, X86_XSTATE_SIZE, X86_XSTATE_SSE, X86_XSTATE_SSE_MASK, X86_XSTATE_SSE_SIZE, and X86_XSTATE_X87.

Referenced by x86_arch_setup().

## ◆ x86_linux_regs_info()

const struct regs_info* x86_linux_regs_info | ( | void |  | ) |

Definition at line 949 of file linux-x86-low.c.

References i386_linux_regs_info, and is_64bit_tdesc().

## ◆ x86_linux_update_xmltarget()

static void x86_linux_update_xmltarget | ( | void |  | ) |
| static

Definition at line 861 of file linux-x86-low.c.

References linux_target_ops::arch_setup, current_thread, find_any_thread_of_pid(), for_each_process(), process_info::pid, regcache_release(), and the_low_target.

Referenced by x86_linux_process_qsupported().

## ◆ x86_remove_point()

static int x86_remove_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | size,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 566 of file linux-x86-low.c.

References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, process_info::priv, raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_to_target_hw_bp_type(), raw_bkpt_type_write_wp, and x86_dr_remove_watchpoint().

## ◆ x86_set_pc()

static void x86_set_pc | ( | struct regcache * | regcache,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 478 of file linux-x86-low.c.

References register_size(), supply_register_by_name(), and regcache::tdesc.

## ◆ x86_siginfo_fixup()

static int x86_siginfo_fixup | ( | siginfo_t * | ptrace,
|  | gdb_byte * | inf,
|  | int | direction
| ) |  |
| static

Definition at line 679 of file linux-x86-low.c.

References amd64_linux_siginfo_fixup_common(), current_thread, FIXUP_32, FIXUP_X32, is_64bit_tdesc(), linux_pid_exe_is_elf_64_file(), lwpid_of(), and ptrace().

## ◆ x86_stopped_by_watchpoint()

static int x86_stopped_by_watchpoint | ( | void |  | ) |
| static

Definition at line 591 of file linux-x86-low.c.

References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, process_info::priv, and x86_dr_stopped_by_watchpoint().

## ◆ x86_stopped_data_address()

static CORE_ADDR x86_stopped_data_address | ( | void |  | ) |
| static

Definition at line 598 of file linux-x86-low.c.

References process_info_private::arch_private, current_process(), arch_process_info::debug_reg_state, process_info::priv, and x86_dr_stopped_data_address().

## ◆ x86_store_fpregset()

static void x86_store_fpregset | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

Definition at line 390 of file linux-x86-low.c.

References i387_fsave_to_cache(), and i387_fxsave_to_cache().

## ◆ x86_store_fpxregset()

static void x86_store_fpxregset | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

Definition at line 408 of file linux-x86-low.c.

References i387_fxsave_to_cache().

## ◆ x86_store_gregset()

static void x86_store_gregset | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

Definition at line 345 of file linux-x86-low.c.

References ARCH_GET_FS, ARCH_GET_GS, current_thread, I386_NUM_REGS, i386_regmap, lwpid_of(), ptrace(), PTRACE_ARCH_PRCTL, register_size(), REGSIZE, supply_register(), supply_register_by_name(), and regcache::tdesc.

## ◆ x86_store_xstateregset()

static void x86_store_xstateregset | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

Definition at line 422 of file linux-x86-low.c.

References i387_xsave_to_cache().

## ◆ x86_supports_hardware_single_step()

static int x86_supports_hardware_single_step | ( | void |  | ) |
| static

Definition at line 2819 of file linux-x86-low.c.

## ◆ x86_supports_range_stepping()

static int x86_supports_range_stepping | ( | void |  | ) |
| static

Definition at line 2810 of file linux-x86-low.c.

## ◆ x86_supports_tracepoints()

static int x86_supports_tracepoints | ( | void |  | ) |
| static

Definition at line 988 of file linux-x86-low.c.

## ◆ x86_supports_z_point_type()

static int x86_supports_z_point_type | ( | char | z_type | ) |
| static

Definition at line 525 of file linux-x86-low.c.

References Z_PACKET_ACCESS_WP, Z_PACKET_HW_BP, Z_PACKET_SW_BP, and Z_PACKET_WRITE_WP.

## ◆ x86_sw_breakpoint_from_kind()

static const gdb_byte* x86_sw_breakpoint_from_kind | ( | int | kind,
|  | int * | size
| ) |  |
| static

Definition at line 2803 of file linux-x86-low.c.

References x86_breakpoint, and x86_breakpoint_len.

## Variable Documentation

## ◆ have_ptrace_getfpxregs

int have_ptrace_getfpxregs

Initial value:
=
0

Definition at line 725 of file linux-x86-low.c.

Referenced by x86_linux_read_description().

## ◆ i386_emit_ops

struct emit_ops i386_emit_ops

Definition at line 2747 of file linux-x86-low.c.

Referenced by x86_emit_ops().

## ◆ i386_linux_regs_info

struct regs_info i386_linux_regs_info
| static

Initial value:
=
{
NULL,
&i386_linux_usrregs_info,
&x86_regsets_info
}
x86_regsets_info
static struct regsets_info x86_regsets_info
Definition: linux-x86-low.c:920
i386_linux_usrregs_info
static struct usrregs_info i386_linux_usrregs_info
Definition: linux-x86-low.c:935

Definition at line 941 of file linux-x86-low.c.

Referenced by x86_linux_regs_info().

## ◆ i386_linux_usrregs_info

struct usrregs_info i386_linux_usrregs_info
| static

Initial value:
=
{
I386_NUM_REGS,
i386_regmap,
}
I386_NUM_REGS
#define I386_NUM_REGS
Definition: linux-x86-low.c:170
i386_regmap
static int i386_regmap[]
Definition: linux-x86-low.c:162

Definition at line 935 of file linux-x86-low.c.

## ◆ i386_regmap

int i386_regmap[]
| static

Initial value:
=
{
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 162 of file linux-x86-low.c.

Referenced by x86_fill_gregset(), and x86_store_gregset().

## ◆ jump_insn

unsigned char jump_insn[] = { 0xe9, 0, 0, 0, 0 }
| static

Definition at line 56 of file linux-x86-low.c.

Referenced by i386_install_fast_tracepoint_jump_pad().

## ◆ small_jump_insn

unsigned char small_jump_insn[] = { 0x66, 0xe9, 0, 0 }
| static

Definition at line 57 of file linux-x86-low.c.

Referenced by i386_install_fast_tracepoint_jump_pad().

## ◆ tdesc_i386_linux_no_xml

struct target_desc* tdesc_i386_linux_no_xml
| static

Definition at line 53 of file linux-x86-low.c.

Referenced by initialize_low_arch(), x86_get_ipa_tdesc_idx(), and x86_linux_read_description().

## ◆ the_low_target

struct linux_target_ops the_low_target

Definition at line 2843 of file linux-x86-low.c.

Referenced by x86_linux_update_xmltarget().

## ◆ use_xml

int use_xml
| static

Definition at line 699 of file linux-x86-low.c.

Referenced by x86_linux_process_qsupported(), and x86_linux_read_description().

## ◆ x86_breakpoint

const gdb_byte x86_breakpoint[] = { 0xCC }
| static

Definition at line 496 of file linux-x86-low.c.

Referenced by x86_sw_breakpoint_from_kind().

## ◆ x86_dr_low

struct x86_dr_low_type x86_dr_low

Initial value:
=
{
x86_linux_dr_set_control,
x86_linux_dr_set_addr,
x86_linux_dr_get_addr,
x86_linux_dr_get_status,
x86_linux_dr_get_control,
sizeof (void *),
}
x86_linux_dr_get_status
unsigned long x86_linux_dr_get_status(void)
Definition: x86-linux-dregs.c:133
x86_linux_dr_set_control
void x86_linux_dr_set_control(unsigned long control)
Definition: x86-linux-dregs.c:123
x86_linux_dr_set_addr
void x86_linux_dr_set_addr(int regnum, CORE_ADDR addr)
Definition: x86-linux-dregs.c:103
x86_linux_dr_get_addr
CORE_ADDR x86_linux_dr_get_addr(int regnum)
Definition: x86-linux-dregs.c:93
x86_linux_dr_get_control
unsigned long x86_linux_dr_get_control(void)
Definition: x86-linux-dregs.c:115

Definition at line 512 of file linux-x86-low.c.

## ◆ x86_regsets

struct regset_info x86_regsets[]
| static

Initial value:
=
{
NULL_REGSET
}

Definition at line 434 of file linux-x86-low.c.

Referenced by x86_linux_read_description().

## ◆ x86_regsets_info

struct regsets_info x86_regsets_info
| static

Initial value:
=
{
x86_regsets,
0,
NULL,
}
x86_regsets
static struct regset_info x86_regsets[]
Definition: linux-x86-low.c:434

Definition at line 920 of file linux-x86-low.c.

Referenced by initialize_low_arch().

## ◆ xmltarget_i386_linux_no_xml

const char* xmltarget_i386_linux_no_xml
| static

Initial value:
= "@<target>\
<architecture>i386</architecture>\
<osabi>GNU/Linux</osabi>\
</target>"

Definition at line 61 of file linux-x86-low.c.

Referenced by initialize_low_arch().