[lldb-dev] gdb-remote command broken in TOT

Todd Fiala tfiala at google.com
Mon May 12 08:06:06 PDT 2014

Okay, looking back at your packet log: $#00 $qProcessInfo#dc $#00 $qProcessInfo#dc $#00

Couple options here:

1. implement qProcessInfo in your custom remote monitor.  The only
key-value pair we're looking for in this case is the pid:{process-id} pair
as far as retrieving the process id goes.  If you're in control of the
remote, this will be your fastest option for getting a resolution.

2. we find the gdbremote command present in the stock gdbremote protocol
set that gives us the process id (and this is not $qC) and fall back to
that if qProcessInfo is not supported.

I'll look for #2.  Probably best for you to implement $qProcessInfo if it's
an option for you.  RNBRemote.cpp has the handler for it in debugserver and
GDBRemoteCommunicationServer.cpp has it for llgs in that other branch from
the prior email (soon to go upstream).

Hope that helps!


On Mon, May 12, 2014 at 7:44 AM, Todd Fiala <tfiala at google.com> wrote:

> This is a change I made.
> qC is supposed to return the thread id, not the process id.
> qProcessInfo is being used now to collect the process id.  We added a
> fallback so that if the process info request fails, on Apple/iOS we fall
> back to the older qC (which, as indicated before, used to return the
> process id erroneously, see the gdb remote documentation).
> Let me know what path you're not getting the getting process info when you
> would expect it.  I've got some protocol tests on it in
> test/tools/lldb-gdbserver where it runs with a @debugserver_test (on
> MacOSX) and @llgs_test (on the llgs branch here<https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64>).
>  Sounds like we're maybe missing a case somewhere.
> Is the context that you're launching new inferior or an attaching to
> existing inferior?
> Thanks!
> -Todd
> On Mon, May 12, 2014 at 6:47 AM, Matthew Gardiner <mg11 at csr.com> wrote:
>>> Is this omission by design or is it a bug?
>> I've now found that GDBRemoteCommunicationClient::GetCurrentProcessID()
>> has been reworked recently, and that it what has caused the breakage I've
>> witnessed.
>> Matt
>> Member of the CSR plc group of companies. CSR plc registered in England
>> and Wales, registered number 4187346, registered office Churchill House,
>> Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
>> More information can be found at www.csr.com. Keep up to date with CSR
>> on our technical blog, www.csr.com/blog, CSR people blog,
>> www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook,
>> www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at
>> www.twitter.com/CSR_plc.
>> New for 2014, you can now access the wide range of products powered by
>> aptX at www.aptx.com.
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> --
> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180

Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140512/f0e42e32/attachment.html>

More information about the lldb-dev mailing list