diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2021-04-22 17:22:39 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2021-04-22 17:22:39 +0200 |
commit | 4efeb0d3e8ee210cd61b15355cca39b16b66004d (patch) | |
tree | 4c74b54f1e733a7a222d618091b06c6fca18237d /gdb/infcmd.c | |
parent | c4c493de2bbfc7414d0ec51f40f17cd7b1ff74f2 (diff) | |
download | binutils-4efeb0d3e8ee210cd61b15355cca39b16b66004d.zip binutils-4efeb0d3e8ee210cd61b15355cca39b16b66004d.tar.gz binutils-4efeb0d3e8ee210cd61b15355cca39b16b66004d.tar.bz2 |
gdb/continuations: turn continuation functions into inferior methods
Turn continuations-related functions into methods of the inferior
class. This is a refactoring.
gdb/ChangeLog:
2021-04-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* Makefile.in (COMMON_SFILES): Remove continuations.c.
* inferior.c (inferior::add_continuation): New method, adapted
from 'add_inferior_continuation'.
(inferior::do_all_continuations): New method, adapted from
'do_all_inferior_continuations'.
(inferior::~inferior): Clear the list of continuations directly.
* inferior.h (class inferior) <continuations>: Rename into...
<m_continuations>: ...this and make private.
* continuations.c: Remove.
* continuations.h: Remove.
* event-top.c: Don't include "continuations.h".
Update the users below.
* inf-loop.c (inferior_event_handler)
* infcmd.c (attach_command)
(notice_new_inferior): Update.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e06db49..5aa6b00 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -47,7 +47,6 @@ #include "inline-frame.h" #include "tracepoint.h" #include "inf-loop.h" -#include "continuations.h" #include "linespec.h" #include "thread-fsm.h" #include "top.h" @@ -2645,7 +2644,7 @@ attach_command (const char *args, int from_tty) inferior->control.stop_soon = STOP_QUIETLY_NO_SIGSTOP; /* Wait for stop. */ - add_inferior_continuation ([=] () + inferior->add_continuation ([=] () { attach_post_wait (from_tty, mode); }); @@ -2702,7 +2701,7 @@ notice_new_inferior (thread_info *thr, int leave_running, int from_tty) inferior->control.stop_soon = STOP_QUIETLY_REMOTE; /* Wait for stop before proceeding. */ - add_inferior_continuation ([=] () + inferior->add_continuation ([=] () { attach_post_wait (from_tty, mode); }); |