summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Target.cpp')
-rw-r--r--lldb/source/Target/Target.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 6a742c28e59..7209382c789 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -167,6 +167,7 @@ Target::Destroy()
m_breakpoint_list.RemoveAll(notify);
m_internal_breakpoint_list.RemoveAll(notify);
m_last_created_breakpoint.reset();
+ m_last_created_watchpoint_location.reset();
m_search_filter_sp.reset();
m_image_search_paths.Clear(notify);
m_scratch_ast_context_ap.reset();
@@ -452,7 +453,10 @@ Target::CreateWatchpointLocation(lldb::addr_t addr, size_t size, uint32_t type)
rc.Success() ? "succeeded" : "failed",
wp_loc_sp->GetID());
- if (rc.Fail()) wp_loc_sp.reset();
+ if (rc.Fail())
+ wp_loc_sp.reset();
+ else
+ m_last_created_watchpoint_location = wp_loc_sp;
return wp_loc_sp;
}
OpenPOWER on IntegriCloud