summaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2008-09-26 10:36:42 -0500
committerJason Wessel <jason.wessel@windriver.com>2008-09-26 10:36:42 -0500
commit703a1edcd1534468fc18f733c03bd91a65c8c6f0 (patch)
tree4861a7d6e8c600c8d872eb9f3336d6d91eeea614 /include/asm-x86
parent95dbf1dbe39ed336a3e72116c95cfa98dd3457e6 (diff)
downloadlinux-0-day-703a1edcd1534468fc18f733c03bd91a65c8c6f0.tar.gz
linux-0-day-703a1edcd1534468fc18f733c03bd91a65c8c6f0.tar.xz
kgdb, x86_64: fix PS CS SS registers in gdb serial
On x86_64 the gdb serial register structure defines the PS (also known as eflags), CS and SS registers as 4 bytes entities. This patch splits the x86_64 regnames enum into a 32 and 64 version to account for the 32 bit entities in the gdb serial packets. Also the program counter is properly filled in for the sleeping threads. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/kgdb.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h
index e86b3060bdcb9..94d63db103659 100644
--- a/include/asm-x86/kgdb.h
+++ b/include/asm-x86/kgdb.h
@@ -39,8 +39,9 @@ enum regnames {
GDB_FS, /* 14 */
GDB_GS, /* 15 */
};
+#define NUMREGBYTES ((GDB_GS+1)*4)
#else /* ! CONFIG_X86_32 */
-enum regnames {
+enum regnames64 {
GDB_AX, /* 0 */
GDB_BX, /* 1 */
GDB_CX, /* 2 */
@@ -58,18 +59,15 @@ enum regnames {
GDB_R14, /* 14 */
GDB_R15, /* 15 */
GDB_PC, /* 16 */
- GDB_PS, /* 17 */
};
-#endif /* CONFIG_X86_32 */
-/*
- * Number of bytes of registers:
- */
-#ifdef CONFIG_X86_32
-# define NUMREGBYTES 64
-#else
-# define NUMREGBYTES ((GDB_PS+1)*8)
-#endif
+enum regnames32 {
+ GDB_PS = 34,
+ GDB_CS,
+ GDB_SS,
+};
+#define NUMREGBYTES ((GDB_SS+1)*4)
+#endif /* CONFIG_X86_32 */
static inline void arch_kgdb_breakpoint(void)
{