diff options
| author | Jason Wessel <jason.wessel@windriver.com> | 2008-09-26 11:36:42 -0400 |
|---|---|---|
| committer | Jason Wessel <jason.wessel@windriver.com> | 2008-09-26 11:36:42 -0400 |
| commit | 703a1edcd1534468fc18f733c03bd91a65c8c6f0 (patch) | |
| tree | 4861a7d6e8c600c8d872eb9f3336d6d91eeea614 /include | |
| parent | 95dbf1dbe39ed336a3e72116c95cfa98dd3457e6 (diff) | |
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')
| -rw-r--r-- | include/asm-x86/kgdb.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h index e86b3060bdcb..94d63db10365 100644 --- a/include/asm-x86/kgdb.h +++ b/include/asm-x86/kgdb.h | |||
| @@ -39,8 +39,9 @@ enum regnames { | |||
| 39 | GDB_FS, /* 14 */ | 39 | GDB_FS, /* 14 */ |
| 40 | GDB_GS, /* 15 */ | 40 | GDB_GS, /* 15 */ |
| 41 | }; | 41 | }; |
| 42 | #define NUMREGBYTES ((GDB_GS+1)*4) | ||
| 42 | #else /* ! CONFIG_X86_32 */ | 43 | #else /* ! CONFIG_X86_32 */ |
| 43 | enum regnames { | 44 | enum regnames64 { |
| 44 | GDB_AX, /* 0 */ | 45 | GDB_AX, /* 0 */ |
| 45 | GDB_BX, /* 1 */ | 46 | GDB_BX, /* 1 */ |
| 46 | GDB_CX, /* 2 */ | 47 | GDB_CX, /* 2 */ |
| @@ -58,18 +59,15 @@ enum regnames { | |||
| 58 | GDB_R14, /* 14 */ | 59 | GDB_R14, /* 14 */ |
| 59 | GDB_R15, /* 15 */ | 60 | GDB_R15, /* 15 */ |
| 60 | GDB_PC, /* 16 */ | 61 | GDB_PC, /* 16 */ |
| 61 | GDB_PS, /* 17 */ | ||
| 62 | }; | 62 | }; |
| 63 | #endif /* CONFIG_X86_32 */ | ||
| 64 | 63 | ||
| 65 | /* | 64 | enum regnames32 { |
| 66 | * Number of bytes of registers: | 65 | GDB_PS = 34, |
| 67 | */ | 66 | GDB_CS, |
| 68 | #ifdef CONFIG_X86_32 | 67 | GDB_SS, |
| 69 | # define NUMREGBYTES 64 | 68 | }; |
| 70 | #else | 69 | #define NUMREGBYTES ((GDB_SS+1)*4) |
| 71 | # define NUMREGBYTES ((GDB_PS+1)*8) | 70 | #endif /* CONFIG_X86_32 */ |
| 72 | #endif | ||
| 73 | 71 | ||
| 74 | static inline void arch_kgdb_breakpoint(void) | 72 | static inline void arch_kgdb_breakpoint(void) |
| 75 | { | 73 | { |
