GDB (xrefs)

Functions
x86-linux-dregs.c File Reference
`#include "common-defs.h"`
`#include "nat/gdb_ptrace.h"`
`#include <sys/user.h>`
`#include "target/waitstatus.h"`
`#include "nat/x86-linux.h"`
`#include "nat/x86-dregs.h"`
`#include "nat/x86-linux-dregs.h"`

Go to the source code of this file.

## Functions
static int | u_debugreg_offset (int regnum)
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 lwp_info *lwp, void *arg)
CORE_ADDR | x86_linux_dr_get_addr (int regnum)
void | x86_linux_dr_set_addr (int regnum, CORE_ADDR addr)
unsigned long | x86_linux_dr_get_control (void)
void | x86_linux_dr_set_control (unsigned long control)
unsigned long | x86_linux_dr_get_status (void)
void | x86_linux_update_debug_registers (struct lwp_info *lwp)

## Function Documentation

## ◆ u_debugreg_offset()

static int u_debugreg_offset | ( | int | regnum | ) |
| static

Definition at line 32 of file x86-linux-dregs.c.

References regnum.

Referenced by x86_linux_dr_get(), and x86_linux_dr_set().

## ◆ update_debug_registers_callback()

static int update_debug_registers_callback | ( | struct lwp_info * | lwp,
|  | void * | arg
| ) |  |
| static

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

References linux_stop_lwp(), selftests::ptid::lwp, lwp_is_stopped(), and lwp_set_debug_registers_changed().

Referenced by x86_linux_dr_set_addr(), and x86_linux_dr_set_control().

## ◆ x86_linux_dr_get()

static unsigned long x86_linux_dr_get | ( | ptid_t | ptid,
|  | int | regnum
| ) |  |
| static

Definition at line 41 of file x86-linux-dregs.c.

References _, gdb_assert, perror_with_name(), ptid_get_lwp(), ptid_lwp_p(), ptrace(), regnum, selftests::ptid::tid, and u_debugreg_offset().

Referenced by x86_linux_dr_get_addr(), x86_linux_dr_get_control(), and x86_linux_dr_get_status().

## ◆ x86_linux_dr_get_addr()

CORE_ADDR x86_linux_dr_get_addr | ( | int | regnum | ) |

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

References current_lwp_ptid(), DR_FIRSTADDR, DR_LASTADDR, gdb_assert, regnum, and x86_linux_dr_get().

Referenced by x86_linux_create_target().

## ◆ x86_linux_dr_get_control()

unsigned long x86_linux_dr_get_control | ( | void |  | ) |

Definition at line 115 of file x86-linux-dregs.c.

References current_lwp_ptid(), DR_CONTROL, and x86_linux_dr_get().

Referenced by x86_linux_create_target().

## ◆ x86_linux_dr_get_status()

unsigned long x86_linux_dr_get_status | ( | void |  | ) |

Definition at line 133 of file x86-linux-dregs.c.

References current_lwp_ptid(), DR_STATUS, and x86_linux_dr_get().

Referenced by x86_linux_create_target().

## ◆ x86_linux_dr_set()

static void x86_linux_dr_set | ( | ptid_t | ptid,
|  | int | regnum,
|  | unsigned long | value
| ) |  |
| static

Definition at line 60 of file x86-linux-dregs.c.

References _, gdb_assert, perror_with_name(), ptid_get_lwp(), ptid_lwp_p(), ptrace(), regnum, selftests::ptid::tid, and u_debugreg_offset().

Referenced by x86_linux_update_debug_registers().

## ◆ x86_linux_dr_set_addr()

void x86_linux_dr_set_addr | ( | int | regnum,
|  | CORE_ADDR | addr
| ) |  |

Definition at line 103 of file x86-linux-dregs.c.

References current_lwp_ptid(), DR_FIRSTADDR, DR_LASTADDR, gdb_assert, iterate_over_lwps(), pid_to_ptid(), ptid_get_pid(), regnum, and update_debug_registers_callback().

Referenced by x86_linux_create_target().

## ◆ x86_linux_dr_set_control()

void x86_linux_dr_set_control | ( | unsigned long | control | ) |

Definition at line 123 of file x86-linux-dregs.c.

References current_lwp_ptid(), iterate_over_lwps(), pid_to_ptid(), ptid_get_pid(), and update_debug_registers_callback().

Referenced by x86_linux_create_target().

## ◆ x86_linux_update_debug_registers()

void x86_linux_update_debug_registers | ( | struct lwp_info * | lwp | ) |

Definition at line 141 of file x86-linux-dregs.c.

References ALL_DEBUG_ADDRESS_REGISTERS, DR_CONTROL, x86_debug_reg_state::dr_control_mirror, x86_debug_reg_state::dr_mirror, x86_debug_reg_state::dr_ref_count, DR_STATUS, gdb_assert, selftests::ptid::lwp, lwp_debug_registers_changed(), lwp_is_stopped(), lwp_set_debug_registers_changed(), lwp_stop_reason(), ptid_get_pid(), ptid_of_lwp(), TARGET_STOPPED_BY_WATCHPOINT, x86_debug_reg_state(), and x86_linux_dr_set().

Referenced by x86_linux_prepare_to_resume().