gdb/continuations: turn continuation functions into inferior methods
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Thu, 22 Apr 2021 15:22:39 +0000 (17:22 +0200)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Thu, 22 Apr 2021 15:22:39 +0000 (17:22 +0200)
commit4efeb0d3e8ee210cd61b15355cca39b16b66004d
tree4c74b54f1e733a7a222d618091b06c6fca18237d
parentc4c493de2bbfc7414d0ec51f40f17cd7b1ff74f2
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.
gdb/ChangeLog
gdb/Makefile.in
gdb/continuations.c [deleted file]
gdb/continuations.h [deleted file]
gdb/event-top.c
gdb/inf-loop.c
gdb/infcmd.c
gdb/inferior.c
gdb/inferior.h