Linux fix patch from Dmitry Vyukov.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151072 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/POSIX/POSIXThread.cpp b/source/Plugins/Process/POSIX/POSIXThread.cpp
index 3f5e022..9de6c85 100644
--- a/source/Plugins/Process/POSIX/POSIXThread.cpp
+++ b/source/Plugins/Process/POSIX/POSIXThread.cpp
@@ -29,10 +29,11 @@
#include "UnwindLLDB.h"
+using namespace lldb;
using namespace lldb_private;
-POSIXThread::POSIXThread(Process &process, lldb::tid_t tid)
+POSIXThread::POSIXThread(ProcessSP &process, lldb::tid_t tid)
: Thread(process, tid),
m_frame_ap(0)
{
@@ -49,7 +50,8 @@
ProcessMonitor &
POSIXThread::GetMonitor()
{
- ProcessPOSIX &process = static_cast<ProcessPOSIX&>(GetProcess());
+ ProcessSP base = GetProcess();
+ ProcessPOSIX &process = static_cast<ProcessPOSIX&>(*base);
return process.GetMonitor();
}
@@ -62,7 +64,8 @@
// Let all threads recover from stopping and do any clean up based
// on the previous thread state (if any).
- ProcessPOSIX &process = static_cast<ProcessPOSIX&>(GetProcess());
+ ProcessSP base = GetProcess();
+ ProcessPOSIX &process = static_cast<ProcessPOSIX&>(*base);
process.GetThreadList().RefreshStateAfterStop();
}
@@ -237,7 +240,7 @@
lldb::addr_t pc = GetRegisterContext()->GetPC();
if (log)
log->Printf ("POSIXThread::%s () PC=0x%8.8llx", __FUNCTION__, pc);
- lldb::BreakpointSiteSP bp_site(GetProcess().GetBreakpointSiteList().FindByAddress(pc));
+ lldb::BreakpointSiteSP bp_site(GetProcess()->GetBreakpointSiteList().FindByAddress(pc));
assert(bp_site);
lldb::break_id_t bp_id = bp_site->GetID();
assert(bp_site && bp_site->ValidForThisThread(this));