[lldb-dev] gdb-remote command broken in TOT
mg11 at csr.com
Tue May 13 00:50:12 PDT 2014
Todd Fiala 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).
After doing a bit more analysis, I see that you added a fallback such
that if the process info request fails, we fall back to traditional
gdbserver qC. This is completely reasonable, and permits our custom
stubs to support qProcessInfo.
However is there any real need to restrict the fallback case to just
Apple/iOS? that is:
const llvm::Triple &triple = GetProcessArchitecture().GetTriple();
if ((triple.getVendor() == llvm::Triple::Apple) &&
(triple.getOS() == llvm::Triple::IOS))
Surely, all stubs which fail to implement qProcessInfo should be
permitted to fallback to qC?
I've just commented out the above "if" in my working copy, and now the
initial "gdb-remote host:port" works again - in so far as the current
inferior process number is reported rather than 0. (Admittedly other
things don't quite work as desired later on in the debug-session, e.g.
"next". But presumably an Apple/iOS stub would either fail similarly, or
work as expected due to some localised conditional treatment, (i.e. "if
So, to continue to interoperate with traditional gdbserver
implementations can we let all older stubs continue to fallback to qC?
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.
More information about the lldb-dev