kdb
[Top] [All Lists]

Re: [PATCH] kdb v1.0 for 2.3.29

To: ak@xxxxxxx (Andi Kleen)
Subject: Re: [PATCH] kdb v1.0 for 2.3.29
From: slurn@xxxxxxxxxxxxxxxxxxxx (Scott Lurndal)
Date: Tue, 8 Feb 2000 12:22:53 -0800 (PST)
Cc: ak@xxxxxxx (Andi Kleen), linux-kernel@xxxxxxxxxxxxxxxx, kdb@xxxxxxxxxxx
In-reply-to: <20000208212059.A13316@gruyere.muc.suse.de> from "Andi Kleen" at Feb 08, 2000 09:20:59 PM
Sender: owner-kdb@xxxxxxxxxxx
> 
> On Tue, Feb 08, 2000 at 11:43:23AM -0800, Scott Lurndal wrote:
> > > 
> > > On Tue, Feb 01, 2000 at 09:03:23AM -0800, Scott Lurndal wrote:
> > > > This release restructures the code a bit and adds breakpoint
> > > > instruction style (int 03) breakpoints.   They don't completely
> > > > work yet at this time, so as a workaround, the 'bph' command
> > > > which uses the hardware debug registers should be used to
> > > > establish breakpoints.
> > > > 
> > > > There is some debug code present to save and display the contents of the
> > > > last branch register MSR on page-fault entry to the kernel.
> > > > 
> > > > A list of changes and features can be found on
> > > 
> > > [...]
> > > 
> > > One change that I'm missing is a move of the module add code to above
> > > the module init constructor call. That makes it possible to debug
> > > crashing init_module() functions symbolically. 
> > 
> > Ok.  I'll do that.   However, by moving kdb_init() before mem_init(), 
> > kdb cannot use the kernel memory allocators (It doesn't anyway, because
> > it cannot trust them, and you wouldn't be able to debug them).
> 
> There must be some miscomunication. I was not proposing to change the
> kernel startup (everything is statically linked there thus all symbols
> are known anyways). What I want to change is the module loading
> (kernel/module.c:sys_init_module()). Currently the symbols for the module
> are registered to kdb after the module's init_module() function has 
> run. This means you don't get a meaningfull backtrace if the init_module()
> function crashes for some reason. The change I did was to move 
> the kdbaddmodsym() loop before the mod->init() call (and add a appropiate
> cleanup loop if mod->init() fails). This way it is possible to debug
> the module constructor. 
> 
> -Andi
> 

Ah.  I assumed you meant before the call to "init_modules()" in 
main.c

I'll do as you suggest.

Danke, 

scott

<Prev in Thread] Current Thread [Next in Thread>