[Lldb-commits] [PATCH] D85265: Add a setting to always run all threads when stepping

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 4 18:16:02 PDT 2020


jingham created this revision.
jingham added a reviewer: friss.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
jingham requested review of this revision.
Herald added a subscriber: JDevlieghere.

There are some platforms (the xnu kernel being one) where trying to run just one thread can cause problems, and you need to always run all threads whenever you do more than a single step-i.

This patch adds a target.process.run-all-threads setting which overrides the default "run-mode" value for all the stepping commands.

I also needed to come up with a way to test this.  The easiest way to do that was to use a scripted thread plan so that I could check the incoming value.  But to do that I needed to plumb the stop others through the scripted-step & the ThreadPlanPython, which this patch also does.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85265

Files:
  lldb/bindings/interface/SBThreadPlan.i
  lldb/include/lldb/API/SBThreadPlan.h
  lldb/include/lldb/Target/Process.h
  lldb/include/lldb/Target/ThreadPlanPython.h
  lldb/source/API/SBThreadPlan.cpp
  lldb/source/Commands/CommandObjectThread.cpp
  lldb/source/Target/Process.cpp
  lldb/source/Target/TargetProperties.td
  lldb/source/Target/Thread.cpp
  lldb/source/Target/ThreadPlanPython.cpp
  lldb/test/API/functionalities/step_scripted/Steps.py
  lldb/test/API/functionalities/step_scripted/TestStepScripted.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85265.283087.patch
Type: text/x-patch
Size: 12394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200805/d98b18a8/attachment.bin>


More information about the lldb-commits mailing list