--- zzzz-none-000/linux-2.4.17/drivers/char/sysrq.c 2001-12-21 17:41:54.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/drivers/char/sysrq.c 2004-11-24 13:23:25.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- linux-c -*- * - * $Id: sysrq.c,v 1.15 1998/08/23 14:56:41 mj Exp $ + * $Id: sysrq.c,v 1.1.1.1 2003/06/23 22:18:26 jharrell Exp $ * * Linux Magic System Request Key Hacks * @@ -31,6 +31,31 @@ #include #include +#ifdef CONFIG_KGDB_SYSRQ +#include +#define GDB_OP &kgdb_op +static struct sysrq_key_op kgdb_op={ + handler: (void*)breakpoint, + help_msg: "kGdb ", + action_msg: "Debug breakpoint\n", +}; + +#else +#define GDB_OP NULL +#endif +static void kill_current(int key, struct pt_regs *pt_regs, + struct kbd_struct *kbd, struct tty_struct *tty) +{ + printk("%-8s\n",current->comm); + force_sig(SIGKILL, current); + return; +} +static struct sysrq_key_op kill_current_op={ + handler: kill_current, + help_msg: "kill_Current", + action_msg: "Kill ", +}; + extern void reset_vc(unsigned int); extern struct list_head super_blocks; @@ -353,11 +378,11 @@ it is handled specially on the spark and will never arive */ /* b */ &sysrq_reboot_op, -/* c */ NULL, +/* c */ &kill_current_op, /* d */ NULL, /* e */ &sysrq_term_op, /* f */ NULL, -/* g */ NULL, +/* g */ GDB_OP, /* h */ NULL, /* i */ &sysrq_kill_op, /* j */ NULL,