[Lldb-commits] [PATCH] D12104: [NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 18 07:56:25 PDT 2015
labath created this revision.
labath added reviewers: ovyalov, tberghammer.
labath added a subscriber: lldb-commits.
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.
http://reviews.llvm.org/D12104
Files:
source/Plugins/Process/Linux/NativeProcessLinux.cpp
source/Plugins/Process/Linux/NativeProcessLinux.h
source/Plugins/Process/Linux/NativeThreadLinux.cpp
source/Plugins/Process/Linux/NativeThreadLinux.h
test/functionalities/thread/create_during_instruction_step/Makefile
test/functionalities/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
test/functionalities/thread/create_during_instruction_step/main.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12104.32415.patch
Type: text/x-patch
Size: 32408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150818/6d648b03/attachment-0001.bin>
More information about the lldb-commits
mailing list