Skip to content

Commit 9eb07c4

Browse files
author
git apple-llvm automerger
committed
Merge commit '14c8403e2215' from swift/release/6.1 into stable/20240723
2 parents 5c038e0 + 14c8403 commit 9eb07c4

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -780,13 +780,8 @@ StopInfoSP StopInfoMachException::CreateStopReasonWithMachException(
780780
// but if it is for another thread, we can just report no reason. We
781781
// don't need to worry about stepping over the breakpoint here, that
782782
// will be taken care of when the thread resumes and notices that
783-
// there's a breakpoint under the pc. If we have an operating system
784-
// plug-in, we might have set a thread specific breakpoint using the
785-
// operating system thread ID, so we can't make any assumptions about
786-
// the thread ID so we must always report the breakpoint regardless
787-
// of the thread.
788-
if (bp_site_sp->ValidForThisThread(thread) ||
789-
thread.GetProcess()->GetOperatingSystem() != nullptr)
783+
// there's a breakpoint under the pc.
784+
if (bp_site_sp->ValidForThisThread(thread))
790785
return StopInfo::CreateStopReasonWithBreakpointSiteID(
791786
thread, bp_site_sp->GetID());
792787
else if (is_trace_if_actual_breakpoint_missing)

lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,12 @@ def run_python_os_step(self):
219219
6,
220220
"Make sure we stepped from line 5 to line 6 in main.c",
221221
)
222+
223+
thread_bp_number = lldbutil.run_break_set_by_source_regexp(
224+
self, "Set tid-specific breakpoint here", num_expected_locations=1
225+
)
226+
breakpoint = target.FindBreakpointByID(thread_bp_number)
227+
# This breakpoint should not be hit.
228+
breakpoint.SetThreadID(123)
229+
process.Continue()
230+
self.assertState(process.GetState(), lldb.eStateExited)

lldb/test/API/functionalities/plugins/python_os_plugin/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
int main (int argc, char const *argv[], char const *envp[])
44
{
55
puts("stop here"); // Set breakpoint here
6+
puts("hello");
7+
puts("Set tid-specific breakpoint here");
68
return 0;
79
}

0 commit comments

Comments
 (0)