aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/netbsd-low.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2021-12-13 12:22:48 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2021-12-13 12:22:48 +0100
commit24583e45efc823c1a9ea009dfddc36f9b74dcbcd (patch)
treeac00cde441192c880eee0f36a7e4346e0ba53c58 /gdbserver/netbsd-low.cc
parentf24791b72e764ada576901c0e866bf7768773a16 (diff)
downloadbinutils-24583e45efc823c1a9ea009dfddc36f9b74dcbcd.zip
binutils-24583e45efc823c1a9ea009dfddc36f9b74dcbcd.tar.gz
binutils-24583e45efc823c1a9ea009dfddc36f9b74dcbcd.tar.bz2
gdbserver: replace direct assignments to current_thread
Replace the direct assignments to current_thread with switch_to_thread. Use scoped_restore_current_thread when appropriate. There is one instance remaining in linux-low.cc's wait_for_sigstop. This will be handled in a separate patch. Regression-tested on X86-64 Linux using the native-gdbserver and native-extended-gdbserver board files.
Diffstat (limited to 'gdbserver/netbsd-low.cc')
-rw-r--r--gdbserver/netbsd-low.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdbserver/netbsd-low.cc b/gdbserver/netbsd-low.cc
index ada92c1..3c9dadd 100644
--- a/gdbserver/netbsd-low.cc
+++ b/gdbserver/netbsd-low.cc
@@ -310,7 +310,7 @@ netbsd_wait (ptid_t ptid, struct target_waitstatus *ourstatus,
}
if (find_thread_ptid (ptid_t (pid)))
- current_thread = find_thread_ptid (wptid);
+ switch_to_thread (find_thread_ptid (wptid));
if (code == TRAP_LWP && pst.pe_report_event == PTRACE_LWP_CREATE)
{