summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBThread.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2010-10-20 00:39:53 +0000
committerJim Ingham <jingham@apple.com>2010-10-20 00:39:53 +0000
commitb15bfc753c67f7af5eee131da04f007fd5af91fb (patch)
tree033d69708f181695d5030ea293a62186510ec6fe /lldb/source/API/SBThread.cpp
parent20f7ab72b1043fa288c5471dc846581d3a33d9ea (diff)
downloadbcm5719-llvm-b15bfc753c67f7af5eee131da04f007fd5af91fb.tar.gz
bcm5719-llvm-b15bfc753c67f7af5eee131da04f007fd5af91fb.zip
Don't cache the public stop reason, since it can change as plan completion gets processed. That means GetStopReason needs to return a shared pointer, not a pointer to the thread's cached version. Also allow the thread plans to get and set the thread private stop reason - that is usually more appropriate for the logic the thread plans need to do.
llvm-svn: 116892
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
-rw-r--r--lldb/source/API/SBThread.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index 006efc79132..ee6b6874678 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -81,9 +81,9 @@ SBThread::GetStopReason()
{
if (m_opaque_sp)
{
- lldb_private::StopInfo *stop_info = m_opaque_sp->GetStopInfo ();
- if (stop_info)
- return stop_info->GetStopReason();
+ StopInfoSP stop_info_sp = m_opaque_sp->GetStopInfo ();
+ if (stop_info_sp)
+ return stop_info_sp->GetStopReason();
}
return eStopReasonInvalid;
}
@@ -93,10 +93,10 @@ SBThread::GetStopDescription (char *dst, size_t dst_len)
{
if (m_opaque_sp)
{
- lldb_private::StopInfo *stop_info = m_opaque_sp->GetStopInfo ();
- if (stop_info)
+ StopInfoSP stop_info_sp = m_opaque_sp->GetStopInfo ();
+ if (stop_info_sp)
{
- const char *stop_desc = stop_info->GetDescription();
+ const char *stop_desc = stop_info_sp->GetDescription();
if (stop_desc)
{
if (dst)
@@ -110,7 +110,7 @@ SBThread::GetStopDescription (char *dst, size_t dst_len)
else
{
size_t stop_desc_len = 0;
- switch (stop_info->GetStopReason())
+ switch (stop_info_sp->GetStopReason())
{
case eStopReasonTrace:
case eStopReasonPlanComplete:
@@ -139,7 +139,7 @@ SBThread::GetStopDescription (char *dst, size_t dst_len)
case eStopReasonSignal:
{
- stop_desc = m_opaque_sp->GetProcess().GetUnixSignals ().GetSignalAsCString (stop_info->GetValue());
+ stop_desc = m_opaque_sp->GetProcess().GetUnixSignals ().GetSignalAsCString (stop_info_sp->GetValue());
if (stop_desc == NULL || stop_desc[0] == '\0')
{
static char signal_desc[] = "signal";
OpenPOWER on IntegriCloud