This is an archive of the discontinued LLVM Phabricator instance.

Make target.process.stop-on-sharedlibrary-events setting work
ClosedPublic

Authored by jingham on Mar 18 2021, 7:19 PM.

Details

Summary

This setting is supposed to make us stop when we hit a shared library event. The shared library event callbacks happen as synchronous breakpoint callbacks - below the level of user callbacks. The information that the synchronous callback wanted to stop was getting propagated to the StopInfoBreakpoint correctly, but then we lost that bit of information when we went to do PerformAction. This patch takes that into account.

In this patch, if the synchronous callback says to stop, but the user has another breakpoint that's auto-continue, or a callback that says to continue, at the same spot, I obey the other breakpoint's opinions rather than the callback one. That seems to me right since the sync callbacks we have around are implementation details and the user can't even really know where they might be easily. So having them collide with the user's intentions doesn't seem right.

Diff Detail

Event Timeline

jingham requested review of this revision.Mar 18 2021, 7:19 PM
jingham created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 7:19 PM
JDevlieghere accepted this revision.Mar 18 2021, 7:28 PM

A few nits but the change itself looks sound.

lldb/source/Breakpoint/BreakpointOptions.cpp
457

s/expression/expressing/

459
lldb/test/API/functionalities/stop-on-sharedlibrary-load/Makefile
2

Not that it matters, but I guess this could as well be a C test?

This revision is now accepted and ready to land.Mar 18 2021, 7:28 PM
This revision was landed with ongoing or failed builds.Mar 19 2021, 12:02 PM
This revision was automatically updated to reflect the committed changes.

I added a couple more tests for having a breakpoint at the load site before committing.