aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/remote-utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdbserver/remote-utils.cc')
-rw-r--r--gdbserver/remote-utils.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index 8202365..ae1a85f 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -1099,7 +1099,6 @@ prepare_resume_reply (char *buf, ptid_t ptid, const target_waitstatus &status)
case TARGET_WAITKIND_SYSCALL_ENTRY:
case TARGET_WAITKIND_SYSCALL_RETURN:
{
- struct thread_info *saved_thread;
const char **regp;
struct regcache *regcache;
@@ -1182,7 +1181,7 @@ prepare_resume_reply (char *buf, ptid_t ptid, const target_waitstatus &status)
buf += strlen (buf);
- saved_thread = current_thread;
+ scoped_restore_current_thread restore_thread;
switch_to_thread (the_target, ptid);
@@ -1273,8 +1272,6 @@ prepare_resume_reply (char *buf, ptid_t ptid, const target_waitstatus &status)
buf += strlen (buf);
current_process ()->dlls_changed = false;
}
-
- current_thread = saved_thread;
}
break;
case TARGET_WAITKIND_EXITED: