aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-20 10:30:13 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:40 -0700
commit86a0854a691a220419785b2008bf2fb0ddd6e46f (patch)
tree4561db932f0c9839a0dd6b960c664df577465616 /gdb/target-delegates.c
parentee97f592f2d9edf4ae720a68893af5cbaedd1be9 (diff)
downloadgdb-86a0854a691a220419785b2008bf2fb0ddd6e46f.zip
gdb-86a0854a691a220419785b2008bf2fb0ddd6e46f.tar.gz
gdb-86a0854a691a220419785b2008bf2fb0ddd6e46f.tar.bz2
convert to_disconnect
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_disconnect): Unconditionally delegate. * target.h (struct target_ops) <to_disconnect>: Use TARGET_DEFAULT_NORETURN.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 4b90a2f..1565c78 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -35,6 +35,19 @@ tdefault_detach (struct target_ops *self, const char *arg1, int arg2)
}
static void
+delegate_disconnect (struct target_ops *self, char *arg1, int arg2)
+{
+ self = self->beneath;
+ self->to_disconnect (self, arg1, arg2);
+}
+
+static void
+tdefault_disconnect (struct target_ops *self, char *arg1, int arg2)
+{
+ tcomplain ();
+}
+
+static void
delegate_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
{
self = self->beneath;
@@ -1542,6 +1555,8 @@ install_delegators (struct target_ops *ops)
ops->to_post_attach = delegate_post_attach;
if (ops->to_detach == NULL)
ops->to_detach = delegate_detach;
+ if (ops->to_disconnect == NULL)
+ ops->to_disconnect = delegate_disconnect;
if (ops->to_resume == NULL)
ops->to_resume = delegate_resume;
if (ops->to_wait == NULL)
@@ -1800,6 +1815,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_attach = find_default_attach;
ops->to_post_attach = tdefault_post_attach;
ops->to_detach = tdefault_detach;
+ ops->to_disconnect = tdefault_disconnect;
ops->to_resume = tdefault_resume;
ops->to_wait = tdefault_wait;
ops->to_fetch_registers = tdefault_fetch_registers;