gdbserver: introduce scoped_restore_current_thread and switch_to_thread
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 13 Dec 2021 11:22:48 +0000 (12:22 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 13 Dec 2021 11:22:48 +0000 (12:22 +0100)
commitf24791b72e764ada576901c0e866bf7768773a16
treed3e09e57eb5a5787b80d78f239fefa4ee27a6e74
parent200fd2874d2c147539f756b29e15ebbafa81dfcf
gdbserver: introduce scoped_restore_current_thread and switch_to_thread

Introduce a class for restoring the current thread and a function to
switch to the given thread.  This is a preparation for a refactoring
that aims to remove direct assignments to 'current_thread'.
gdbserver/gdbthread.h
gdbserver/inferiors.cc