[RFC] [Crash-utility] Patch to use gdb's bt in crash - works great with kgdb!

Vivek Goyal vgoyal at in.ibm.com
Wed Aug 30 20:40:32 UTC 2006


On Wed, Aug 30, 2006 at 12:35:21PM -0700, Piet Delaney wrote:
> > 
> > Simple question -- and to be quite honest with you -- I don't
> > understand why you wouldn't want to simply use gdb alone
> > in this case?
> 
> I don't see any reason for core file not to be read correctly by
> gdb. It's convenient to use gdb directly sometimes, for example
> while using the ddd GUI.
> 

You can run gdb to open core files as of today but the debugging
capability will be limited. For ex. kernel core headers have the info
of linearly mapped region only and they don't contain the virt address
info of non-linearly mapped regions. So one can not debug the non-linearly
mapped regions like modules.

> kgdb isn't having any problems with kernel threads back traces.
> The kernel objects are tweaked with dwarf code, but I see no
> problem with using the same paradigm with crash. Works great.
> 

Can you give some more details on what do you mean by kernel objects
are tweaked with dwarf code. 

> I'd prefer to have crash and ddd+gdb operate on kernel core files.
> 

You can already do that. Its just a matter of figuring out how to
get good backtraces both with "crash" as well as "gdb".

> Even better it would be nice to be able to simulate execution on
> a stack of a core file to be able to re-execute code that caused
> the crash. I frequently found it convenient after a panic to move
> the pc to the end of panic, and continue back up the stack to a 
> break point at the system call. Then I'd use the GUI to move the
> pc to before the execution of the system call and execute it again
> and watch how the return value was derived that caused the panic.
> 
> I expect that if you run a kgdb kernel, including the drarf code,
> that gdb will have no problem with core dumps. It's convenient to
> have kgdb configured in the kernel and have the option to continue
> analysis later with gdb/crash.
>

Is kgdb mainline? I think some time back Andrew had dropped the patches
from -mm too. I don't know if distros carry kgdb or not?  So not sure
for how many people will it be helpful to enable kgdb and then take
core dumps for better back traces.

I don't know much about tweaking objects with dwarf code but got a 
general question. Why can't it be an independent patch in kernel 
independent of kgdb. (If it helps in getting better backtraces.)

Thanks
Vivek
 




More information about the Crash-utility mailing list