This is an archive of the discontinued LLVM Phabricator instance.

Add an API to get an SBBreakpoint's owning SBTarget
ClosedPublic

Authored by jingham on Oct 13 2020, 6:47 PM.

Details

Summary

Scripted breakpoint resolvers receive the breakpoint they are being set on, and the callback takes an SBSymbolContext.

Sometimes (for instance if you want to disassemble instructions) you need access to the target that owns the breakpoint. We don't include the owning target in an SBSymbolContext, which mirrors the fact that SBModules aren't owned by a single target, but live in the shared cache and might have many SBTarget owners. So you can't get it from there.

However, an SBBreakpoint is always owned by one target, so it makes sense to be able to get an SBBreakpoint's SBTarget.

Diff Detail

Event Timeline

jingham created this revision.Oct 13 2020, 6:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2020, 6:47 PM
jingham requested review of this revision.Oct 13 2020, 6:47 PM
jingham updated this revision to Diff 298210.Oct 14 2020, 12:11 PM

Use lldb-instr instead of hand-generating the reproducer wrappers.

JDevlieghere accepted this revision.Oct 14 2020, 12:18 PM
This revision is now accepted and ready to land.Oct 14 2020, 12:18 PM
This revision was landed with ongoing or failed builds.Oct 15 2020, 2:29 PM
This revision was automatically updated to reflect the committed changes.