lkml.org 
[lkml]   [2004]   [Feb]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 27 Feb 2004 14:49:36 -0800
FromGeorge Anzinger <>
SubjectRe: [Kgdb-bugreport] [KGDB PATCH][3/7] SysRq-G
There may be a need to change the keyboard driver for this.  I have had trouble 
with it in the past.  Seems it doesn't like to not get control back for a very 
long time.  I am not sure what the problem is but, be warned.

-g

Tom Rini wrote:
> Hello.  The following adds SysRq-G.  This is always configured in on
> CONFIG_KGDB && CONFIG_SYSRQ.
> 
> diff -zrupN linux-2.6.3+config+serial/drivers/char/sysrq.c linux-2.6.3+config+serial+sysrq+arch_hooks/drivers/char/sysrq.c
> --- linux-2.6.3+config+serial/drivers/char/sysrq.c	2004-02-27 12:06:22.000000000 -0700
> +++ linux-2.6.3+config+serial+sysrq+arch_hooks/drivers/char/sysrq.c	2004-02-27 12:16:14.000000000 -0700
> @@ -31,6 +31,7 @@
>  #include <linux/suspend.h>
>  #include <linux/writeback.h>
>  #include <linux/buffer_head.h>		/* for fsync_bdev() */
> +#include <linux/kgdb.h>			/* for breakpoint() */
> 
>  #include <linux/spinlock.h>
> 
> @@ -44,6 +45,25 @@ int sysrq_enabled = 1;
>  /* Machine specific power off function */
>  void (*sysrq_power_off)(void);
> 
> +/* Make a breakpoint() right now. */
> +#ifdef CONFIG_KGDB
> +#define  GDB_OP &kgdb_op
> +static void kgdb_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty)
> +{
> +	printk("kgdb sysrq\n");
> +	breakpoint();
> +}
> +
> +static struct sysrq_key_op kgdb_op = {
> +	.handler	= kgdb_sysrq,
> +	.help_msg	= "kGdb|Fgdb",
> +	.action_msg	= "Debug breakpoint\n",
> +};
> +
> +#else
> +#define  GDB_OP NULL
> +#endif
> +
>  /* Loglevel sysrq handler */
>  static void sysrq_handle_loglevel(int key, struct pt_regs *pt_regs,
>  				  struct tty_struct *tty) 
> @@ -239,7 +259,7 @@ static struct sysrq_key_op *sysrq_key_ta
>  /* d */	NULL,
>  /* e */	&sysrq_term_op,
>  /* f */	NULL,
> -/* g */	NULL,
> +/* g */	GDB_OP,
>  /* h */	NULL,
>  /* i */	&sysrq_kill_op,
>  /* j */	NULL,
> 

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [from the cache]
©2003-2008