Messages in this thread | | | Date | Tue, 8 Feb 2000 21:20:59 +0100 | From | "Andi Kleen" <> | Subject | Re: [PATCH] kdb v1.0 for 2.3.29 |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |