diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2021-12-13 12:22:48 +0100 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2021-12-13 12:22:48 +0100 |
commit | 24583e45efc823c1a9ea009dfddc36f9b74dcbcd (patch) | |
tree | ac00cde441192c880eee0f36a7e4346e0ba53c58 /gdbserver/win32-low.cc | |
parent | f24791b72e764ada576901c0e866bf7768773a16 (diff) | |
download | binutils-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/win32-low.cc')
-rw-r--r-- | gdbserver/win32-low.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index cc981d3..6f6fcef 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -1102,7 +1102,7 @@ get_child_debug_event (DWORD *continue_status, *ourstatus = stop->status; current_event = stop->event; ptid = debug_event_ptid (¤t_event); - current_thread = find_thread_ptid (ptid); + switch_to_thread (find_thread_ptid (ptid)); return 1; } @@ -1152,7 +1152,7 @@ get_child_debug_event (DWORD *continue_status, child_delete_thread (current_event.dwProcessId, current_event.dwThreadId); - current_thread = get_first_thread (); + switch_to_thread (get_first_thread ()); return 1; case CREATE_PROCESS_DEBUG_EVENT: @@ -1264,7 +1264,7 @@ get_child_debug_event (DWORD *continue_status, ourstatus->set_spurious (); } else - current_thread = find_thread_ptid (ptid); + switch_to_thread (find_thread_ptid (ptid)); return 1; } |