mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
42995dbda6
This commit makes gdbserver access the x86 debug register accessor functions via the same function vector as GDB proper. This removes a chunk of conditional code that was previously in i386-{nat,low}.h and leaves a single macro as the only GDB/gdbserver difference in nat/i386-dregs.c. gdb/ 2014-06-20 Gary Benson <gbenson@redhat.com> * i386-nat.h (debug_hw_points): Moved to nat/i386-dregs.c. (i386_dr_low_type): Moved to nat/i386-dregs.h. (i386_dr_low): Likewise. (i386_dr_low_can_set_addr): Moved to nat/i386-dregs.c. (i386_dr_low_set_addr): Likewise. (i386_dr_low_get_addr): Likewise. (i386_dr_low_can_set_control): Likewise. (i386_dr_low_set_control): Likewise. (i386_dr_low_get_control): Likewise. (i386_dr_low_get_status): Likewise. (i386_get_debug_register_length): Likewise. * nat/i386-dregs.h (i386_dr_low_type): Moved from i386-nat.h. (i386_dr_low): Likewise. * nat/i386-dregs.c (i386-low.h): Remove include. (i386-nat.h): Likewise. (nat/i386-dregs.h): New include. (i386_dr_low_can_set_addr): Moved from i386-nat.h. (i386_dr_low_set_addr): Likewise. (i386_dr_low_get_addr): Likewise. (i386_dr_low_can_set_control): Likewise. (i386_dr_low_set_control): Likewise. (i386_dr_low_get_control): Likewise. (i386_dr_low_get_status): Likewise. (i386_get_debug_register_length): Likewise. (debug_hw_points): Likewise. gdb/gdbserver/ 2014-06-20 Gary Benson <gbenson@redhat.com> * i386-low.h (i386_dr_low_can_set_addr): Removed. (i386_dr_low_set_addr): Likewise. (i386_dr_low_get_addr): Likewise. (i386_dr_low_can_set_control): Likewise. (i386_dr_low_set_control): Likewise. (i386_dr_low_get_control): Likewise. (i386_dr_low_get_status): Likewise. (i386_get_debug_register_length): Likewise. * linux-x86-low.c (i386_dr_low_set_addr): Changed signature. Made static. (i386_dr_low_get_addr): Likewise. (i386_dr_low_set_control): Likewise. (i386_dr_low_get_control): Likewise. (i386_dr_low_get_status): Likewise. (i386_dr_low): New global variable. * win32-i386-low.c (i386_dr_low_set_addr): Changed signature. Made static. (i386_dr_low_get_addr): Likewise. (i386_dr_low_set_control): Likewise. (i386_dr_low_get_control): Likewise. (i386_dr_low_get_status): Likewise. (i386_dr_low): New global variable.
58 lines
1.9 KiB
C
58 lines
1.9 KiB
C
/* Native-dependent code for the i386.
|
|
|
|
Low level functions to implement Oeprating System specific
|
|
code to manipulate I386 debug registers.
|
|
|
|
Copyright (C) 2009-2014 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef I386_NAT_H
|
|
#define I386_NAT_H 1
|
|
|
|
#include "nat/i386-dregs.h"
|
|
|
|
/* Hardware-assisted breakpoints and watchpoints. */
|
|
|
|
/* Add watchpoint methods to the provided target_ops.
|
|
Targets using i386 family debug registers for watchpoints should call
|
|
this. */
|
|
struct target_ops;
|
|
extern void i386_use_watchpoints (struct target_ops *);
|
|
|
|
/* Use this function to set i386_dr_low debug_register_length field
|
|
rather than setting it directly to check that the length is only
|
|
set once. It also enables the 'maint set/show show-debug-regs'
|
|
command. */
|
|
|
|
extern void i386_set_debug_register_length (int len);
|
|
|
|
/* Use this function to reset the i386-nat.c debug register state. */
|
|
|
|
extern void i386_cleanup_dregs (void);
|
|
|
|
/* Return a pointer to the local mirror of the debug registers of
|
|
process PID. */
|
|
|
|
extern struct i386_debug_reg_state *i386_debug_reg_state (pid_t pid);
|
|
|
|
/* Called whenever GDB is no longer debugging process PID. It deletes
|
|
data structures that keep track of debug register state. */
|
|
|
|
extern void i386_forget_process (pid_t pid);
|
|
|
|
#endif /* I386_NAT_H */
|