[Lldb-commits] [lldb] r165806 - in /lldb/trunk/source: API/SBDeclaration.cpp Plugins/Process/Linux/ProcessLinux.cpp Plugins/Process/Linux/ProcessMonitor.cpp Plugins/Process/POSIX/POSIXThread.cpp Plugins/Process/POSIX/POSIXThread.h Plugins/Process/POSIX/ProcessPOSIX.cpp
Greg Clayton
gclayton at apple.com
Fri Oct 12 09:23:23 PDT 2012
Author: gclayton
Date: Fri Oct 12 11:23:23 2012
New Revision: 165806
URL: http://llvm.org/viewvc/llvm-project?rev=165806&view=rev
Log:
Patch from Daniel Malea that cleans up the process parameters for Process/Thread classes for POSIX and Linux.
Modified:
lldb/trunk/source/API/SBDeclaration.cpp
lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
Modified: lldb/trunk/source/API/SBDeclaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDeclaration.cpp?rev=165806&r1=165805&r2=165806&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDeclaration.cpp (original)
+++ lldb/trunk/source/API/SBDeclaration.cpp Fri Oct 12 11:23:23 2012
@@ -13,6 +13,8 @@
#include "lldb/Core/Stream.h"
#include "lldb/Symbol/Declaration.h"
+#include <limits.h>
+
using namespace lldb;
using namespace lldb_private;
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp?rev=165806&r1=165805&r2=165806&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp Fri Oct 12 11:23:23 2012
@@ -106,8 +106,7 @@
assert(m_monitor);
ThreadSP thread_sp (old_thread_list.FindThreadByID (GetID(), false));
if (!thread_sp) {
- ProcessSP me = this->shared_from_this();
- thread_sp.reset(new POSIXThread(me, GetID()));
+ thread_sp.reset(new POSIXThread(*this, GetID()));
}
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=165806&r1=165805&r2=165806&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Fri Oct 12 11:23:23 2012
@@ -967,7 +967,6 @@
{
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;
@@ -1106,7 +1105,7 @@
// 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(processSP, pid));
+ inferior.reset(new POSIXThread(process, pid));
if (log)
log->Printf ("ProcessMonitor::%s() adding pid = %i", __FUNCTION__, pid);
process.GetThreadList().AddThread(inferior);
@@ -1168,7 +1167,6 @@
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));
@@ -1196,7 +1194,7 @@
monitor->m_pid = pid;
// Update the process thread list with the attached thread.
- inferior.reset(new POSIXThread(processSP, pid));
+ inferior.reset(new POSIXThread(process, pid));
if (log)
log->Printf ("ProcessMonitor::%s() adding tid = %i", __FUNCTION__, pid);
process.GetThreadList().AddThread(inferior);
Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp?rev=165806&r1=165805&r2=165806&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp Fri Oct 12 11:23:23 2012
@@ -33,7 +33,7 @@
using namespace lldb_private;
-POSIXThread::POSIXThread(ProcessSP &process, lldb::tid_t tid)
+POSIXThread::POSIXThread(Process &process, lldb::tid_t tid)
: Thread(process, tid),
m_frame_ap(0)
{
Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h?rev=165806&r1=165805&r2=165806&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h Fri Oct 12 11:23:23 2012
@@ -29,7 +29,7 @@
: public lldb_private::Thread
{
public:
- POSIXThread(lldb::ProcessSP &process, lldb::tid_t tid);
+ POSIXThread(lldb_private::Process &process, lldb::tid_t tid);
virtual ~POSIXThread();
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=165806&r1=165805&r2=165806&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Fri Oct 12 11:23:23 2012
@@ -510,8 +510,7 @@
assert(m_monitor);
ThreadSP thread_sp (old_thread_list.FindThreadByID (GetID(), false));
if (!thread_sp) {
- ProcessSP me = this->shared_from_this();
- thread_sp.reset(new POSIXThread(me, GetID()));
+ thread_sp.reset(new POSIXThread(*this, GetID()));
}
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
More information about the lldb-commits
mailing list