diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-02-21 18:40:07 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-02-21 18:40:07 +0000 |
| commit | 0c90ef479a8870ed8adb598cd7e70518960f0353 (patch) | |
| tree | bc08dd05ff8e394a9f207f1cac32f03b0ff5bf5b /lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp | |
| parent | ff461fcf07688fafdf3b84dee11d84ac760fcf5d (diff) | |
| download | bcm5719-llvm-0c90ef479a8870ed8adb598cd7e70518960f0353.tar.gz bcm5719-llvm-0c90ef479a8870ed8adb598cd7e70518960f0353.zip | |
Linux fix patch from Dmitry Vyukov.
llvm-svn: 151072
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp index ed69b970f20..6c35b7ef1c8 100644 --- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp +++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp @@ -966,6 +966,7 @@ ProcessMonitor::Launch(LaunchArgs *args) { ProcessMonitor *monitor = args->m_monitor; ProcessLinux &process = monitor->GetProcess(); + lldb::ProcessSP processSP = process.shared_from_this(); const char **argv = args->m_argv; const char **envp = args->m_envp; const char *stdin_path = args->m_stdin_path; @@ -1104,7 +1105,7 @@ ProcessMonitor::Launch(LaunchArgs *args) // Update the process thread list with this new thread. // FIXME: should we be letting UpdateThreadList handle this? // FIXME: by using pids instead of tids, we can only support one thread. - inferior.reset(new POSIXThread(process, pid)); + inferior.reset(new POSIXThread(processSP, pid)); if (log) log->Printf ("ProcessMonitor::%s() adding pid = %i", __FUNCTION__, pid); process.GetThreadList().AddThread(inferior); @@ -1166,6 +1167,7 @@ ProcessMonitor::Attach(AttachArgs *args) ProcessMonitor *monitor = args->m_monitor; ProcessLinux &process = monitor->GetProcess(); + lldb::ProcessSP processSP = process.shared_from_this(); lldb::ThreadSP inferior; LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); @@ -1191,7 +1193,7 @@ ProcessMonitor::Attach(AttachArgs *args) } // Update the process thread list with the attached thread. - inferior.reset(new POSIXThread(process, pid)); + inferior.reset(new POSIXThread(processSP, pid)); if (log) log->Printf ("ProcessMonitor::%s() adding tid = %i", __FUNCTION__, pid); process.GetThreadList().AddThread(inferior); |

