diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 14:08:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 14:08:05 -0400 |
commit | 90b9a32d8f441369b2f97a765d2d957b531eb653 (patch) | |
tree | 3146d251a983ba12226e75c121613de6f051af8b /arch/powerpc/kernel/kgdb.c | |
parent | 8b108c609adefd98577c35f0a41497a610041a6c (diff) | |
parent | 4402c153cb9c549cd21d6007ef0dfac50c8d148d (diff) |
Merge branch 'kdb-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
* 'kdb-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb: (25 commits)
kdb,debug_core: Allow the debug core to receive a panic notification
MAINTAINERS: update kgdb, kdb, and debug_core info
debug_core,kdb: Allow the debug core to process a recursive debug entry
printk,kdb: capture printk() when in kdb shell
kgdboc,kdb: Allow kdb to work on a non open console port
kgdb: Add the ability to schedule a breakpoint via a tasklet
mips,kgdb: kdb low level trap catch and stack trace
powerpc,kgdb: Introduce low level trap catching
x86,kgdb: Add low level debug hook
kgdb: remove post_primary_code references
kgdb,docs: Update the kgdb docs to include kdb
kgdboc,keyboard: Keyboard driver for kdb with kgdb
kgdb: gdb "monitor" -> kdb passthrough
sparc,sunzilog: Add console polling support for sunzilog serial driver
sh,sh-sci: Use NO_POLL_CHAR in the SCIF polled console code
kgdb,8250,pl011: Return immediately from console poll
kgdb: core changes to support kdb
kdb: core for kgdb back end (2 of 2)
kdb: core for kgdb back end (1 of 2)
kgdb,blackfin: Add in kgdb_arch_set_pc for blackfin
...
Diffstat (limited to 'arch/powerpc/kernel/kgdb.c')
-rw-r--r-- | arch/powerpc/kernel/kgdb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index 41bada0298c8..82a7b228c81a 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
21 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/kdebug.h> | ||
23 | #include <asm/current.h> | 24 | #include <asm/current.h> |
24 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
25 | #include <asm/machdep.h> | 26 | #include <asm/machdep.h> |
@@ -115,7 +116,8 @@ void kgdb_roundup_cpus(unsigned long flags) | |||
115 | /* KGDB functions to use existing PowerPC64 hooks. */ | 116 | /* KGDB functions to use existing PowerPC64 hooks. */ |
116 | static int kgdb_debugger(struct pt_regs *regs) | 117 | static int kgdb_debugger(struct pt_regs *regs) |
117 | { | 118 | { |
118 | return kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs); | 119 | return !kgdb_handle_exception(1, computeSignal(TRAP(regs)), |
120 | DIE_OOPS, regs); | ||
119 | } | 121 | } |
120 | 122 | ||
121 | static int kgdb_handle_breakpoint(struct pt_regs *regs) | 123 | static int kgdb_handle_breakpoint(struct pt_regs *regs) |
@@ -123,7 +125,7 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs) | |||
123 | if (user_mode(regs)) | 125 | if (user_mode(regs)) |
124 | return 0; | 126 | return 0; |
125 | 127 | ||
126 | if (kgdb_handle_exception(0, SIGTRAP, 0, regs) != 0) | 128 | if (kgdb_handle_exception(1, SIGTRAP, 0, regs) != 0) |
127 | return 0; | 129 | return 0; |
128 | 130 | ||
129 | if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr)) | 131 | if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr)) |
@@ -309,6 +311,11 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
309 | (unsigned long)(((void *)gdb_regs) + NUMREGBYTES)); | 311 | (unsigned long)(((void *)gdb_regs) + NUMREGBYTES)); |
310 | } | 312 | } |
311 | 313 | ||
314 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) | ||
315 | { | ||
316 | regs->nip = pc; | ||
317 | } | ||
318 | |||
312 | /* | 319 | /* |
313 | * This function does PowerPC specific procesing for interfacing to gdb. | 320 | * This function does PowerPC specific procesing for interfacing to gdb. |
314 | */ | 321 | */ |