This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Don't call CopyForBreakpoint from a Breakpoint's constructor
ClosedPublic

Authored by tatyana-krasnukha on Feb 13 2020, 7:05 AM.

Details

Summary

Some implementations (BreakpointResolverScripted) try calling the breakpoint's shared_from_this(),
that makes LLDB crash.

Added a test case that reproduced the issue.

Diff Detail

Event Timeline

jingham accepted this revision.Feb 13 2020, 10:14 AM
jingham added a subscriber: jingham.

LGTM

This revision is now accepted and ready to land.Feb 13 2020, 10:14 AM
JDevlieghere accepted this revision.Feb 13 2020, 10:23 AM

LGTM

lldb/include/lldb/Breakpoint/Breakpoint.h
573

nit: How about renaming this to Breakpoint::CopyToTarget instead? That seems a bit more explanatory than Breakpoint:: CopyFromBreakpoint.