From adbe57597a8aff4390948e11531bd035ce004c4d Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 5 Feb 2007 21:48:32 +0000 Subject: [PATCH] Change GDB_BUFSZ to be large enough to hold a register dump where each register takes 16 characters (64-bit register in hex). In practice this is a slight bit of overkill as 7 of the 56 registers are only 32-bit, but having the buffer too small results in remote kgdb trashing kernel memory when it connects. PR: amd64/108673 Submitted by: Ravi Murty, Nikhil Rao @ Intel MFC after: 3 days --- sys/amd64/include/gdb_machdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/include/gdb_machdep.h b/sys/amd64/include/gdb_machdep.h index d007eef40526..d8c25b90fea6 100644 --- a/sys/amd64/include/gdb_machdep.h +++ b/sys/amd64/include/gdb_machdep.h @@ -29,7 +29,7 @@ #ifndef _MACHINE_GDB_MACHDEP_H_ #define _MACHINE_GDB_MACHDEP_H_ -#define GDB_BUFSZ 500 +#define GDB_BUFSZ (GDB_NREGS * 16) #define GDB_NREGS 56 #define GDB_REG_PC 16