[lldb-dev] Remote Debugging on Linux

Vince Harron vharron at google.com
Tue Feb 24 14:34:39 PST 2015


It's only really tested on x86_64->x86_64.  We are bringing up x86_32 and
arm32/64 now-ish, MIPS soon to follow.

Please let us know if you hit any problems!


On Tue, Feb 24, 2015 at 3:52 PM, Greg Clayton <gclayton at apple.com> wrote:

> The first way to do this is to use the lldb-platform to allow you to view
> and launch processes on the remote host.
>
> On the remote machine launch lldb-server:
>
> remote.foo.com% lldb-server platform --listen=2000 --stay-alive
>
> Then on your host machine:
>
> host.bar.com% lldb
> (lldb) platform select remote-linux
> (lldb) platform connect connect://remote.foo.com:2000
>
> Now you have a live connection to a platform server on the remote host so
> you can list existing processes:
>
> (lldb) platform process list
> (lldb) platform process attach --pid ...
>
> Or you can launch:
>
> (lldb) file /path/to/binary
> (lldb) process launch -- arg1 arg2
>
> The platform will launch a lldb-server to debug your programs on the other
> system.
>
>
>
>
> The other is to just directly debug a process. In this case we don't go
> through the platform, we just start lldb-server on
>
> remote.foo.com% lldb-server gdbserver host.bar.com:2000 -- arg1 arg2
>
> Then attach to it:
>
> host.bar.com% lldb
> (lldb) file /path/to/binary
> (lldb) process connect connect://remote.foo.com:2000
>
> Now you will be stopped at the program entry point and ready to debug a
> single process.
>
> All of this is of course using the top of tree SVN sources. It will change
> a bit if you are using older sources.
>
> Greg
>
>
> > On Feb 24, 2015, at 6:09 AM, Abhishek Aggarwal <abhiinnitald at gmail.com>
> wrote:
> >
> > Hi All
> >
> > I am new to LLDB. I want to remotely debug some applications. Both the
> host and target OS is Linux.
> >
> > I went through few discussions in this list regarding remote debugging
> but I am still unclear about how to do it.
> > I could figure out from the discussions that there are 2 ways to do
> remote debugging: lldb-platform and lldb-gdbserver
> >
> > I don't know which one of them is fully functional for Linux. I would
> highly appreciate some comments here.
> >
> >
> > Thanks
> > Abhiinnit
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>



-- 

Vince Harron | Technical Lead Manager | vharron at google.com | 858-442-0868
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150224/8d2e4e65/attachment.html>


More information about the lldb-dev mailing list