aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:18:35 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:03 -0700
commitd9db5b2141d86dafe7b437f521ee98beffac381d (patch)
tree260e667025e7eb7710d5ea4f06730892c7228302
parent92155eeb1460f2963cbd5bf15323469123d968b5 (diff)
downloadgdb-d9db5b2141d86dafe7b437f521ee98beffac381d.zip
gdb-d9db5b2141d86dafe7b437f521ee98beffac381d.tar.gz
gdb-d9db5b2141d86dafe7b437f521ee98beffac381d.tar.bz2
convert to_use_agent
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_use_agent. * target.h (struct target_ops) <to_use_agent>: Use TARGET_DEFAULT_NORETURN.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/target-delegates.c16
-rw-r--r--gdb/target.c5
-rw-r--r--gdb/target.h3
4 files changed, 27 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 384faad..7289c28 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -2,6 +2,14 @@
* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
+ to_use_agent.
+ * target.h (struct target_ops) <to_use_agent>: Use
+ TARGET_DEFAULT_NORETURN.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target-delegates.c: Rebuild.
+ * target.c (update_current_target): Don't inherit or default
to_traceframe_info.
(return_null): Remove.
* target.h (struct target_ops) <to_traceframe_info>: Use
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index a06a8e5..204b91e 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -985,6 +985,19 @@ tdefault_traceframe_info (struct target_ops *self)
}
static int
+delegate_use_agent (struct target_ops *self, int arg1)
+{
+ self = self->beneath;
+ return self->to_use_agent (self, arg1);
+}
+
+static int
+tdefault_use_agent (struct target_ops *self, int arg1)
+{
+ tcomplain ();
+}
+
+static int
delegate_supports_btrace (struct target_ops *self)
{
self = self->beneath;
@@ -1166,6 +1179,8 @@ install_delegators (struct target_ops *ops)
ops->to_static_tracepoint_markers_by_strid = delegate_static_tracepoint_markers_by_strid;
if (ops->to_traceframe_info == NULL)
ops->to_traceframe_info = delegate_traceframe_info;
+ if (ops->to_use_agent == NULL)
+ ops->to_use_agent = delegate_use_agent;
if (ops->to_supports_btrace == NULL)
ops->to_supports_btrace = delegate_supports_btrace;
}
@@ -1256,5 +1271,6 @@ install_dummy_methods (struct target_ops *ops)
ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at;
ops->to_static_tracepoint_markers_by_strid = tdefault_static_tracepoint_markers_by_strid;
ops->to_traceframe_info = tdefault_traceframe_info;
+ ops->to_use_agent = tdefault_use_agent;
ops->to_supports_btrace = tdefault_supports_btrace;
}
diff --git a/gdb/target.c b/gdb/target.c
index 2b4f2aa..a11cc91 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -711,7 +711,7 @@ update_current_target (void)
/* Do not inherit to_static_tracepoint_marker_at. */
/* Do not inherit to_static_tracepoint_markers_by_strid. */
/* Do not inherit to_traceframe_info. */
- INHERIT (to_use_agent, t);
+ /* Do not inherit to_use_agent. */
INHERIT (to_can_use_agent, t);
INHERIT (to_augmented_libraries_svr4_read, t);
INHERIT (to_magic, t);
@@ -754,9 +754,6 @@ update_current_target (void)
de_fault (to_can_run_breakpoint_commands,
(int (*) (struct target_ops *))
return_zero);
- de_fault (to_use_agent,
- (int (*) (struct target_ops *, int))
- tcomplain);
de_fault (to_can_use_agent,
(int (*) (struct target_ops *))
return_zero);
diff --git a/gdb/target.h b/gdb/target.h
index a8c982e..4cc20cf 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -963,7 +963,8 @@ struct target_ops
/* Ask the target to use or not to use agent according to USE. Return 1
successful, 0 otherwise. */
- int (*to_use_agent) (struct target_ops *, int use);
+ int (*to_use_agent) (struct target_ops *, int use)
+ TARGET_DEFAULT_NORETURN (tcomplain ());
/* Is the target able to use agent in current state? */
int (*to_can_use_agent) (struct target_ops *);