Add a test case ProcessAPITestCase.test_remote_launch() which tests SBProcess.RemoteLaunch()

API with a process not in eStateConnected, and checks that the remote launch failed.

Modify SBProcess::RemoteLaunch()/RemoteAttachToProcessWithID()'s log statements to fix a
crasher when logging is turned on.

llvm-svn: 127055
This commit is contained in:
Johnny Chen
2011-03-05 01:20:11 +00:00
parent 4b598e156a
commit 930e3ad51e
3 changed files with 32 additions and 6 deletions

View File

@@ -141,7 +141,7 @@ SBProcess::RemoteLaunch (char const **argv,
if (log) {
SBStream sstr;
error.GetDescription (sstr);
log->Printf ("SBProcess(%p)::RemoteLaunch (...) => SBError (%p): %s", error.get(), sstr.GetData());
log->Printf ("SBProcess(%p)::RemoteLaunch (...) => SBError (%p): %s", m_opaque_sp.get(), error.get(), sstr.GetData());
}
return error.Success();
@@ -171,7 +171,7 @@ SBProcess::RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError& error)
if (log) {
SBStream sstr;
error.GetDescription (sstr);
log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%d) => SBError (%p): %s", error.get(), sstr.GetData());
log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%d) => SBError (%p): %s", m_opaque_sp.get(), pid, error.get(), sstr.GetData());
}
return error.Success();