GDB (xrefs)

Macros | Functions | Variables
/tmp/gdb-8.1/gdb/x86-linux-nat.c File Reference
`#include "defs.h"`
`#include "inferior.h"`
`#include "elf/common.h"`
`#include "gdb_proc_service.h"`
`#include "nat/gdb_ptrace.h"`
`#include <sys/user.h>`
`#include <sys/procfs.h>`
`#include <sys/uio.h>`
`#include "x86-nat.h"`
`#include "linux-nat.h"`
`#include "i386-linux-nat.h"`
`#include "x86-linux-nat.h"`
`#include "i386-linux-tdep.h"`
`#include "x86-xstate.h"`
`#include "nat/linux-btrace.h"`
`#include "nat/linux-nat.h"`
`#include "nat/x86-linux.h"`
`#include "nat/x86-linux-dregs.h"`
`#include "nat/linux-ptrace.h"`

Go to the source code of this file.

## Macros
#define | PTRACE_GET_THREAD_AREA 25

## Functions
static void | x86_linux_new_fork (struct lwp_info *parent, pid_t child_pid)
static void | x86_linux_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
static const struct target_desc * | x86_linux_read_description (struct target_ops *ops)
static struct btrace_target_info * | x86_linux_enable_btrace (struct target_ops *self, ptid_t ptid, const struct btrace_config *conf)
static void | x86_linux_disable_btrace (struct target_ops *self, struct btrace_target_info *tinfo)
static void | x86_linux_teardown_btrace (struct target_ops *self, struct btrace_target_info *tinfo)
static enum btrace_error | x86_linux_read_btrace (struct target_ops *self, struct btrace_data *data, struct btrace_target_info *btinfo, enum btrace_read_type type)
static const struct btrace_config * | x86_linux_btrace_conf (struct target_ops *self, const struct btrace_target_info *btinfo)
ps_err_e | x86_linux_get_thread_area (pid_t pid, void *addr, unsigned int *base_addr)
struct target_ops * | x86_linux_create_target (void)
void | x86_linux_add_target (struct target_ops *t)

## Variables
static void(* | super_post_startup_inferior )(struct target_ops *self, ptid_t ptid)

## Macro Definition Documentation

## ◆ PTRACE_GET_THREAD_AREA

#define PTRACE_GET_THREAD_AREA 25

Referenced by x86_linux_get_thread_area().

## Function Documentation

## ◆ x86_linux_add_target()

void x86_linux_add_target | ( | struct target_ops * | t | ) |

Definition at line 353 of file x86-linux-nat.c.

References linux_nat_add_target(), linux_nat_set_delete_thread(), linux_nat_set_forget_process(), linux_nat_set_new_fork(), linux_nat_set_new_thread(), linux_nat_set_prepare_to_resume(), x86_forget_process(), x86_linux_delete_thread(), x86_linux_new_fork(), x86_linux_new_thread(), and x86_linux_prepare_to_resume().

Referenced by _initialize_amd64_linux_nat(), and _initialize_i386_linux_nat().

## ◆ x86_linux_btrace_conf()

static const struct btrace_config* x86_linux_btrace_conf | ( | struct target_ops * | self,
|  | const struct btrace_target_info * | btinfo
| ) |  |
| static

Definition at line 265 of file x86-linux-nat.c.

References linux_btrace_conf().

Referenced by x86_linux_create_target().

## ◆ x86_linux_child_post_startup_inferior()

static void x86_linux_child_post_startup_inferior | ( | struct target_ops * | self,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 85 of file x86-linux-nat.c.

References super_post_startup_inferior, and x86_cleanup_dregs().

Referenced by x86_linux_create_target().

## ◆ x86_linux_create_target()

struct target_ops* x86_linux_create_target | ( | void |  | ) |

Definition at line 318 of file x86-linux-nat.c.

References x86_dr_low_type::get_addr, x86_dr_low_type::get_control, x86_dr_low_type::get_status, linux_supports_btrace(), linux_target(), x86_dr_low_type::set_addr, x86_dr_low_type::set_control, super_post_startup_inferior, target_ops::to_btrace_conf, target_ops::to_disable_btrace, target_ops::to_enable_btrace, target_ops::to_post_startup_inferior, target_ops::to_read_btrace, target_ops::to_read_description, target_ops::to_supports_btrace, target_ops::to_teardown_btrace, x86_dr_low, x86_linux_btrace_conf(), x86_linux_child_post_startup_inferior(), x86_linux_disable_btrace(), x86_linux_dr_get_addr(), x86_linux_dr_get_control(), x86_linux_dr_get_status(), x86_linux_dr_set_addr(), x86_linux_dr_set_control(), x86_linux_enable_btrace(), x86_linux_read_btrace(), x86_linux_read_description(), x86_linux_teardown_btrace(), x86_set_debug_register_length(), and x86_use_watchpoints().

Referenced by _initialize_amd64_linux_nat(), and _initialize_i386_linux_nat().

## ◆ x86_linux_disable_btrace()

static void x86_linux_disable_btrace | ( | struct target_ops * | self,
|  | struct btrace_target_info * | tinfo
| ) |  |
| static

Definition at line 234 of file x86-linux-nat.c.

References _, BTRACE_ERR_NONE, error(), and linux_disable_btrace().

Referenced by x86_linux_create_target().

## ◆ x86_linux_enable_btrace()

static struct btrace_target_info* x86_linux_enable_btrace | ( | struct target_ops * | self,
|  | ptid_t | ptid,
|  | const struct btrace_config * | conf
| ) |  |
| static

Definition at line 216 of file x86-linux-nat.c.

References _, btrace_target_info::conf, error(), linux_enable_btrace(), btrace_target_info::ptid, safe_strerror(), and target_pid_to_str().

Referenced by x86_linux_create_target().

## ◆ x86_linux_get_thread_area()

ps_err_e x86_linux_get_thread_area | ( | pid_t | pid,
|  | void * | addr,
|  | unsigned int * | base_addr
| ) |  |

Definition at line 278 of file x86-linux-nat.c.

References gdb_assert, pid, PS_ERR, PS_OK, ptrace(), and PTRACE_GET_THREAD_AREA.

Referenced by ps_get_thread_area().

## ◆ x86_linux_new_fork()

static void x86_linux_new_fork | ( | struct lwp_info * | parent,
|  | pid_t | child_pid
| ) |  |
| static

Definition at line 49 of file x86-linux-nat.c.

References lwp_info::arch_private, lwp_info::ptid, ptid_get_pid(), and x86_debug_reg_state().

Referenced by x86_linux_add_target().

## ◆ x86_linux_read_btrace()

static enum btrace_error x86_linux_read_btrace | ( | struct target_ops * | self,
|  | struct btrace_data * | data,
|  | struct btrace_target_info * | btinfo,
|  | enum btrace_read_type | type
| ) |  |
| static

Definition at line 254 of file x86-linux-nat.c.

References linux_read_btrace().

Referenced by x86_linux_create_target().

## ◆ x86_linux_read_description()

static const struct target_desc* x86_linux_read_description | ( | struct target_ops * | ops | ) |
| static

Definition at line 106 of file x86-linux-nat.c.

References _, amd64_linux_read_description(), error(), gdb_assert_not_reached, have_ptrace_getfpxregs, have_ptrace_getregset, i386_linux_read_description(), I386_LINUX_XSAVE_XCR0_OFFSET, inferior_ptid, perror_with_name(), ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_GETREGSET, selftests::ptid::tid, TRIBOOL_FALSE, TRIBOOL_TRUE, TRIBOOL_UNKNOWN, X86_XSTATE_ALL_MASK, X86_XSTATE_SSE_MASK, X86_XSTATE_SSE_SIZE, and X86_XSTATE_X87_MASK.

Referenced by x86_linux_create_target().

## ◆ x86_linux_teardown_btrace()

static void x86_linux_teardown_btrace | ( | struct target_ops * | self,
|  | struct btrace_target_info * | tinfo
| ) |  |
| static

Definition at line 246 of file x86-linux-nat.c.

References linux_disable_btrace().

Referenced by x86_linux_create_target().

## Variable Documentation

## ◆ super_post_startup_inferior

void(* super_post_startup_inferior) (struct target_ops *self, ptid_t ptid)
| static

Definition at line 81 of file x86-linux-nat.c.

Referenced by x86_linux_child_post_startup_inferior(), and x86_linux_create_target().