Re: software breakpoint

"Randy.Dunlap" <[email protected]>
Newsgroups gmane.linux.kernel.debugging
Organization YPO4
Message-ID <[email protected]>
On Tue, 15 May 2007 14:52:52 +1000 Keith Owens wrote:

> "Randy.Dunlap" (on Mon, 14 May 2007 16:35:19 -0700) wrote:
> >I tried to use KDB_ENTER() in a kernel init function,
> >specifically, in net/core/netpoll.c::netpoll_setup(), which is
> >called from drivers/net/netconsole.c::init_netconsole().
> >
> >kdb didn't break/trap.  The kernel just printed a message
> >similar to:
> >
> >do_IRQ: 0.129 no handler
> >
> >Am I trying to break before kdb is ready to be used or what?
> 
> arch/i386/kdb/kdbasupport::kdba_late_init() sets up the interrupt gate
> for KDBENTER_VECTOR (129).  kdba_late_init() is defined as __initcall,
> init_netconsole is module_init which also maps to __initcall.  Booting
> with initcall_debug shows netconsole being initialized before kdba_late_init.
> 
> >Any suggestions?
> 
> Apply this patch, it will be rolled into the next kdb patch set, along
> with an x86_64 equivalent.

Ack, I needed it for x86_64 and it's working now.
Thanks, Keith.

> Index: linux/arch/i386/kdb/kdbasupport.c
> ===================================================================
> --- linux.orig/arch/i386/kdb/kdbasupport.c	2007-05-15 14:50:28.271496876 +1000
> +++ linux/arch/i386/kdb/kdbasupport.c	2007-05-15 14:49:30.786998513 +1000
> @@ -1010,7 +1010,7 @@ kdba_verify_rw(unsigned long addr, size_
>  }
>  
>  static int __init
> -kdba_late_init(void)
> +kdba_arch_init(void)
>  {
>  #ifdef	CONFIG_SMP
>  	set_intr_gate(KDB_VECTOR, kdb_interrupt);
> @@ -1019,7 +1019,7 @@ kdba_late_init(void)
>  	return 0;
>  }
>  
> -__initcall(kdba_late_init);
> +arch_initcall(kdba_arch_init);
>  
>  #ifdef	CONFIG_SMP
>  
> 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.