Note we already have the ability to run a remote shell command:

        SBError
        SBPlatform::Run (SBPlatformShellCommand &shell_command);

this is in case you want to launch a shell command separately that you aren't 
going to debug.

Greg

> On Jan 26, 2015, at 4:32 PM, Greg Clayton <gclay...@apple.com> wrote:
> 
> 
>> On Jan 26, 2015, at 3:28 PM, Oleksiy Vyalov <ovya...@google.com> wrote:
>> 
>> Hello,
>> 
>> I'm trying to make TestProcessAttach to pass in case of remote platform. I 
>> see a few problems here:
>>      • lldbtest.spawnSubprocess should spawn a new process remotely (e.g., 
>> using A packet) when remote_platform is presented.
>>      • It seems "process attach" doesn't know about selected platform and 
>> tries to find a local process to attach - either by pid or name (I don't see 
>> qLaunchGDBServer requests in platform's gdb-remote logs).
>> The main question for me here - is it expected behavior that "process 
>> attach|launch" always work with local processes only regardless of selected 
>> platform? Or if it's not the case should we delegate Process::Attach call to 
>> Platform::Attach and Process::Launch to Platform::ProcessLaunch?
>> Or as minimal workaround make TestProcessAttach to use "platform process 
>> attach" command instead?
> 
> 
> Yes, use the "platform process attach" command, or better yet add new API to 
> SBPlatform:
> 
>    SBProcess
>    SBPlatform::Launch (SBLaunchInfo &launch_info, SBError& error);
> 
>    SBProcess
>    SBPlatform::Attach (SBAttachInfo &attach_info, SBError& error);
> 
> 
> Then we can use this API to do the launching/attaching via the SBPlatform 
> object we already have stored.
> 
> Greg
> 


_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to