gdb 8.3.1 truncated register in remote g packet
Luis Machado
luis.machado@linaro.org
Mon Nov 4 14:48:00 GMT 2019
On 11/2/19 9:07 PM, Reinoud Koornstra wrote:
>
>
>
> I'm not sure why an arm-targeted gdb would not complain about loading a
> x86-target vmlinux image. That sounds off.
>
> The vmlinux was compiled for arm, the thing that surprised me that the
> x64 gdb didn't complain about it. The arm gdb didn't complain either
> which was logical.
>
> You could try with an older arm gdb to see if it works fine. If it does
> and the latest version doesn't, then we may need to investigate it.
>
> Ok, I'll compile and older gdb for arm and let you know.
>
>
> I checked the code and the truncation message is a result of the
> debugging stub sending less bytes than GDB expects for the register set.
>
> The interesting thing is that the incompatible gdb for x86-64 was able
> to read the message and the gdb for arm wasn't, but i'll try with an
> older gdb for arm, but it's weird.
You might have gotten lucky. Or GDB wasn't too restrictive on the checks.
>
> Just to confirm, does your arm target have floating point registers?
>
> Good point, I did assume it has, because in some cases armeabihf was
> used to compile, but not in all cases, I'll check whether it is,
> otherwise I'd have to recompile gdb without hf.
> I'll get the info and let you know, thanks for helping out!
Well, it seems GDB assumes floating point registers are there by
default, so there wouldn't be a need to build GDB specifically for that.
More information about the Gdb
mailing list