GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/gdb/x86-nat.c File Reference
`#include "defs.h"`
`#include "x86-nat.h"`
`#include "gdbcmd.h"`
`#include "inferior.h"`

Go to the source code of this file.

## Classes
struct | x86_process_info

## Functions
static struct x86_process_info * | x86_find_process_pid (pid_t pid)
static struct x86_process_info * | x86_add_process (pid_t pid)
static struct x86_process_info * | x86_process_info_get (pid_t pid)
struct x86_debug_reg_state * | x86_debug_reg_state (pid_t pid)
void | x86_forget_process (pid_t pid)
void | x86_cleanup_dregs (void)
static int | x86_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, enum target_hw_bp_type type, struct expression *cond)
static int | x86_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, enum target_hw_bp_type type, struct expression *cond)
static int | x86_region_ok_for_watchpoint (struct target_ops *self, CORE_ADDR addr, int len)
static int | x86_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
static int | x86_stopped_by_watchpoint (struct target_ops *ops)
static int | x86_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static int | x86_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static int | x86_can_use_hw_breakpoint (struct target_ops *self, enum bptype type, int cnt, int othertype)
static void | add_show_debug_regs_command (void)
void | x86_use_watchpoints (struct target_ops *t)
void | x86_set_debug_register_length (int len)

## Variables
struct x86_dr_low_type | x86_dr_low
static struct x86_process_info * | x86_process_list = NULL

## Function Documentation

## ◆ add_show_debug_regs_command()

static void add_show_debug_regs_command | ( | void |  | ) |
| static

Definition at line 264 of file x86-nat.c.

References _, add_setshow_boolean_cmd(), class_maintenance, maintenance_set_cmdlist, maintenance_show_cmdlist, and show_debug_regs.

Referenced by x86_set_debug_register_length().

## ◆ x86_add_process()

static struct x86_process_info* x86_add_process | ( | pid_t | pid | ) |
| static

Definition at line 76 of file x86-nat.c.

References proc::next, pid, x86_process_list, and XCNEW.

Referenced by x86_process_info_get().

## ◆ x86_can_use_hw_breakpoint()

static int x86_can_use_hw_breakpoint | ( | struct target_ops * | self,
|  | enum bptype | type,
|  | int | cnt,
|  | int | othertype
| ) |  |
| static

Definition at line 257 of file x86-nat.c.

Referenced by x86_use_watchpoints().

## ◆ x86_cleanup_dregs()

void x86_cleanup_dregs | ( | void |  | ) |

Definition at line 139 of file x86-nat.c.

References inferior_ptid, ptid_get_pid(), and x86_forget_process().

Referenced by go32_mourn_inferior(), windows_detach(), windows_mourn_inferior(), and x86_linux_child_post_startup_inferior().

## ◆ x86_debug_reg_state()

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

Definition at line 105 of file x86-nat.c.

References pid, x86_process_info::state, and x86_process_info_get().

Referenced by x86_insert_hw_breakpoint(), x86_insert_watchpoint(), x86_linux_new_fork(), x86_linux_update_debug_registers(), x86_region_ok_for_watchpoint(), x86_remove_hw_breakpoint(), x86_remove_watchpoint(), x86_stopped_by_watchpoint(), and x86_stopped_data_address().

## ◆ x86_find_process_pid()

static struct x86_process_info* x86_find_process_pid | ( | pid_t | pid | ) |
| static

Definition at line 61 of file x86-nat.c.

References proc::next, pid, and x86_process_list.

Referenced by x86_process_info_get().

## ◆ x86_forget_process()

void x86_forget_process | ( | pid_t | pid | ) |

Definition at line 113 of file x86-nat.c.

References proc::next, pid, x86_process_list, and xfree().

Referenced by x86_cleanup_dregs(), and x86_linux_add_target().

## ◆ x86_insert_hw_breakpoint()

static int x86_insert_hw_breakpoint | ( | struct target_ops * | self,
|  | struct gdbarch * | gdbarch,
|  | struct bp_target_info * | bp_tgt
| ) |  |
| static

Definition at line 214 of file x86-nat.c.

References hw_execute, inferior_ptid, bp_target_info::placed_address, ptid_get_pid(), bp_target_info::reqstd_address, x86_debug_reg_state(), and x86_dr_insert_watchpoint().

Referenced by x86_use_watchpoints().

## ◆ x86_insert_watchpoint()

static int x86_insert_watchpoint | ( | struct target_ops * | self,
|  | CORE_ADDR | addr,
|  | int | len,
|  | enum target_hw_bp_type | type,
|  | struct expression * | cond
| ) |  |
| static

Definition at line 150 of file x86-nat.c.

References inferior_ptid, ptid_get_pid(), x86_debug_reg_state(), and x86_dr_insert_watchpoint().

Referenced by x86_use_watchpoints().

## ◆ x86_process_info_get()

static struct x86_process_info* x86_process_info_get | ( | pid_t | pid | ) |
| static

Definition at line 91 of file x86-nat.c.

References pid, x86_add_process(), and x86_find_process_pid().

Referenced by x86_debug_reg_state().

## ◆ x86_region_ok_for_watchpoint()

static int x86_region_ok_for_watchpoint | ( | struct target_ops * | self,
|  | CORE_ADDR | addr,
|  | int | len
| ) |  |
| static

Definition at line 176 of file x86-nat.c.

References inferior_ptid, ptid_get_pid(), x86_debug_reg_state(), and x86_dr_region_ok_for_watchpoint().

Referenced by x86_use_watchpoints().

## ◆ x86_remove_hw_breakpoint()

static int x86_remove_hw_breakpoint | ( | struct target_ops * | self,
|  | struct gdbarch * | gdbarch,
|  | struct bp_target_info * | bp_tgt
| ) |  |
| static

Definition at line 229 of file x86-nat.c.

References hw_execute, inferior_ptid, bp_target_info::placed_address, ptid_get_pid(), x86_debug_reg_state(), and x86_dr_remove_watchpoint().

Referenced by x86_use_watchpoints().

## ◆ x86_remove_watchpoint()

static int x86_remove_watchpoint | ( | struct target_ops * | self,
|  | CORE_ADDR | addr,
|  | int | len,
|  | enum target_hw_bp_type | type,
|  | struct expression * | cond
| ) |  |
| static

Definition at line 163 of file x86-nat.c.

References inferior_ptid, ptid_get_pid(), x86_debug_reg_state(), and x86_dr_remove_watchpoint().

Referenced by x86_use_watchpoints().

## ◆ x86_set_debug_register_length()

void x86_set_debug_register_length | ( | int | len | ) |

Definition at line 303 of file x86-nat.c.

References add_show_debug_regs_command(), x86_dr_low_type::debug_register_length, gdb_assert, and x86_dr_low.

Referenced by _initialize_amd64_windows_nat(), _initialize_go32_nat(), _initialize_i386_windows_nat(), _initialize_i386gnu_nat(), darwin_complete_target(), x86_linux_create_target(), and x86bsd_target().

## ◆ x86_stopped_by_watchpoint()

static int x86_stopped_by_watchpoint | ( | struct target_ops * | ops | ) |
| static

Definition at line 202 of file x86-nat.c.

References inferior_ptid, ptid_get_pid(), x86_debug_reg_state(), and x86_dr_stopped_by_watchpoint().

Referenced by x86_use_watchpoints().

## ◆ x86_stopped_data_address()

static int x86_stopped_data_address | ( | struct target_ops * | ops,
|  | CORE_ADDR * | addr_p
| ) |  |
| static

Definition at line 190 of file x86-nat.c.

References inferior_ptid, ptid_get_pid(), x86_debug_reg_state(), and x86_dr_stopped_data_address().

Referenced by x86_use_watchpoints().

## ◆ x86_use_watchpoints()

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

Definition at line 285 of file x86-nat.c.

References target_ops::to_can_use_hw_breakpoint, target_ops::to_have_continuable_watchpoint, target_ops::to_insert_hw_breakpoint, target_ops::to_insert_watchpoint, target_ops::to_region_ok_for_hw_watchpoint, target_ops::to_remove_hw_breakpoint, target_ops::to_remove_watchpoint, target_ops::to_stopped_by_watchpoint, target_ops::to_stopped_data_address, x86_can_use_hw_breakpoint(), x86_insert_hw_breakpoint(), x86_insert_watchpoint(), x86_region_ok_for_watchpoint(), x86_remove_hw_breakpoint(), x86_remove_watchpoint(), x86_stopped_by_watchpoint(), and x86_stopped_data_address().

Referenced by _initialize_go32_nat(), _initialize_i386gnu_nat(), _initialize_windows_nat(), darwin_complete_target(), x86_linux_create_target(), and x86bsd_target().

## Variable Documentation

## ◆ x86_dr_low

struct x86_dr_low_type x86_dr_low

Definition at line 37 of file x86-nat.c.

Referenced by _initialize_go32_nat(), _initialize_i386gnu_nat(), _initialize_windows_nat(), darwin_complete_target(), x86_linux_create_target(), x86_set_debug_register_length(), and x86bsd_target().

## ◆ x86_process_list

struct x86_process_info* x86_process_list = NULL
| static

Definition at line 56 of file x86-nat.c.

Referenced by x86_add_process(), x86_find_process_pid(), and x86_forget_process().