aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-10-08 19:51:16 +0000
committerAndrew Cagney <cagney@redhat.com>2004-10-08 19:51:16 +0000
commitaa8698122b7460cede3dc17abe499fd77ef10883 (patch)
treec9b20239fe0820feaa34754f931e993d13b5dc0d
parent8dcef9cfffab8d0777bd75f549ef26222b467655 (diff)
downloadgdb-aa8698122b7460cede3dc17abe499fd77ef10883.zip
gdb-aa8698122b7460cede3dc17abe499fd77ef10883.tar.gz
gdb-aa8698122b7460cede3dc17abe499fd77ef10883.tar.bz2
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/target.c17
2 files changed, 14 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bef6e17..d6dcc91 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2004-10-02 Mark Kettenis <kettenis@gnu.org>
* solib-sunos.c [HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS] (link_map)
diff --git a/gdb/target.c b/gdb/target.c
index ce51f3d..2f27bfa 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -86,6 +86,8 @@ static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
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, char *myaddr, int len)
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)
{