mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user