Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Remove unfiltered stop reason propagation from StopInfoMachException #122817

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,8 @@ StopInfoSP StopInfoMachException::CreateStopReasonWithMachException(
// but if it is for another thread, we can just report no reason. We
// don't need to worry about stepping over the breakpoint here, that
// will be taken care of when the thread resumes and notices that
// there's a breakpoint under the pc. If we have an operating system
// plug-in, we might have set a thread specific breakpoint using the
// operating system thread ID, so we can't make any assumptions about
// the thread ID so we must always report the breakpoint regardless
// of the thread.
if (bp_site_sp->ValidForThisThread(thread) ||
thread.GetProcess()->GetOperatingSystem() != nullptr)
// there's a breakpoint under the pc.
if (bp_site_sp->ValidForThisThread(thread))
return StopInfo::CreateStopReasonWithBreakpointSiteID(
thread, bp_site_sp->GetID());
else if (is_trace_if_actual_breakpoint_missing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,12 @@ def run_python_os_step(self):
6,
"Make sure we stepped from line 5 to line 6 in main.c",
)

thread_bp_number = lldbutil.run_break_set_by_source_regexp(
self, "Set tid-specific breakpoint here", num_expected_locations=1
)
breakpoint = target.FindBreakpointByID(thread_bp_number)
# This breakpoint should not be hit.
breakpoint.SetThreadID(123)
process.Continue()
self.assertState(process.GetState(), lldb.eStateExited)
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
int main (int argc, char const *argv[], char const *envp[])
{
puts("stop here"); // Set breakpoint here
puts("hello");
puts("Set tid-specific breakpoint here");
return 0;
}
Loading