[lldb-dev] debug server help

Carlo Kok ck at remobjects.com
Fri Sep 14 11:50:28 PDT 2012


Op 14-9-2012 20:35, Greg Clayton schreef:
> Carlo,
>
> You are trying to connect to a GDB server (which only debugs 1 app)
> with a client that is expecting a GDB remote _platform_. A platform
> can list, launch and attach to processes, upload/download files, it
> does NOT debug. There is a tool in the LLDB sources in
> lldb/tools/lldb-platform which implements a lldb-platform. It is not
> ready to be used yet, we have a platform branch where ongoing work is
> happening:
>
> svn co
> http://llvm.org/svn/llvm-project/lldb/branches/lldb-platform-work
> lldb-platform
>
> So we have done a lot of work to start getting the platforms to work
> as expected.
>
> If you just want to debug, you want to use "process connect" to
> connect to a process that you want to debug, not a platform. See the
> CommandObjectProcessConnect::DoExecute() function to see how this is
> done. Basically if you connect to a remote debugserver and it already
> has a process it will be good to go. When you use "process connect",
> it is expected that everything you need to debug is already on the
> remote host.
>
> So to sum up "platform connect" (see CommandObjectPlatformConnect) is
> what you tried to do.
>
> Here are some ways you can step through the existing LLDB driver code
> to see things working:
>
> mac% %
> /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/debugserver
> localhost:3333 -- /bin/ls -lAF /tmp/ debugserver-194 for x86_64.
> Listening to port 12345...
>
> Now on your windows machine:
>
> lldb.exe (lldb) platform select remote-macosx (lldb) target create
> --arch x86_64-apple-macosx a.out (lldb) process connect
> connect://192.168.178.2:3333
>
> Does this make sense?
>

It does now, thanks... Is there something that should how to proceed 
from there? (from code or from lldb cmdline)? (ie what's the next step 
in debugging , get the process, do the first step, work with symbols?, 
not asking for all of them, just a starting point)

--
Carlo Kok





More information about the lldb-dev mailing list