aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-08-20 09:06:12 +0000
committerPavel Labath <labath@google.com>2015-08-20 09:06:12 +0000
commit0e1d729b7541cb90c7e5d6107e96347abd120c39 (patch)
tree834b2ee3104745d04828a2c653b6ab1264a5d3f9 /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
parentcfc1df553e22f44b8b14a43da02f700297e7c52d (diff)
downloadllvm-0e1d729b7541cb90c7e5d6107e96347abd120c39.zip
llvm-0e1d729b7541cb90c7e5d6107e96347abd120c39.tar.gz
llvm-0e1d729b7541cb90c7e5d6107e96347abd120c39.tar.bz2
[NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Summary: There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the thread-creation syscall resulted in loss of control over the inferior. This happened because after the inferior entered the thread-creation maintenance stop, we unconditionally performed a PTRACE_CONT, even though the original intention was to do a PTRACE_SINGLESTEP. This is fixed by storing the original state of the thread before the stop (stepping or running) and then performing the appropriate action when resuming. I also get rid of the callback in the ThreadContext structure, which stored the lambda used to resume the thread, but which was not used consistently. A test verifying the correctness of the new behavior is included. Reviewers: ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12104 llvm-svn: 245545
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index 18f0e6b..87bb02e 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -418,8 +418,6 @@ NativeThreadLinux::RequestStop ()
if (log)
log->Printf ("NativeThreadLinux::%s tgkill(%" PRIu64 ", %" PRIu64 ", SIGSTOP) failed: %s", __FUNCTION__, pid, tid, err.AsCString ());
}
- else
- m_thread_context.stop_requested = true;
return err;
}