This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH for Re: mips-elf build fails
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: David Carlton <carlton at math dot stanford dot edu>
- Cc: gdb-patches <gdb-patches at sources dot redhat dot com>,Marko Mlinar <markom at opencores dot org>
- Date: Mon, 14 Oct 2002 16:47:59 -0400
- Subject: PATCH for Re: mips-elf build fails
- References: <ro1it04hpeb.fsf@jackfruit.Stanford.EDU> <20021014181651.GA12139@nevyn.them.org> <ro165w4ho9p.fsf@jackfruit.Stanford.EDU>
On Mon, Oct 14, 2002 at 11:24:34AM -0700, David Carlton wrote:
> On Mon, 14 Oct 2002 14:16:51 -0400, Daniel Jacobowitz <drow@mvista.com> said:
> > On Mon, Oct 14, 2002 at 11:00:12AM -0700, David Carlton wrote:
>
> >> My all-targets build over the weekend failed on mips-elf. I'm
> >> including the error messages below.
>
> >> This isn't on clean CVS sources, but I haven't modified infrun.c or
> >> anything mips-elf specific on the sources that I'm using for this
> >> build. All the other targets work.
>
> > That's STOPPED_BY_WATCHPOINT. The definition hasn't changed in
> > months....
>
> Well, to be specific, the line is
>
> if (HAVE_NONSTEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
>
> So it seems reasonable to assume that it's some sort of interation
> between mips-elf and these patches:
>
> 2002-10-10 Marko Mlinar <markom@opencores.org>
>
> * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C,
> accidentially not commited 2002-10-09
> * gdbarch.h, gdbarch.c: Re-generate.
>
> 2002-10-09 Marko Mlinar <markom@opencores.org>
>
> * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C.
> * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Add.
> * gdbarch.h, gdbarch.c: Re-generate.
>
> In other words, I think it's HAVE_NONSTEPPABLE_WATCHPOINT rather than
> STOPPED_BY_WATCHPOINT that's the problem.
You're right.
Marko, when you do something like this it is vital that you check
existing definitions of the macro. It's defined to an empty string in
a number of header files, which is fine for #ifdef. I've check this in
to fix the build failures.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-10-14 Daniel Jacobowitz <drow@mvista.com>
* config/mips/nm-irix4.h (HAVE_NONSTEPPABLE_WATCHPOINT): Define to 1.
* config/mips/nm-irix5.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
* config/mips/tm-embed.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
* config/pa/nm-hppah.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
Index: config/mips/nm-irix4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/nm-irix4.h,v
retrieving revision 1.4
diff -u -p -r1.4 nm-irix4.h
--- config/mips/nm-irix4.h 4 May 2001 04:15:31 -0000 1.4
+++ config/mips/nm-irix4.h 14 Oct 2002 20:42:48 -0000
@@ -54,7 +54,7 @@
procfs_stopped_by_watchpoint(inferior_ptid)
extern int procfs_stopped_by_watchpoint (ptid_t);
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
Index: config/mips/nm-irix5.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/nm-irix5.h,v
retrieving revision 1.6
diff -u -p -r1.6 nm-irix5.h
--- config/mips/nm-irix5.h 13 Aug 2002 18:03:38 -0000 1.6
+++ config/mips/nm-irix5.h 14 Oct 2002 20:42:48 -0000
@@ -36,7 +36,7 @@
procfs_stopped_by_watchpoint(inferior_ptid)
extern int procfs_stopped_by_watchpoint (ptid_t);
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
Index: config/mips/tm-embed.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-embed.h,v
retrieving revision 1.5
diff -u -p -r1.5 tm-embed.h
--- config/mips/tm-embed.h 21 Aug 2002 22:39:26 -0000 1.5
+++ config/mips/tm-embed.h 14 Oct 2002 20:42:48 -0000
@@ -36,7 +36,7 @@ int remote_mips_remove_watchpoint (CORE_
/* We need to remove watchpoints when stepping, else we hit them again! */
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
int remote_mips_stopped_by_watchpoint (void);
#define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint ()
Index: config/pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.4
diff -u -p -r1.4 nm-hppah.h
--- config/pa/nm-hppah.h 4 May 2001 04:15:32 -0000 1.4
+++ config/pa/nm-hppah.h 14 Oct 2002 20:42:49 -0000
@@ -196,7 +196,7 @@ extern int hppa_require_detach (int, int
by removing all eventpoints; stepping past the instruction that caused
the trigger; reinserting eventpoints; and checking whether any watched
location changed. */
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
/* Our implementation of "hardware" watchpoints uses memory page-protection
faults. However, HP-UX has unfortunate interactions between these and