<div dir="ltr"><div>Is there any MI command for connecting remote target ?</div><div><br></div><div>Using platform and target command with lldb, It works fine as follows: </div><div><br></div><div>-----host log----------</div><div>twoflower@js1-desktop ~/local-hello> ls<br>a.out* hello.cpp<br>twoflower@js1-desktop ~/local-hello> lldb-3.8.1 <br>(lldb) platform select remote-linux<br> Platform: remote-linux<br> Connected: no<br>(lldb) platform connect connect://<a href="http://10.113.62.251:1234">10.113.62.251:1234</a><br> Platform: remote-linux<br> Triple: x86_64-*-linux-gnu<br>OS Version: 3.19.0 (3.19.0-32-generic)<br> Kernel: #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015<br> Hostname: twoflower<br> Connected: yes<br>WorkingDir: /home/twoflower/remote-hello<br>(lldb) target create -r /home/twoflower/remote-hello/a.out a.out<br>Current executable set to 'a.out' (x86_64).<br>(lldb) b main<br>Breakpoint 1: where = a.out`main, address = 0x000000000040052d<br>(lldb) r<br>Process 14524 launched: '/home/twoflower/.lldb/module_cache/remote-linux/.cache/BB42308F-4677-5DC0-AFC2-097CDFE91A83-3612C4F8/a.out' (x86_64)<br>Process 14524 stopped<br>* thread #1: tid = 14524, 0x000000000040052d a.out`main, name = 'a.out', stop reason = breakpoint 1.1<br> frame #0: 0x000000000040052d a.out`main<br>a.out`main:<br>-> 0x40052d <+0>: pushq %rbp<br> 0x40052e <+1>: movq %rsp, %rbp<br> 0x400531 <+4>: movl $0x4005d4, %edi ; imm = 0x4005D4 <br> 0x400536 <+9>: movl $0x0, %eax<br>(lldb) c<br>Process 14524 resuming<br>Process 14524 exited with status = 0 (0x00000000) <br>(lldb) q<br>twoflower@js1-desktop ~/local-hello> <br></div><div><br></div><div>------remote log -------</div><div>twoflower@twoflower ~/remote-hello> ls<br>a.out* hello.cpp<br>twoflower@twoflower ~/remote-hello> lldb-server-3.8 p --listen "*:1234"<br>Connection established.<br>error: lost connection<br>lldb-server exiting...<br></div><div><br clear="all">--------------------------------------</div><div><br></div><div>However, when I try the same thing with lldb-mi, I cannot connect to remote target as follows:</div><div><br></div><div>------- host log --------</div><div>twoflower@js1-desktop ~/local-hello> lldb-mi-3.8.1 <br>(gdb)<br>-target-select remote <a href="http://10.113.62.251:1234">10.113.62.251:1234</a><br>^error,msg="Command 'target-select'. Current SBTarget is invalid"<br>(gdb)</div><div><br></div><div>------ remote log ------</div><div>twoflower@twoflower ~/remote-hello> lldb-server-3.8 p --listen "*:1234"<br><br></div><div>The remote side seems not to receive any msg at all. </div><div>I am not sure that it is proper use for -target-select command. </div><div><br></div><div>BR,</div><div>Chunseok Lee<br></div><div><br>-- <br></div><div class="gmail_signature">Where Do We come from? What Are We? Where Are We Going?</div>
</div>