[Bug gdb/25162] [GDB, kgdb] gdb 8.3.1 truncated register in remote g packet

reinoudkoornstra at gmail dot com sourceware-bugzilla@sourceware.org
Thu Nov 7 01:19:00 GMT 2019


--- Comment #14 from Reinoud Koornstra <reinoudkoornstra at gmail dot com> ---
(In reply to Luis Machado from comment #13)
> Right, that looks correct. If you can figure out what exactly it is sending
> back, then we'll have our answer on why the g packet appears truncated from
> GDB's point of view.

Ok, the issue was in kgdb.h, NUMREGBYTES is used to say how much registers we
send back. This fix works nicely:
-- linux/arch/arm/include/asm/kgdb.h.orig     2019-11-06 15:43:38.675106693
+++ linux/arch/arm/include/asm/kgdb.h  2019-11-06 15:44:26.981122575 -0800
@@ -76,7 +76,7 @@

#define KGDB_MAX_NO_CPUS       1
#define BUFMAX                 400
-#define NUMREGBYTES            (DBG_MAX_REG_NUM << 2)
+#define NUMREGBYTES            (GDB_MAX_REGS << 2)
#define NUMCRITREGBYTES                (32 << 2)

#define _R0                    0

Please note that this is in the linux 3.14 kernel and is no longer maintained.
I'll attach the gdb 8.3.1 output as tar ball for your verification.


You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list