<div dir="ltr">Hi,<div><br></div><div>i'm trying to spin up an app on an ios device and then remotely connect to it. I'm starting starting a debug server on the device, then tell it to launch a specific app via the gdb-remote protocol, e.g.</div><div><br></div><div><div>Sending packet: +</div><div>Sending packet: $QStartNoAckMode#b0</div><div>Received ack: +</div><div>Received packet: $OK#9a</div><div>Sending packet: +</div><div>Sending packet: $QEnvironment:NSUnbufferedIO=YES#8d</div><div>Received packet: $OK#00</div><div>Sending packet: $QListThreadsInStopReply#21</div><div>Received packet: $OK#00</div><div>Sending packet: $A228,0,2f707269766174652f7661722f6d6f62696c652f436f6e7461696e6572732f42756e646c652f4170706c69636174696f6e2f44323736423144342d363135372d343837372d383839332d3338334630434437354233392f636f6d2e726f626f766d2e746573742e494f5344656d6f2e617070,28,1,2d72766d3a6c6f673d7472616365#ca</div><div>Received packet: $OK#00</div><div>Sending packet: $qLaunchSuccess#a5</div><div>Received packet: $OK#00</div></div><div><br></div><div>The app launches successfully. Next i setup a local server socket which then forwards the communication between lldb and the debugserver.</div><div><br></div><div>In lldb, i set the platform to remote-ios, and create at target pointing at the local version of the executable file of the ios app, and then call gdb-remote which connects to the local forwarding socket:</div><div><br></div><div><div>(lldb) platform select remote-ios</div><div>  Platform: remote-ios</div><div> Connected: no</div><div>  SDK Path: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.0 (12A365)"</div><div> SDK Roots: [ 0] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2"</div><div> SDK Roots: [ 1] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3"</div><div> SDK Roots: [ 2] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0"</div><div> SDK Roots: [ 3] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1"</div><div> SDK Roots: [ 4] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.0"</div><div> SDK Roots: [ 5] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.1"</div><div> SDK Roots: [ 6] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.0"</div><div> SDK Roots: [ 7] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1"</div><div> SDK Roots: [ 8] "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.0 (12A365)"</div><div> SDK Roots: [ 9] "/Users/badlogic/Library/Developer/Xcode/iOS DeviceSupport/7.1.1 (11D201)"</div><div> SDK Roots: [10] "/Users/badlogic/Library/Developer/Xcode/iOS DeviceSupport/8.0 (12A365)"</div><div>(lldb) target create /tmp/robovm.HelloWorld.ios/com.robovm.test.IOSDemo.app/com.robovm.test.IOSDemo</div><div>Current executable set to '/tmp/robovm.HelloWorld.ios/com.robovm.test.IOSDemo.app/com.robovm.test.IOSDemo' (armv7).</div><div>(lldb) gdb-remote 8889</div></div><div><br></div><div>The debugserver and lldb then exchange a few messages:</div><div><br></div><div><div>Sending packet (client): $QListThreadsInStopReply#21$qHostInfo#9b</div><div>Received packet: $OK#00</div><div>Received packet: $cputype:12;cpusubtype:10;ostype:ios;watchpoint_exceptions_received:before;vendor:apple;endian:little;ptrsize:4;#00</div><div>Sending packet (client): $vCont?#49</div><div>Received packet: $vCont;c;C;s;S#00</div><div>Sending packet (client): $qVAttachOrWaitSupported#38</div><div>Received packet: $OK#00</div><div>Sending packet (client): $qProcessInfo#dc</div><div>Received packet: $pid:2e9;parent-pid:2e8;real-uid:1f5;real-gid:1f5;effective-uid:1f5;effective-gid:1f5;cputype:c;cpusubtype:b;ostype:ios;vendor:apple;endian:little;ptrsize:4;#00</div><div>Sending packet (client): $qC#b4</div><div>Received packet: $QC108d6#00</div></div><div><br></div><div>Note that the +$QStartNoAckMode#b0 message is not forwarded to the debug server but directly replied to by the forwarding server.</div><div><br></div><div>LLDB seems be confused from this point onwards. It seems to think that a process has been launched but is unable to provide any information on the process or interrupt it or interact with it in any other way.</div><div><br></div><div>I'd be greatful if somebody could point out any errors in the above workflow (apart from not using XCode, which is sadly not an option)</div><div><br></div><div>Thanks,</div><div>Mario</div>







<div><br></div><div><br></div><div><br></div><div><br></div></div>