[Lldb-commits] [lldb] r115815 - in /lldb/trunk: include/lldb/API/SBTarget.h source/API/SBTarget.cpp
Greg Clayton
gclayton at apple.com
Wed Oct 6 11:44:26 PDT 2010
Author: gclayton
Date: Wed Oct 6 13:44:26 2010
New Revision: 115815
URL: http://llvm.org/viewvc/llvm-project?rev=115815&view=rev
Log:
Leaving in deprecated functions until we can get a clean build with the new APIs in place before removing the deprecated functions.
Modified:
lldb/trunk/include/lldb/API/SBTarget.h
lldb/trunk/source/API/SBTarget.cpp
Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=115815&r1=115814&r2=115815&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Wed Oct 6 13:44:26 2010
@@ -50,6 +50,9 @@
IsValid() const;
lldb::SBProcess
+ CreateProcess (); // DEPRECATED
+
+ lldb::SBProcess
GetProcess ();
lldb::SBProcess
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=115815&r1=115814&r2=115815&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Wed Oct 6 13:44:26 2010
@@ -105,6 +105,20 @@
return debugger;
}
+
+// DEPRECATED
+SBProcess
+SBTarget::CreateProcess ()
+{
+ SBProcess sb_process;
+
+ if (m_opaque_sp)
+ sb_process.SetProcess (m_opaque_sp->CreateProcess (m_opaque_sp->GetDebugger().GetListener()));
+
+ return sb_process;
+}
+
+
SBProcess
SBTarget::LaunchProcess
(
@@ -118,8 +132,17 @@
SBProcess sb_process;
if (m_opaque_sp)
{
- // When launching, we always want to create a new process
- sb_process.SetProcess (m_opaque_sp->CreateProcess (m_opaque_sp->GetDebugger().GetListener()));
+ // DEPRECATED, this will change when CreateProcess is removed...
+ if (m_opaque_sp->GetProcessSP())
+ {
+ sb_process.SetProcess(m_opaque_sp->GetProcessSP());
+ }
+ else
+ {
+ // When launching, we always want to create a new process When
+ // SBTarget::CreateProcess is removed, this will always happen.
+ sb_process.SetProcess (m_opaque_sp->CreateProcess (m_opaque_sp->GetDebugger().GetListener()));
+ }
if (sb_process.IsValid())
{
More information about the lldb-commits
mailing list