<div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">Thank you for quick response!</span><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 4:32 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
> On Jan 26, 2015, at 3:28 PM, Oleksiy Vyalov <<a href="mailto:ovyalov@google.com">ovyalov@google.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I'm trying to make TestProcessAttach to pass in case of remote platform. I see a few problems here:<br>
> • lldbtest.spawnSubprocess should spawn a new process remotely (e.g., using A packet) when remote_platform is presented.<br>
> • 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).<br>
> 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?<br>
> Or as minimal workaround make TestProcessAttach to use "platform process attach" command instead?<br>
<br>
<br>
</div></div>Yes, use the "platform process attach" command, or better yet add new API to SBPlatform:</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
SBProcess<br>
SBPlatform::Launch (SBLaunchInfo &launch_info, SBError& error);<br>
<br>
SBProcess<br>
SBPlatform::Attach (SBAttachInfo &attach_info, SBError& error);<br>
<br></blockquote><div><br></div><div>If it's okay I'd rather make tests to use <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">"platform process attach/launch" commands for verification purposes and combination of <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">SBPlatform::Launch/<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">SBPlatform::Kill to start/stop any process on target.</span></span></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Then we can use this API to do the launching/attaching via the SBPlatform object we already have stored.<br>
<span class=""><font color="#888888"><br>
Greg<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(85,85,85);font-family:sans-serif;line-height:20px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px;background-color:rgb(255,255,255)">Oleksiy Vyalov |</span><span style="color:rgb(85,85,85);font-family:sans-serif;line-height:20px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px;background-color:rgb(255,255,255)"> Software Engineer |</span><span style="color:rgb(85,85,85);font-family:sans-serif;line-height:20px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px;background-color:rgb(255,255,255)"> <a href="mailto:ovyalov@google.com" target="_blank">ovyalov<font color="#1155cc">@google.com</font></a></span></div></div>
</div></div>