aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/inf-child.c2
-rw-r--r--gdb/remote.c2
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h4
5 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2ae2e41..811a100 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops) <to_can_use_agent>: Add argument.
+ (target_can_use_agent): Add argument.
+ * target.c (update_current_target): Update.
+ * remote.c (remote_can_use_agent): Add 'self' argument.
+ * inf-child.c (inf_child_can_use_agent): Add 'self' argument.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* target.h (struct target_ops) <to_use_agent>: Add argument.
(target_use_agent): Add argument.
* target.c (update_current_target): Update.
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 8c5d9e6..fd03a9f 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -384,7 +384,7 @@ inf_child_use_agent (struct target_ops *self, int use)
}
static int
-inf_child_can_use_agent (void)
+inf_child_can_use_agent (struct target_ops *self)
{
return agent_loaded_p ();
}
diff --git a/gdb/remote.c b/gdb/remote.c
index a9b5950..03fd1c0 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -11214,7 +11214,7 @@ remote_use_agent (struct target_ops *self, int use)
}
static int
-remote_can_use_agent (void)
+remote_can_use_agent (struct target_ops *self)
{
return (remote_protocol_packets[PACKET_QAgent].support != PACKET_DISABLE);
}
diff --git a/gdb/target.c b/gdb/target.c
index deb5425..0a52b9e 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -944,7 +944,7 @@ update_current_target (void)
(int (*) (struct target_ops *, int))
tcomplain);
de_fault (to_can_use_agent,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_augmented_libraries_svr4_read,
(int (*) (void))
diff --git a/gdb/target.h b/gdb/target.h
index c63d932..512a930 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -895,7 +895,7 @@ struct target_ops
int (*to_use_agent) (struct target_ops *, int use);
/* Is the target able to use agent in current state? */
- int (*to_can_use_agent) (void);
+ int (*to_can_use_agent) (struct target_ops *);
/* Check whether the target supports branch tracing. */
int (*to_supports_btrace) (struct target_ops *)
@@ -1882,7 +1882,7 @@ extern char *target_fileio_read_stralloc (const char *filename);
(*current_target.to_use_agent) (&current_target, use)
#define target_can_use_agent() \
- (*current_target.to_can_use_agent) ()
+ (*current_target.to_can_use_agent) (&current_target)
#define target_augmented_libraries_svr4_read() \
(*current_target.to_augmented_libraries_svr4_read) ()