Commit 7459093a authored by Tom Rini's avatar Tom Rini Committed by David Woodhouse

[PPC32] Add SysRq-G support to our KGDB stub.

From David Woodhouse <dwmw2@infradead.org>.
parent 0baa6250
...@@ -105,6 +105,8 @@ ...@@ -105,6 +105,8 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/sysrq.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -855,3 +857,23 @@ kgdb_output_string (const char* s, unsigned int count) ...@@ -855,3 +857,23 @@ kgdb_output_string (const char* s, unsigned int count)
return 1; return 1;
} }
#endif #endif
static void sysrq_handle_gdb(int key, struct pt_regs *pt_regs,
struct tty_struct *tty)
{
printk("Entering GDB stub\n");
breakpoint();
}
static struct sysrq_key_op sysrq_gdb_op = {
.handler = sysrq_handle_gdb,
.help_msg = "Gdb",
.action_msg = "GDB",
};
static int gdb_register_sysrq(void)
{
printk("Registering GDB sysrq handler\n");
register_sysrq_key('g', &sysrq_gdb_op);
return 0;
}
module_init(gdb_register_sysrq);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment