diff options
| author | James McIlree <jmcilree@apple.com> | 2011-03-04 00:31:13 +0000 |
|---|---|---|
| committer | James McIlree <jmcilree@apple.com> | 2011-03-04 00:31:13 +0000 |
| commit | 9631aae211e557f1ddad20a30d4b4276b853bbec (patch) | |
| tree | 4b89527ff9e428a421bc8eab3190182eabd719bc /lldb/source/API/SBTarget.cpp | |
| parent | 54366f12cb614f3d3546e39ff12f4ca0a5d161fe (diff) | |
| download | bcm5719-llvm-9631aae211e557f1ddad20a30d4b4276b853bbec.tar.gz bcm5719-llvm-9631aae211e557f1ddad20a30d4b4276b853bbec.zip | |
Expose ConnectRemote API through SBTarget and SBProcess.
Patch verified by Greg Clayton prior to checkin.
llvm-svn: 126974
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 7358a386946..d1a1f275e33 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -366,6 +366,41 @@ SBTarget::AttachToProcessWithName } +lldb::SBProcess +SBTarget::ConnectRemote +( + SBListener &listener, + const char *url, + const char *plugin_name, + SBError& error +) +{ + SBProcess sb_process; + if (m_opaque_sp) + { + Mutex::Locker api_locker (m_opaque_sp->GetAPIMutex()); + if (listener.IsValid()) + sb_process.SetProcess (m_opaque_sp->CreateProcess (listener.ref(), plugin_name)); + else + sb_process.SetProcess (m_opaque_sp->CreateProcess (m_opaque_sp->GetDebugger().GetListener(), plugin_name)); + + + if (sb_process.IsValid()) + { + error.SetError (sb_process->ConnectRemote (url)); + } + else + { + error.SetErrorString ("unable to create lldb_private::Process"); + } + } + else + { + error.SetErrorString ("SBTarget is invalid"); + } + return sb_process; +} + SBFileSpec SBTarget::GetExecutable () { |

