This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] Eliminate TARGET_HAS_HARDWARE_WATCHPOINTS
Date: Sun, 12 Sep 2004 12:31:23 -0400
From: Andrew Cagney <cagney@gnu.org>
Cc: Daniel Jacobowitz <drow@false.org>, gdb-patches@sources.redhat.com
> I'm not sure the mere presence of DR_* automatically means that
> hardware watchpoints are supported at run time. I'd prefer to hear
> that from Mark or someone else who could tell for sure.
>
> In any case, if the above is true, then there should be no problem to
> write an Autoconf test that would replace
> TARGET_HAS_HARDWARE_WATCHPOINTS. As soon as that is posted here, I
> will withdraw all my objections to removing the old macro in favor of
> the new mechanism.
This assumes that we've access to machines to test it on, and the code
being modified is even being used / worth retaining. Resolving both of
those takes this from a no-problem task to something best handled
separatly, and something that should not block this current patch.
I've committed this part of my change:
- core GDB no longer refers to TARGET_HAS_HARDWARE_WATCHPOINTS
At one stage target.h had definitions dependant on this macro, but no more. This patch removes the no-longer-needed defintion from configurations, such as GNU/Linux.
w.r.t.,
Sorry, the person who wants to submit a patch for inclusion should do
the necessary reasearch required to verify that the patch is doing
TRT.
That was done. To have anyone do more is a waste of effort.
Anyway, this is all have been beaten to death in this thread, we are
just reiterating the same issues again and again.
Andrew
2004-09-13 Andrew Cagney <cagney@gnu.org>
* config/i386/nm-i386.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
* config/s390/nm-linux.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
* config/pa/nm-hppah.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
* config/ia64/nm-linux.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
* config/frv/tm-frv.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
* mips-tdep.c (mips_dump_tdep): Do not print same.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.322
diff -p -u -r1.322 mips-tdep.c
--- mips-tdep.c 5 Sep 2004 20:15:40 -0000 1.322
+++ mips-tdep.c 13 Sep 2004 14:04:29 -0000
@@ -6604,9 +6604,6 @@ mips_dump_tdep (struct gdbarch *current_
"mips_dump_tdep: TARGET_CAN_USE_HARDWARE_WATCHPOINT # %s\n",
XSTRING (TARGET_CAN_USE_HARDWARE_WATCHPOINT
(TYPE, CNT, OTHERTYPE)));
- fprintf_unfiltered (file,
- "mips_dump_tdep: TARGET_HAS_HARDWARE_WATCHPOINTS # %s\n",
- XSTRING (TARGET_HAS_HARDWARE_WATCHPOINTS));
#ifdef TRACE_CLEAR
fprintf_unfiltered (file,
"mips_dump_tdep: TRACE_CLEAR # %s\n",
Index: config/frv/tm-frv.h
===================================================================
RCS file: /cvs/src/src/gdb/config/frv/tm-frv.h,v
retrieving revision 1.5
diff -p -u -r1.5 tm-frv.h
--- config/frv/tm-frv.h 1 Aug 2004 14:37:01 -0000 1.5
+++ config/frv/tm-frv.h 13 Sep 2004 14:04:29 -0000
@@ -20,8 +20,6 @@
/* This target uses an architecture vector for most architecture methods. */
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
frv_check_watch_resources (type, cnt, ot)
extern int frv_check_watch_resources (int type, int cnt, int ot);
Index: config/i386/nm-i386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-i386.h,v
retrieving revision 1.5
diff -p -u -r1.5 nm-i386.h
--- config/i386/nm-i386.h 17 Jan 2004 21:56:12 -0000 1.5
+++ config/i386/nm-i386.h 13 Sep 2004 14:04:29 -0000
@@ -26,10 +26,6 @@
/* Targets should define this to use the generic x86 watchpoint support. */
#ifdef I386_USE_GENERIC_WATCHPOINTS
-#ifndef TARGET_HAS_HARDWARE_WATCHPOINTS
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-#endif
-
/* Clear the reference counts and forget everything we knew about DRi. */
extern void i386_cleanup_dregs (void);
Index: config/ia64/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ia64/nm-linux.h,v
retrieving revision 1.14
diff -p -u -r1.14 nm-linux.h
--- config/ia64/nm-linux.h 22 Aug 2004 16:32:35 -0000 1.14
+++ config/ia64/nm-linux.h 13 Sep 2004 14:04:29 -0000
@@ -45,8 +45,6 @@ extern int ia64_cannot_store_register (i
/* Hardware watchpoints */
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
/* The IA-64 architecture can step over a watch point (without triggering
Index: config/pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.21
diff -p -u -r1.21 nm-hppah.h
--- config/pa/nm-hppah.h 11 Aug 2004 21:51:28 -0000 1.21
+++ config/pa/nm-hppah.h 13 Sep 2004 14:04:29 -0000
@@ -98,8 +98,6 @@ extern int hppa_require_detach (int, int
10.20 will at least link. However, the "can I use a fast watchpoint?"
query will always return "No" for 10.20. */
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
/* The PA can watch any number of locations (generic routines already check
that all intermediates are in watchable memory locations). */
extern int hppa_can_use_hw_watchpoint (int type, int cnt, int ot);
Index: config/s390/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/s390/nm-linux.h,v
retrieving revision 1.10
diff -p -u -r1.10 nm-linux.h
--- config/s390/nm-linux.h 18 Feb 2004 20:09:48 -0000 1.10
+++ config/s390/nm-linux.h 13 Sep 2004 14:04:29 -0000
@@ -45,7 +45,6 @@ extern int s390_stopped_by_watchpoint (v
extern int s390_insert_watchpoint (CORE_ADDR addr, int len);
extern int s390_remove_watchpoint (CORE_ADDR addr, int len);
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr, len) 1
#define HAVE_CONTINUABLE_WATCHPOINT 1