This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[obish] fix target.c build probs
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 08 Oct 2004 15:51:56 -0400
- Subject: [obish] fix target.c build probs
This turned up on PPC (which doesn't have h/w watchpoint support).
Committed,
Andrew
2004-10-08 Andrew Cagney <cagney@gnu.org>
* target.c (debug_target): Move to near start of file.
(target_stopped_data_address_p): Re-org logic, add casts.
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.88
diff -p -u -r1.88 target.c
--- target.c 8 Oct 2004 17:30:47 -0000 1.88
+++ target.c 8 Oct 2004 19:48:10 -0000
@@ -86,6 +86,8 @@ static int target_xfer_memory (CORE_ADDR
static void init_dummy_target (void);
+static struct target_ops debug_target;
+
static void debug_to_open (char *, int);
static void debug_to_close (int);
@@ -1015,12 +1017,14 @@ target_write_memory (CORE_ADDR memaddr,
int
target_stopped_data_address_p (struct target_ops *target)
{
- if (target->to_stopped_data_address == return_zero
- || (target->to_stopped_data_address == debug_to_stopped_data_address
- && debug_target.to_stopped_data_address == return_zero))
+ if (target->to_stopped_data_address
+ == (int (*) (struct target_ops *, CORE_ADDR *)) return_zero)
return 0;
- else
- return 1;
+ if (target->to_stopped_data_address == debug_to_stopped_data_address
+ && (debug_target.to_stopped_data_address
+ == (int (*) (struct target_ops *, CORE_ADDR *)) return_zero))
+ return 0;
+ return 1;
}
#endif
@@ -1791,9 +1795,6 @@ init_dummy_target (void)
dummy_target.to_magic = OPS_MAGIC;
}
-
-static struct target_ops debug_target;
-
static void
debug_to_open (char *args, int from_tty)
{