summaryrefslogtreecommitdiff
path: root/lldb/include
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-05-29 03:20:37 +0000
committerGreg Clayton <gclayton@apple.com>2015-05-29 03:20:37 +0000
commitce0d032be4d9d52950dc8138804ba057cb2c3ad3 (patch)
tree0001abf3a7e0056760b2f7f0c72b87a261c9e19c /lldb/include
parent65004d0888b60e379de3f1d962a1614c10bf4d8e (diff)
Change ProcessEventData over to use a std::weak_ptr to a process intead of a std::shared_ptr. Anyone consuming events for a process should have the process around long enough to grab the event and anyone that holds onto an event for too long won't keep the process around.
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/Target/Process.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 0be09b3ef33..17bc88897a8 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -818,11 +818,12 @@ public:
virtual const ConstString &
GetFlavor () const;
- const lldb::ProcessSP &
+ lldb::ProcessSP
GetProcessSP() const
{
- return m_process_sp;
+ return m_process_wp.lock();
}
+
lldb::StateType
GetState() const
{
@@ -917,7 +918,7 @@ public:
m_restarted_reasons.push_back(reason);
}
- lldb::ProcessSP m_process_sp;
+ lldb::ProcessWP m_process_wp;
lldb::StateType m_state;
std::vector<std::string> m_restarted_reasons;
bool m_restarted; // For "eStateStopped" events, this is true if the target was automatically restarted.