diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-20 10:30:13 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:48:40 -0700 |
commit | 86a0854a691a220419785b2008bf2fb0ddd6e46f (patch) | |
tree | 4561db932f0c9839a0dd6b960c664df577465616 /gdb/target.c | |
parent | ee97f592f2d9edf4ae720a68893af5cbaedd1be9 (diff) | |
download | gdb-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.c')
-rw-r--r-- | gdb/target.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gdb/target.c b/gdb/target.c index ef7374e..bf93220 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2470,24 +2470,15 @@ target_detach (const char *args, int from_tty) void target_disconnect (char *args, int from_tty) { - struct target_ops *t; - /* If we're in breakpoints-always-inserted mode or if breakpoints are global across processes, we have to remove them before disconnecting. */ remove_breakpoints (); - for (t = current_target.beneath; t != NULL; t = t->beneath) - if (t->to_disconnect != NULL) - { - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", - args, from_tty); - t->to_disconnect (t, args, from_tty); - return; - } - - tcomplain (); + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", + args, from_tty); + current_target.to_disconnect (¤t_target, args, from_tty); } ptid_t |