[Lldb-commits] [PATCH] Changes the hardcoded loading of ARM registers to moved from gdb-remote and fixes an issue with the $g packet where the data is thrown away with size mismatch

Greg Clayton gclayton at apple.com
Wed Jul 30 17:46:29 PDT 2014

Please don't change GDBRemoteDynamicRegisterInfo::HardcodeARMRegisters(). The ABI registers looks similar but there are major difference and many registers are completely different. Also the copy you removed had all of the RegisterInfo.value_regs fields filled in correctly.

The hardcode ARM registers was only ever supposed to work for legacy iOS "debugserver" binaries and are very specific and describe the exact data layout of the registers from these legacy debugserver binaries.

The correct way to support a target that doesn't report its own registers is to create a target definition a python file. See examples in:


Then you can set the target definition file using:

(lldb) settings set plugin.process.gdb-remote.target-definition-file /path/to/foo_target_definiton.py

The ABI will never know the exact layout of registers for any GDB server that might be used and is the wrong place to define registers. It can know about DWARF registers and it is currently only used to try and dump debug info that has DWARF or compiler register numbers in them.

The patch should not be committed.


> On Jul 25, 2014, at 10:25 AM, Deepak Panickal <deepak2427 at gmail.com> wrote:
> Abid,
> You're right. That should be replaced to looping through registers one by one and marking them valid.
> I'll modify it.
> Thanks,
> Deepak Panickal
> http://reviews.llvm.org/D4669
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

More information about the lldb-commits mailing list