aboutsummaryrefslogtreecommitdiff
path: root/source/Breakpoint
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-09-17 08:33:22 +0000
committerGreg Clayton <gclayton@apple.com>2011-09-17 08:33:22 +0000
commit987c7ebe1daa425ba7abfa9643800e3237146fc0 (patch)
tree6448c6b568c8f743a397ef37f37c8b1220af9764 /source/Breakpoint
parent02e210cad27e36108bef493b798c2c1eb3b04cb8 (diff)
downloadlldb-987c7ebe1daa425ba7abfa9643800e3237146fc0.tar.gz
Adopt the intrusive pointers in:
lldb_private::Breakpoint lldb_private::BreakpointLocations lldb_private::BreakpointSite lldb_private::Debugger lldb_private::StackFrame lldb_private::Thread lldb_private::Target git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Breakpoint')
-rw-r--r--source/Breakpoint/Breakpoint.cpp11
-rw-r--r--source/Breakpoint/BreakpointLocation.cpp10
-rw-r--r--source/Breakpoint/BreakpointOptions.cpp2
3 files changed, 9 insertions, 14 deletions
diff --git a/source/Breakpoint/Breakpoint.cpp b/source/Breakpoint/Breakpoint.cpp
index 4fa77dd71..6da262505 100644
--- a/source/Breakpoint/Breakpoint.cpp
+++ b/source/Breakpoint/Breakpoint.cpp
@@ -124,13 +124,6 @@ Breakpoint::GetLocationAtIndex (uint32_t index)
return m_locations.GetByIndex(index);
}
-BreakpointLocationSP
-Breakpoint::GetLocationSP (BreakpointLocation *bp_loc_ptr)
-{
- return m_locations.FindByID(bp_loc_ptr->GetID());
-}
-
-
// For each of the overall options we need to decide how they propagate to
// the location options. This will determine the precedence of options on
// the breakpoint vrs. its locations.
@@ -567,5 +560,7 @@ Breakpoint::GetFilterDescription (Stream *s)
const BreakpointSP
Breakpoint::GetSP ()
{
- return m_target.GetBreakpointList().FindBreakpointByID (GetID());
+ // This object contains an instrusive ref count base class so we can
+ // easily make a shared pointer to this object
+ return BreakpointSP (this);
}
diff --git a/source/Breakpoint/BreakpointLocation.cpp b/source/Breakpoint/BreakpointLocation.cpp
index ce5482fec..58f18e2f8 100644
--- a/source/Breakpoint/BreakpointLocation.cpp
+++ b/source/Breakpoint/BreakpointLocation.cpp
@@ -149,11 +149,11 @@ BreakpointLocation::SetCondition (const char *condition)
ThreadPlan *
BreakpointLocation::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx, Stream &error)
{
- lldb::BreakpointLocationSP my_sp(m_owner.GetLocationSP(this));
+ lldb::BreakpointLocationSP this_sp(this);
if (m_options_ap.get())
- return m_options_ap->GetThreadPlanToTestCondition (exe_ctx, my_sp, error);
+ return m_options_ap->GetThreadPlanToTestCondition (exe_ctx, this_sp, error);
else
- return m_owner.GetThreadPlanToTestCondition (exe_ctx, my_sp, error);
+ return m_owner.GetThreadPlanToTestCondition (exe_ctx, this_sp, error);
}
const char *
@@ -259,9 +259,9 @@ BreakpointLocation::ResolveBreakpointSite ()
if (m_owner.GetTarget().GetSectionLoadList().IsEmpty())
return false;
- BreakpointLocationSP myself_sp(m_owner.GetLocationSP (this));
+ BreakpointLocationSP this_sp(this);
- lldb::break_id_t new_id = process->CreateBreakpointSite (myself_sp, false);
+ lldb::break_id_t new_id = process->CreateBreakpointSite (this_sp, false);
if (new_id == LLDB_INVALID_BREAK_ID)
{
diff --git a/source/Breakpoint/BreakpointOptions.cpp b/source/Breakpoint/BreakpointOptions.cpp
index f0f18457f..df41339ab 100644
--- a/source/Breakpoint/BreakpointOptions.cpp
+++ b/source/Breakpoint/BreakpointOptions.cpp
@@ -172,7 +172,7 @@ BreakpointOptions::SetCondition (const char *condition)
ThreadPlan *
BreakpointOptions::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx,
- lldb::BreakpointLocationSP break_loc_sp,
+ const BreakpointLocationSP &break_loc_sp,
Stream &error_stream)
{
// No condition means we should stop, so return NULL.