[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-03-04 Thread Tatyana Krasnukha via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6c17cc531f9f: [lldb] Make BreakpointResolver hold weak_ptr 
instead of raw pointer to… (authored by tatyana-krasnukha).

Changed prior to commit:
  https://reviews.llvm.org/D74557?vs=244727=248166#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74557/new/

https://reviews.llvm.org/D74557

Files:
  lldb/include/lldb/Breakpoint/BreakpointResolver.h
  lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
  lldb/include/lldb/Breakpoint/BreakpointResolverName.h
  lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
  lldb/include/lldb/Target/LanguageRuntime.h
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Breakpoint/BreakpointResolver.cpp
  lldb/source/Breakpoint/BreakpointResolverAddress.cpp
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
  lldb/source/Breakpoint/BreakpointResolverName.cpp
  lldb/source/Breakpoint/BreakpointResolverScripted.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
  lldb/source/Target/LanguageRuntime.cpp
  lldb/source/Target/Target.cpp

Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -622,7 +622,7 @@
 const bool hardware = request_hardware || GetRequireHardwareBreakpoints();
 bp_sp.reset(new Breakpoint(*this, filter_sp, resolver_sp, hardware,
resolve_indirect_symbols));
-resolver_sp->SetBreakpoint(bp_sp.get());
+resolver_sp->SetBreakpoint(bp_sp);
 AddBreakpoint(bp_sp, internal);
   }
   return bp_sp;
Index: lldb/source/Target/LanguageRuntime.cpp
===
--- lldb/source/Target/LanguageRuntime.cpp
+++ lldb/source/Target/LanguageRuntime.cpp
@@ -153,17 +153,17 @@
   }
 
 protected:
-  BreakpointResolverSP CopyForBreakpoint(Breakpoint ) override {
+  BreakpointResolverSP CopyForBreakpoint(BreakpointSP ) override {
 BreakpointResolverSP ret_sp(
 new ExceptionBreakpointResolver(m_language, m_catch_bp, m_throw_bp));
-ret_sp->SetBreakpoint();
+ret_sp->SetBreakpoint(breakpoint);
 return ret_sp;
   }
 
   bool SetActualResolver() {
-ProcessSP process_sp;
-if (m_breakpoint) {
-  process_sp = m_breakpoint->GetTarget().GetProcessSP();
+BreakpointSP breakpoint_sp = GetBreakpoint();
+if (breakpoint_sp) {
+  ProcessSP process_sp = breakpoint_sp->GetTarget().GetProcessSP();
   if (process_sp) {
 bool refreash_resolver = !m_actual_resolver_sp;
 if (m_language_runtime == nullptr) {
@@ -180,7 +180,7 @@
 
 if (refreash_resolver && m_language_runtime) {
   m_actual_resolver_sp = m_language_runtime->CreateExceptionResolver(
-  m_breakpoint, m_catch_bp, m_throw_bp);
+  breakpoint_sp, m_catch_bp, m_throw_bp);
 }
   } else {
 m_actual_resolver_sp.reset();
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
===
--- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -58,7 +58,7 @@
 // for .expand kernels as a fallback.
 class RSBreakpointResolver : public BreakpointResolver {
 public:
-  RSBreakpointResolver(Breakpoint *bp, ConstString name)
+  RSBreakpointResolver(const lldb::BreakpointSP , ConstString name)
   : BreakpointResolver(bp, BreakpointResolver::NameResolver),
 m_kernel_name(name) {}
 
@@ -77,9 +77,9 @@
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
   lldb::BreakpointResolverSP
-  CopyForBreakpoint(Breakpoint ) override {
+  CopyForBreakpoint(lldb::BreakpointSP ) override {
 lldb::BreakpointResolverSP ret_sp(
-new RSBreakpointResolver(, m_kernel_name));
+new RSBreakpointResolver(breakpoint, m_kernel_name));
 return ret_sp;
   }
 
@@ -100,7 +100,7 @@
   

[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-03-03 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.

You mean for BreakpointResolverScripted::CreateImplementationIfNeeded?  Passing 
in the BreakpointSP is fine.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74557/new/

https://reviews.llvm.org/D74557



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-03-03 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha added a comment.

@jingham Is it Ok with you?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74557/new/

https://reviews.llvm.org/D74557



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-02-14 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha updated this revision to Diff 244727.
tatyana-krasnukha added a reviewer: jingham.
tatyana-krasnukha added a comment.

Just realized that BreakpointResolverScripted::CreateImplementationIfNeeded 
should work when m_breakpoint == nullptr.
GetBreakpoint with assertion is not suitable here, so I pass the breakpoint as 
a parameter.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74557/new/

https://reviews.llvm.org/D74557

Files:
  lldb/include/lldb/Breakpoint/BreakpointResolver.h
  lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
  lldb/include/lldb/Breakpoint/BreakpointResolverName.h
  lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
  lldb/include/lldb/Target/LanguageRuntime.h
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Breakpoint/BreakpointResolver.cpp
  lldb/source/Breakpoint/BreakpointResolverAddress.cpp
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
  lldb/source/Breakpoint/BreakpointResolverName.cpp
  lldb/source/Breakpoint/BreakpointResolverScripted.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
  lldb/source/Target/LanguageRuntime.cpp
  lldb/source/Target/Target.cpp

Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -621,7 +621,7 @@
 const bool hardware = request_hardware || GetRequireHardwareBreakpoints();
 bp_sp.reset(new Breakpoint(*this, filter_sp, resolver_sp, hardware,
resolve_indirect_symbols));
-resolver_sp->SetBreakpoint(bp_sp.get());
+resolver_sp->SetBreakpoint(bp_sp);
 AddBreakpoint(bp_sp, internal);
   }
   return bp_sp;
Index: lldb/source/Target/LanguageRuntime.cpp
===
--- lldb/source/Target/LanguageRuntime.cpp
+++ lldb/source/Target/LanguageRuntime.cpp
@@ -154,17 +154,17 @@
   }
 
 protected:
-  BreakpointResolverSP CopyForBreakpoint(Breakpoint ) override {
+  BreakpointResolverSP CopyForBreakpoint(BreakpointSP ) override {
 BreakpointResolverSP ret_sp(
 new ExceptionBreakpointResolver(m_language, m_catch_bp, m_throw_bp));
-ret_sp->SetBreakpoint();
+ret_sp->SetBreakpoint(breakpoint);
 return ret_sp;
   }
 
   bool SetActualResolver() {
-ProcessSP process_sp;
-if (m_breakpoint) {
-  process_sp = m_breakpoint->GetTarget().GetProcessSP();
+BreakpointSP breakpoint_sp = GetBreakpoint();
+if (breakpoint_sp) {
+  ProcessSP process_sp = breakpoint_sp->GetTarget().GetProcessSP();
   if (process_sp) {
 bool refreash_resolver = !m_actual_resolver_sp;
 if (m_language_runtime == nullptr) {
@@ -181,7 +181,7 @@
 
 if (refreash_resolver && m_language_runtime) {
   m_actual_resolver_sp = m_language_runtime->CreateExceptionResolver(
-  m_breakpoint, m_catch_bp, m_throw_bp);
+  breakpoint_sp, m_catch_bp, m_throw_bp);
 }
   } else {
 m_actual_resolver_sp.reset();
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
===
--- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -58,7 +58,7 @@
 // for .expand kernels as a fallback.
 class RSBreakpointResolver : public BreakpointResolver {
 public:
-  RSBreakpointResolver(Breakpoint *bp, ConstString name)
+  RSBreakpointResolver(const lldb::BreakpointSP , ConstString name)
   : BreakpointResolver(bp, BreakpointResolver::NameResolver),
 m_kernel_name(name) {}
 
@@ -77,9 +77,9 @@
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
   lldb::BreakpointResolverSP
-  CopyForBreakpoint(Breakpoint ) override {
+  CopyForBreakpoint(lldb::BreakpointSP ) override {
 lldb::BreakpointResolverSP ret_sp(
-new RSBreakpointResolver(, m_kernel_name));
+new RSBreakpointResolver(breakpoint, m_kernel_name));
 return ret_sp;
   }
 
@@ 

[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-02-14 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha updated this revision to Diff 244645.
tatyana-krasnukha added a comment.

Moved assertion into GetBreakpoint().

> Were there any places you found where it was legit to ask for the Breakpoint 
> for a resolver and not have one?

I didn't find any, however, it seems to be possible in theory as 
BreakpointResolver is allowed to be constructed with `nullptr` instead of 
breakpoint (it is expected to call SetBreakpoint later).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74557/new/

https://reviews.llvm.org/D74557

Files:
  lldb/include/lldb/Breakpoint/BreakpointResolver.h
  lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
  lldb/include/lldb/Breakpoint/BreakpointResolverName.h
  lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
  lldb/include/lldb/Target/LanguageRuntime.h
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Breakpoint/BreakpointResolver.cpp
  lldb/source/Breakpoint/BreakpointResolverAddress.cpp
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
  lldb/source/Breakpoint/BreakpointResolverName.cpp
  lldb/source/Breakpoint/BreakpointResolverScripted.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
  lldb/source/Target/LanguageRuntime.cpp
  lldb/source/Target/Target.cpp

Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -621,7 +621,7 @@
 const bool hardware = request_hardware || GetRequireHardwareBreakpoints();
 bp_sp.reset(new Breakpoint(*this, filter_sp, resolver_sp, hardware,
resolve_indirect_symbols));
-resolver_sp->SetBreakpoint(bp_sp.get());
+resolver_sp->SetBreakpoint(bp_sp);
 AddBreakpoint(bp_sp, internal);
   }
   return bp_sp;
Index: lldb/source/Target/LanguageRuntime.cpp
===
--- lldb/source/Target/LanguageRuntime.cpp
+++ lldb/source/Target/LanguageRuntime.cpp
@@ -154,17 +154,17 @@
   }
 
 protected:
-  BreakpointResolverSP CopyForBreakpoint(Breakpoint ) override {
+  BreakpointResolverSP CopyForBreakpoint(BreakpointSP ) override {
 BreakpointResolverSP ret_sp(
 new ExceptionBreakpointResolver(m_language, m_catch_bp, m_throw_bp));
-ret_sp->SetBreakpoint();
+ret_sp->SetBreakpoint(breakpoint);
 return ret_sp;
   }
 
   bool SetActualResolver() {
-ProcessSP process_sp;
-if (m_breakpoint) {
-  process_sp = m_breakpoint->GetTarget().GetProcessSP();
+BreakpointSP breakpoint_sp = GetBreakpoint();
+if (breakpoint_sp) {
+  ProcessSP process_sp = breakpoint_sp->GetTarget().GetProcessSP();
   if (process_sp) {
 bool refreash_resolver = !m_actual_resolver_sp;
 if (m_language_runtime == nullptr) {
@@ -181,7 +181,7 @@
 
 if (refreash_resolver && m_language_runtime) {
   m_actual_resolver_sp = m_language_runtime->CreateExceptionResolver(
-  m_breakpoint, m_catch_bp, m_throw_bp);
+  breakpoint_sp, m_catch_bp, m_throw_bp);
 }
   } else {
 m_actual_resolver_sp.reset();
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
===
--- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -58,7 +58,7 @@
 // for .expand kernels as a fallback.
 class RSBreakpointResolver : public BreakpointResolver {
 public:
-  RSBreakpointResolver(Breakpoint *bp, ConstString name)
+  RSBreakpointResolver(const lldb::BreakpointSP , ConstString name)
   : BreakpointResolver(bp, BreakpointResolver::NameResolver),
 m_kernel_name(name) {}
 
@@ -77,9 +77,9 @@
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
   lldb::BreakpointResolverSP
-  CopyForBreakpoint(Breakpoint ) override {
+  CopyForBreakpoint(lldb::BreakpointSP ) override {
 lldb::BreakpointResolverSP ret_sp(
-new RSBreakpointResolver(, m_kernel_name));

[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-02-13 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

I wonder if it wouldn't be better to assert in GetBreakpoint.  Except when you 
are making the resolver, you should never have a breakpoint resolver without a 
valid breakpoint.  And there's no point in calling GetBreakpoint when you know 
you haven't set it yet.  You assert after most of the calls to GetBreakpoint, 
but not all.  Of the ones you don't, I think most of them should be.

Were there any places you found where it was legit to ask for the Breakpoint 
for a resolver and not have one?

Other than that LGTM.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74557/new/

https://reviews.llvm.org/D74557



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D74557: [lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint

2020-02-13 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha created this revision.
tatyana-krasnukha added reviewers: JDevlieghere, teemperor.
tatyana-krasnukha added a project: LLDB.
Herald added a subscriber: lldb-commits.

This prevents calling Breakpoint::shared_from_this of an object that is not 
owned by any shared_ptr.

The patch is a consequence of D74556 


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D74557

Files:
  lldb/include/lldb/Breakpoint/BreakpointResolver.h
  lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
  lldb/include/lldb/Breakpoint/BreakpointResolverName.h
  lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
  lldb/include/lldb/Target/LanguageRuntime.h
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Breakpoint/BreakpointResolver.cpp
  lldb/source/Breakpoint/BreakpointResolverAddress.cpp
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
  lldb/source/Breakpoint/BreakpointResolverName.cpp
  lldb/source/Breakpoint/BreakpointResolverScripted.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
  lldb/source/Target/LanguageRuntime.cpp
  lldb/source/Target/Target.cpp

Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -621,7 +621,7 @@
 const bool hardware = request_hardware || GetRequireHardwareBreakpoints();
 bp_sp.reset(new Breakpoint(*this, filter_sp, resolver_sp, hardware,
resolve_indirect_symbols));
-resolver_sp->SetBreakpoint(bp_sp.get());
+resolver_sp->SetBreakpoint(bp_sp);
 AddBreakpoint(bp_sp, internal);
   }
   return bp_sp;
Index: lldb/source/Target/LanguageRuntime.cpp
===
--- lldb/source/Target/LanguageRuntime.cpp
+++ lldb/source/Target/LanguageRuntime.cpp
@@ -154,17 +154,17 @@
   }
 
 protected:
-  BreakpointResolverSP CopyForBreakpoint(Breakpoint ) override {
+  BreakpointResolverSP CopyForBreakpoint(BreakpointSP ) override {
 BreakpointResolverSP ret_sp(
 new ExceptionBreakpointResolver(m_language, m_catch_bp, m_throw_bp));
-ret_sp->SetBreakpoint();
+ret_sp->SetBreakpoint(breakpoint);
 return ret_sp;
   }
 
   bool SetActualResolver() {
-ProcessSP process_sp;
-if (m_breakpoint) {
-  process_sp = m_breakpoint->GetTarget().GetProcessSP();
+BreakpointSP breakpoint_sp = GetBreakpoint();
+if (breakpoint_sp) {
+  ProcessSP process_sp = breakpoint_sp->GetTarget().GetProcessSP();
   if (process_sp) {
 bool refreash_resolver = !m_actual_resolver_sp;
 if (m_language_runtime == nullptr) {
@@ -181,7 +181,7 @@
 
 if (refreash_resolver && m_language_runtime) {
   m_actual_resolver_sp = m_language_runtime->CreateExceptionResolver(
-  m_breakpoint, m_catch_bp, m_throw_bp);
+  breakpoint_sp, m_catch_bp, m_throw_bp);
 }
   } else {
 m_actual_resolver_sp.reset();
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
===
--- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -58,7 +58,7 @@
 // for .expand kernels as a fallback.
 class RSBreakpointResolver : public BreakpointResolver {
 public:
-  RSBreakpointResolver(Breakpoint *bp, ConstString name)
+  RSBreakpointResolver(const lldb::BreakpointSP , ConstString name)
   : BreakpointResolver(bp, BreakpointResolver::NameResolver),
 m_kernel_name(name) {}
 
@@ -77,9 +77,9 @@
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
   lldb::BreakpointResolverSP
-  CopyForBreakpoint(Breakpoint ) override {
+  CopyForBreakpoint(lldb::BreakpointSP ) override {
 lldb::BreakpointResolverSP ret_sp(
-new RSBreakpointResolver(, m_kernel_name));
+new RSBreakpointResolver(breakpoint, m_kernel_name));
 return ret_sp;
   }
 
@@ -100,7 +100,7 @@
   };