[lldb-dev] MI command for connecting remote target

Chunseok Lee via lldb-dev lldb-dev at lists.llvm.org
Thu Sep 22 17:07:30 PDT 2016


Is there any MI command for connecting remote target ?

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

-----host log----------
twoflower at js1-desktop ~/local-hello> ls
a.out*  hello.cpp
twoflower at js1-desktop ~/local-hello> lldb-3.8.1
(lldb) platform select remote-linux
  Platform: remote-linux
 Connected: no
(lldb) platform connect connect://10.113.62.251:1234
  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:
'/home/twoflower/.lldb/module_cache/remote-linux/.cache/BB42308F-4677-5DC0-AFC2-097CDFE91A83-3612C4F8/a.out'
(x86_64)
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
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 at js1-desktop ~/local-hello>

------remote log -------
twoflower at twoflower ~/remote-hello> ls
a.out*  hello.cpp
twoflower at 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 at js1-desktop ~/local-hello> lldb-mi-3.8.1
(gdb)
-target-select remote 10.113.62.251:1234
^error,msg="Command 'target-select'. Current SBTarget is invalid"
(gdb)

------  remote log ------
twoflower at 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.

BR,
Chunseok Lee

-- 
Where Do We come from? What Are We? Where Are We Going?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160923/8b57de2c/attachment.html>


More information about the lldb-dev mailing list