HomePhabricator

[lldb] Make shared_from_this-related code safer

Authored by tatyana-krasnukha on Feb 13 2020, 4:51 AM.

Description

[lldb] Make shared_from_this-related code safer

Pass TargetSP to filters' CreateFromStructuredData, don't let them guess
whether target object is managed by a shared_ptr.

Make Breakpoint sure that m_target.shared_from_this() is safe by passing TargetSP
to all its static Create*** member-functions. This should be enough, since Breakpoint's
constructors are private/protected and never called directly (except by Target itself).

Details

Committed
tatyana-krasnukhaFeb 18 2020, 2:49 AM
Parents
rG185ef697ef5c: [lldb] Don't call CopyForBreakpoint from a Breakpoint's constructor
Branches
Unknown
Tags
Unknown