[lldb-dev] Starting remote process

Sebastien Metrot meeloo at gmail.com
Sun Jun 23 07:04:11 PDT 2013


I'm now investigating how to start a remote debugging session. 
I create a debugger, then a target (with the local path of the executable), and then a process with SBTarget::ConnectRemote. When I get the status changed event that tells me the debugger is connected I try to launch the remote application with SBProcess::RemoteLaunch but I get an error: "Remote Launch result: No such file or directory (path to my local executable)" and that's because the remote executable is not stored in the same path than the local one, but I haven't found a way to give that information to SBTarget or SBProcess. I have tried to pass it as the first argument of SBProcess::RemoteLaunch but it doesn't work as the first thing this method does is to insert the local target path in the argument list. 
If I comment the lines 175 and 176 in SBProcess.cpp that does the insertion:
//            if (exe_module)
//                launch_info.SetExecutableFile(exe_module->GetFileSpec(), true);
It then works beautifully.

What is the correct way or achieving what I'm trying to do? Is there a need for a new API or did I once again overlooked something?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130623/26d4c6d3/attachment.html>

More information about the lldb-dev mailing list