[Lldb-commits] [PATCH] D12104: [NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 19 08:35:07 PDT 2015
tberghammer added inline comments.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:1049-1051
@@ -1047,5 +1048,5 @@
- NativeThreadProtocolSP new_thread_sp = GetThreadByID(tid);
+ NativeThreadLinuxSP new_thread_sp = std::static_pointer_cast<NativeThreadLinux>(GetThreadByID(tid));
if (new_thread_sp)
{
----------------
(nit): You don't need this cast (the value is never used).
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:1148
@@ +1147,3 @@
+ StateType previous_state = thread_sp->GetState();
+ thread_sp->SetStoppedWithNoReason();
+
----------------
You call SetStoppedWithNoReason before almost all ResumeThread but as far as I see it isn't used in ResumeThread (except checked in an assert) and ResumeThread overwrites it. I would prefer to remove these as for me they complicate the code without any reason, but I might miss their purpose.
================
Comment at: test/functionalities/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py:60
@@ +59,3 @@
+ while process.GetNumThreads() < 2:
+ if thread.GetFrameAtIndex(0).GetFunctionName() in ['__sync_fetch_and_add_4', 'pthread_mutex_lock']:
+ # This skips some functions we have trouble stepping into. Testing stepping
----------------
Please make this list architecture specific or add a comment for each function with the architecture where it imposes an issue
http://reviews.llvm.org/D12104
More information about the lldb-commits
mailing list