diff options
author | Pierre Muller <muller@sourceware.org> | 2009-05-14 09:37:00 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2009-05-14 09:37:00 +0000 |
commit | 9bb9e8ade770027f5cced2856574e2d317b15254 (patch) | |
tree | f003486763df1c1d30ac87826befffa182dad837 /gdb/config | |
parent | 7a893eb8c1c037df38184beb7d993222a68d7c3d (diff) | |
download | gdb-9bb9e8ade770027f5cced2856574e2d317b15254.zip gdb-9bb9e8ade770027f5cced2856574e2d317b15254.tar.gz gdb-9bb9e8ade770027f5cced2856574e2d317b15254.tar.bz2 |
Remove all i386 debug register low level macros in config nm files.
(I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
(I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
(I386_USE_GENERIC_WATCHPOIINTS): Remove.
* i386-nat.h: New file (adapted from config/i386/nm-i386.h).
(struct i386_dr_low_type): New type.
(i386_dr_low): New global variable.
* i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
(i386_insert_aligned_watchpoint): Replace i386 dr low macros by
i386_dr_low struct variable fields.
(i386_remove_aligned_watchpoint): Likewise.
(i386_stopped_data_address): Likewise.
(i386_stopped_by_hwbp): Likewise.
(show_debug_regs_command_added): New static variable.
(add_show_debug_regs_command): New static function.
(i386_use_watchpoints): Call add_show_debug_regs_command if not done.
(i386_set_debug_register_length): New function.
(_initialize_i386_nat): Delete.
* amd64-linux-nat.c: Include "i386-nat.h".
(amd64_linux_dr_set_control): Change to static.
(amd64_linux_dr_get_status): Change to static.
(amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
(_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
* go32-nat.c: Include "i386-nat.h".
(go32_set_addr): Change to static.
(go32_set_dr7): Change to static. Change arg type to unisgned long.
(go32_get_dr6): Change to static. Change return type to unisnged long.
(init_go32_ops): Set i386_dr_low variable fields.
* i386-linux-nat.c: Include "i386-nat.h".
(i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
(i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
(_initialize_i386_linux_nat): Set i386_dr_low variable fields.
* i386bsd-nat.h: Declare functions used for
i386_dr_low fields in i386fbsd-nat.c.
* i386fbsd-nat.c: Include "i386-nat.h".
(_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
* windows-nat.c: Include "i386-nat.h".
(cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
Change to static.
(cygwin_get_dr6): Change return type to unisnged long.
(cygwin_set_dr7): Change arg type to unisgned long.
(init_windows_ops): Set i386_dr_low function fields.
* amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
i386_set_debug_register_length.
* i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
* config/i386/nm-cygwin.h: Remove all I386_* macros.
* config/i386/nm-cygwin64.h: Likewise.
* config/i386/nm-fbsd.h: Likewise.
* config/i386/nm-linux.h: Likewise.
* config/i386/nm-i386.h: Remove completely.
* config/i386/nm-go32.h: Remove completely.
* config/i386/nm-linux64.h: Remove completely.
* config/i386/go32.mh (NAT_FILE): Remove entry.
* config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/i386/go32.mh | 1 | ||||
-rw-r--r-- | gdb/config/i386/linux64.mh | 2 | ||||
-rw-r--r-- | gdb/config/i386/nm-cygwin.h | 17 | ||||
-rw-r--r-- | gdb/config/i386/nm-cygwin64.h | 17 | ||||
-rw-r--r-- | gdb/config/i386/nm-fbsd.h | 25 | ||||
-rw-r--r-- | gdb/config/i386/nm-go32.h | 35 | ||||
-rw-r--r-- | gdb/config/i386/nm-i386.h | 72 | ||||
-rw-r--r-- | gdb/config/i386/nm-linux.h | 23 | ||||
-rw-r--r-- | gdb/config/i386/nm-linux64.h | 53 |
9 files changed, 1 insertions, 244 deletions
diff --git a/gdb/config/i386/go32.mh b/gdb/config/i386/go32.mh index 73dc70e..9cebf01 100644 --- a/gdb/config/i386/go32.mh +++ b/gdb/config/i386/go32.mh @@ -3,7 +3,6 @@ # We include several header files from config/djgpp MH_CFLAGS= -I$(srcdir)/config/djgpp -NAT_FILE= nm-go32.h NATDEPFILES= go32-nat.o i386-nat.o HOST_IPC= diff --git a/gdb/config/i386/linux64.mh b/gdb/config/i386/linux64.mh index 1c03d71..e2001ce 100644 --- a/gdb/config/i386/linux64.mh +++ b/gdb/config/i386/linux64.mh @@ -2,7 +2,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \ proc-service.o linux-thread-db.o gcore.o linux-fork.o -NAT_FILE= nm-linux64.h +NAT_FILE= config/nm-linux.h # The dynamically loaded libthread_db needs access to symbols in the # gdb executable. diff --git a/gdb/config/i386/nm-cygwin.h b/gdb/config/i386/nm-cygwin.h index 9daa74d..24aa749 100644 --- a/gdb/config/i386/nm-cygwin.h +++ b/gdb/config/i386/nm-cygwin.h @@ -18,20 +18,3 @@ #define ADD_SHARED_SYMBOL_FILES dll_symbol_command void dll_symbol_command (char *, int); - -#define I386_USE_GENERIC_WATCHPOINTS - -#include "i386/nm-i386.h" - -/* Support for hardware-assisted breakpoints and watchpoints. */ - -#define I386_DR_LOW_SET_CONTROL(VAL) cygwin_set_dr7 (VAL) -extern void cygwin_set_dr7 (unsigned); - -#define I386_DR_LOW_SET_ADDR(N,ADDR) cygwin_set_dr (N,ADDR) -extern void cygwin_set_dr (int, CORE_ADDR); - -#define I386_DR_LOW_RESET_ADDR(N) - -#define I386_DR_LOW_GET_STATUS() cygwin_get_dr6 () -extern unsigned cygwin_get_dr6 (void); diff --git a/gdb/config/i386/nm-cygwin64.h b/gdb/config/i386/nm-cygwin64.h index 71b2682..345423f 100644 --- a/gdb/config/i386/nm-cygwin64.h +++ b/gdb/config/i386/nm-cygwin64.h @@ -17,20 +17,3 @@ #define ADD_SHARED_SYMBOL_FILES dll_symbol_command void dll_symbol_command (char *, int); - -#define I386_USE_GENERIC_WATCHPOINTS - -#include "i386/nm-i386.h" - -/* Support for hardware-assisted breakpoints and watchpoints. */ - -#define I386_DR_LOW_SET_CONTROL(VAL) cygwin_set_dr7 (VAL) -extern void cygwin_set_dr7 (unsigned); - -#define I386_DR_LOW_SET_ADDR(N,ADDR) cygwin_set_dr (N,ADDR) -extern void cygwin_set_dr (int, CORE_ADDR); - -#define I386_DR_LOW_RESET_ADDR(N) - -#define I386_DR_LOW_GET_STATUS() cygwin_get_dr6 () -extern unsigned cygwin_get_dr6 (void); diff --git a/gdb/config/i386/nm-fbsd.h b/gdb/config/i386/nm-fbsd.h index 77875da..adfd6d1 100644 --- a/gdb/config/i386/nm-fbsd.h +++ b/gdb/config/i386/nm-fbsd.h @@ -21,33 +21,8 @@ #ifndef NM_FBSD_H #define NM_FBSD_H -#ifdef HAVE_PT_GETDBREGS -#define I386_USE_GENERIC_WATCHPOINTS -#endif - -#include "i386/nm-i386.h" - #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif -/* Provide access to the i386 hardware debugging registers. */ - -#define I386_DR_LOW_SET_CONTROL(control) \ - i386bsd_dr_set_control (control) -extern void i386bsd_dr_set_control (unsigned long control); - -#define I386_DR_LOW_SET_ADDR(regnum, addr) \ - i386bsd_dr_set_addr (regnum, addr) -extern void i386bsd_dr_set_addr (int regnum, CORE_ADDR addr); - -#define I386_DR_LOW_RESET_ADDR(regnum) \ - i386bsd_dr_reset_addr (regnum) -extern void i386bsd_dr_reset_addr (int regnum); - -#define I386_DR_LOW_GET_STATUS() \ - i386bsd_dr_get_status () -extern unsigned long i386bsd_dr_get_status (void); - - #endif /* nm-fbsd.h */ diff --git a/gdb/config/i386/nm-go32.h b/gdb/config/i386/nm-go32.h deleted file mode 100644 index 3a6fd1b..0000000 --- a/gdb/config/i386/nm-go32.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Native definitions for Intel x86 running DJGPP. - Copyright 1997, 1998, 1999, 2001, 2002, 2007, 2008, 2009 - 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/>. */ - -#define I386_USE_GENERIC_WATCHPOINTS - -#include "i386/nm-i386.h" - -/* Support for hardware-assisted breakpoints and watchpoints. */ - -#define I386_DR_LOW_SET_CONTROL(VAL) go32_set_dr7 (VAL) -extern void go32_set_dr7 (unsigned); - -#define I386_DR_LOW_SET_ADDR(N,ADDR) go32_set_dr (N,ADDR) -extern void go32_set_dr (int, CORE_ADDR); - -#define I386_DR_LOW_RESET_ADDR(N) - -#define I386_DR_LOW_GET_STATUS() go32_get_dr6 () -extern unsigned go32_get_dr6 (void); diff --git a/gdb/config/i386/nm-i386.h b/gdb/config/i386/nm-i386.h deleted file mode 100644 index aafa188..0000000 --- a/gdb/config/i386/nm-i386.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Native macro definitions for GDB on an Intel i[3456]86. - Copyright 2001, 2004, 2007, 2008, 2009 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 NM_I386_H -#define NM_I386_H 1 - -/* Hardware-assisted breakpoints and watchpoints. */ - -/* Targets should define this to use the generic x86 watchpoint support. */ -#ifdef I386_USE_GENERIC_WATCHPOINTS - -/* Add watchpoint methods to the provided target_ops. - Targets which define I386_USE_GENERIC_WATCHPOINTS must - call this function. */ -struct target_ops; -void i386_use_watchpoints (struct target_ops *); - -/* Clear the reference counts and forget everything we knew about DRi. */ -extern void i386_cleanup_dregs (void); - -/* Insert a watchpoint to watch a memory region which starts at - address ADDR and whose length is LEN bytes. Watch memory accesses - of the type TYPE. Return 0 on success, -1 on failure. */ -extern int i386_insert_watchpoint (CORE_ADDR addr, int len, int type); - -/* Remove a watchpoint that watched the memory region which starts at - address ADDR, whose length is LEN bytes, and for accesses of the - type TYPE. Return 0 on success, -1 on failure. */ -extern int i386_remove_watchpoint (CORE_ADDR addr, int len, int type); - -/* Return non-zero if we can watch a memory region that starts at - address ADDR and whose length is LEN bytes. */ -extern int i386_region_ok_for_watchpoint (CORE_ADDR addr, int len); - -/* Return non-zero if the inferior has some break/watchpoint that - triggered. */ -extern int i386_stopped_by_hwbp (void); - -/* If the inferior has some break/watchpoint that triggered, set - the address associated with that break/watchpoint and return - true. Otherwise, return false. */ -extern int i386_stopped_data_address (struct target_ops *, CORE_ADDR *); - -/* Insert a hardware-assisted breakpoint at BP_TGT->placed_address. - Return 0 on success, EBUSY on failure. */ -struct bp_target_info; -extern int i386_insert_hw_breakpoint (struct bp_target_info *bp_tgt); - -/* Remove a hardware-assisted breakpoint at BP_TGT->placed_address. - Return 0 on success, -1 on failure. */ -extern int i386_remove_hw_breakpoint (struct bp_target_info *bp_tgt); - -extern int i386_stopped_by_watchpoint (void); - -#endif /* I386_USE_GENERIC_WATCHPOINTS */ - -#endif /* NM_I386_H */ diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h index 7fcbfc7..589a9f2 100644 --- a/gdb/config/i386/nm-linux.h +++ b/gdb/config/i386/nm-linux.h @@ -22,31 +22,8 @@ #ifndef NM_LINUX_H #define NM_LINUX_H -/* GNU/Linux supports the i386 hardware debugging registers. */ -#define I386_USE_GENERIC_WATCHPOINTS - -#include "i386/nm-i386.h" #include "config/nm-linux.h" -/* Provide access to the i386 hardware debugging registers. */ - -extern void i386_linux_dr_set_control (unsigned long control); -#define I386_DR_LOW_SET_CONTROL(control) \ - i386_linux_dr_set_control (control) - -extern void i386_linux_dr_set_addr (int regnum, CORE_ADDR addr); -#define I386_DR_LOW_SET_ADDR(regnum, addr) \ - i386_linux_dr_set_addr (regnum, addr) - -extern void i386_linux_dr_reset_addr (int regnum); -#define I386_DR_LOW_RESET_ADDR(regnum) \ - i386_linux_dr_reset_addr (regnum) - -extern unsigned long i386_linux_dr_get_status (void); -#define I386_DR_LOW_GET_STATUS() \ - i386_linux_dr_get_status () - - #ifdef HAVE_PTRACE_GETFPXREGS /* Include register set support for the SSE registers. */ #define FILL_FPXREGSET diff --git a/gdb/config/i386/nm-linux64.h b/gdb/config/i386/nm-linux64.h deleted file mode 100644 index cb91661..0000000 --- a/gdb/config/i386/nm-linux64.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Native support for GNU/Linux x86-64. - - Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 - Free Software Foundation, Inc. - - Contributed by Jiri Smid, SuSE Labs. - - 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 NM_LINUX64_H -#define NM_LINUX64_H - -/* GNU/Linux supports the i386 hardware debugging registers. */ -#define I386_USE_GENERIC_WATCHPOINTS - -#include "i386/nm-i386.h" -#include "config/nm-linux.h" - -/* Support for 8-byte wide hardware watchpoints. */ -#define TARGET_HAS_DR_LEN_8 1 - -/* Provide access to the i386 hardware debugging registers. */ - -extern void amd64_linux_dr_set_control (unsigned long control); -#define I386_DR_LOW_SET_CONTROL(control) \ - amd64_linux_dr_set_control (control) - -extern void amd64_linux_dr_set_addr (int regnum, CORE_ADDR addr); -#define I386_DR_LOW_SET_ADDR(regnum, addr) \ - amd64_linux_dr_set_addr (regnum, addr) - -extern void amd64_linux_dr_reset_addr (int regnum); -#define I386_DR_LOW_RESET_ADDR(regnum) \ - amd64_linux_dr_reset_addr (regnum) - -extern unsigned long amd64_linux_dr_get_status (void); -#define I386_DR_LOW_GET_STATUS() \ - amd64_linux_dr_get_status () - -#endif /* nm-linux64.h */ |