summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/gdb_machdep.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-02-05 21:48:32 +0000
committerjhb <jhb@FreeBSD.org>2007-02-05 21:48:32 +0000
commitadbe57597a8aff4390948e11531bd035ce004c4d (patch)
tree700d1f45eb20d1b8cacb2880b7775ec99fdae6ec /sys/amd64/include/gdb_machdep.h
parentabb828c3b92d450537f90a8ae91a584752b4d115 (diff)
downloadFreeBSD-src-adbe57597a8aff4390948e11531bd035ce004c4d.zip
FreeBSD-src-adbe57597a8aff4390948e11531bd035ce004c4d.tar.gz
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
Diffstat (limited to 'sys/amd64/include/gdb_machdep.h')
-rw-r--r--sys/amd64/include/gdb_machdep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/include/gdb_machdep.h b/sys/amd64/include/gdb_machdep.h
index d007eef..d8c25b9 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
OpenPOWER on IntegriCloud