diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-26 19:25:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:36 -0400 |
commit | 63ab25ebbc50f74550bd8d164a34724b498f6fb9 (patch) | |
tree | 5753779e8ba6413174ee224286eabc18c2e9c6ee /arch | |
parent | 3cea45c6ef459b776123a4855eba6dafd506f3ce (diff) |
kgdbts: unify/generalize gdb breakpoint adjustment
The Blackfin arch, like the x86 arch, needs to adjust the PC manually
after a breakpoint is hit as normally this is handled by the remote gdb.
However, rather than starting another arch ifdef mess, create a common
GDB_ADJUSTS_BREAK_OFFSET define for any arch to opt-in via their kgdb.h.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Dongdong Deng <dongdong.deng@windriver.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/include/asm/kgdb.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/kgdb.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/kgdb.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/kgdb.h b/arch/blackfin/include/asm/kgdb.h index 3ac0c72e9fee..aaf884591b07 100644 --- a/arch/blackfin/include/asm/kgdb.h +++ b/arch/blackfin/include/asm/kgdb.h | |||
@@ -108,6 +108,7 @@ static inline void arch_kgdb_breakpoint(void) | |||
108 | #else | 108 | #else |
109 | # define CACHE_FLUSH_IS_SAFE 1 | 109 | # define CACHE_FLUSH_IS_SAFE 1 |
110 | #endif | 110 | #endif |
111 | #define GDB_ADJUSTS_BREAK_OFFSET | ||
111 | #define HW_INST_WATCHPOINT_NUM 6 | 112 | #define HW_INST_WATCHPOINT_NUM 6 |
112 | #define HW_WATCHPOINT_NUM 8 | 113 | #define HW_WATCHPOINT_NUM 8 |
113 | #define TYPE_INST_WATCHPOINT 0 | 114 | #define TYPE_INST_WATCHPOINT 0 |
diff --git a/arch/sh/include/asm/kgdb.h b/arch/sh/include/asm/kgdb.h index 4235e228d921..f3613952d1ae 100644 --- a/arch/sh/include/asm/kgdb.h +++ b/arch/sh/include/asm/kgdb.h | |||
@@ -34,5 +34,6 @@ static inline void arch_kgdb_breakpoint(void) | |||
34 | 34 | ||
35 | #define CACHE_FLUSH_IS_SAFE 1 | 35 | #define CACHE_FLUSH_IS_SAFE 1 |
36 | #define BREAK_INSTR_SIZE 2 | 36 | #define BREAK_INSTR_SIZE 2 |
37 | #define GDB_ADJUSTS_BREAK_OFFSET | ||
37 | 38 | ||
38 | #endif /* __ASM_SH_KGDB_H */ | 39 | #endif /* __ASM_SH_KGDB_H */ |
diff --git a/arch/x86/include/asm/kgdb.h b/arch/x86/include/asm/kgdb.h index 396f5b5fc4d7..77e95f54570a 100644 --- a/arch/x86/include/asm/kgdb.h +++ b/arch/x86/include/asm/kgdb.h | |||
@@ -77,6 +77,7 @@ static inline void arch_kgdb_breakpoint(void) | |||
77 | } | 77 | } |
78 | #define BREAK_INSTR_SIZE 1 | 78 | #define BREAK_INSTR_SIZE 1 |
79 | #define CACHE_FLUSH_IS_SAFE 1 | 79 | #define CACHE_FLUSH_IS_SAFE 1 |
80 | #define GDB_ADJUSTS_BREAK_OFFSET | ||
80 | 81 | ||
81 | extern int kgdb_ll_trap(int cmd, const char *str, | 82 | extern int kgdb_ll_trap(int cmd, const char *str, |
82 | struct pt_regs *regs, long err, int trap, int sig); | 83 | struct pt_regs *regs, long err, int trap, int sig); |