Is there any MI command for connecting remote target ?

Using platform and target command with lldb, It works fine as follows:

-----host log----------
twoflower@js1-desktop ~/local-hello> ls
a.out*  hello.cpp
twoflower@js1-desktop ~/local-hello> lldb-3.8.1
(lldb) platform select remote-linux
  Platform: remote-linux
 Connected: no
(lldb) platform connect connect://
  Platform: remote-linux
    Triple: x86_64-*-linux-gnu
OS Version: 3.19.0 (3.19.0-32-generic)
    Kernel: #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015
  Hostname: twoflower
 Connected: yes
WorkingDir: /home/twoflower/remote-hello
(lldb) target create -r /home/twoflower/remote-hello/a.out a.out
Current executable set to 'a.out' (x86_64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x000000000040052d
(lldb) r
Process 14524 launched:
Process 14524 stopped
* thread #1: tid = 14524, 0x000000000040052d a.out`main, name = 'a.out',
stop reason = breakpoint 1.1
    frame #0: 0x000000000040052d a.out`main
->  0x40052d <+0>: pushq  %rbp
    0x40052e <+1>: movq   %rsp, %rbp
    0x400531 <+4>: movl   $0x4005d4, %edi           ; imm = 0x4005D4
    0x400536 <+9>: movl   $0x0, %eax
(lldb) c
Process 14524 resuming
Process 14524 exited with status = 0 (0x00000000)
(lldb) q
twoflower@js1-desktop ~/local-hello>

------remote log -------
twoflower@twoflower ~/remote-hello> ls
a.out*  hello.cpp
twoflower@twoflower ~/remote-hello> lldb-server-3.8 p --listen "*:1234"
Connection established.
error: lost connection
lldb-server exiting...


However, when I try the same thing with lldb-mi, I cannot connect to remote
target as follows:

------- host log --------
twoflower@js1-desktop ~/local-hello> lldb-mi-3.8.1
-target-select remote
^error,msg="Command 'target-select'. Current SBTarget is invalid"

------  remote log ------
twoflower@twoflower ~/remote-hello> lldb-server-3.8 p --listen "*:1234"

The remote side seems not to receive any msg at all.
I am not sure that it is proper use for -target-select command.

Chunseok Lee

Where Do We come from? What Are We? Where Are We Going?
lldb-dev mailing list

Reply via email to