[lldb-dev] Remote debugging with lldb

Filipe Cabecinhas filcab+lldb-dev at gmail.com
Wed Aug 24 18:11:42 PDT 2011


Hi,

I'm trying to do remote debugging with lldb, but I keep running into
problems.

How should I do it?

I tried running "debugserver localhost:42000" and then, on the lldb client:

platform select (remote-macosx | remote-gdb-server?) + platform connect?
platform select … + process connect?

Should I have the executable on both machines? Do I just need it on the lldb
machine and lldb sends it to the server? Do I just need it on the server?

That's good for the most basic case: client and server on Mac OS X.

Now, what about some different combinations?
debugserver on macosx + client on linux?
debugserver on Linux + client on macosx?
gdbserver on "any" machine + client on macosx? Which programs would be
supported?

I would suppose you need the plugins for the combinations you want to use,
but with the gdb-remote stuff, I'm getting confused.

In lldb_private::Initialize(), we initialize several plugins, depending on
the operating system. I'm supposing the DynamicLoader and Process plugins
(along with some others) are only needed when running as host, otherwise, we
couldn't, on Linux, debug a FreeBSD or Mac OS X target (since their
initialization gets ifdeffed out).

I saw that, on Mac OS X, lldb spawns a debugserver that runs the program and
they communicate using the plugin ProcessGDBRemote (another question: Why is
that plug-in only started on Mac OS X? It has to run on the host, but
otherwise I didn't see much platform-specific stuff (I just skimmed the
file)). Shouldn't that Process plugin be also used with a
PlatformRemoteGDBServer?

Thanks, in advance, for the reply,nbsp; Filipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20110824/c5da1a55/attachment.html>


More information about the lldb-dev mailing list