[Crash-utility] [PATCH] Read in .debug_frame section of vmlinux

Dave Anderson anderson at redhat.com
Mon Nov 29 15:26:28 UTC 2010


----- "Wang Chao" <wang.chao at cn.fujitsu.com> wrote:

> Hi Dave and all,
> 
> The attached patch read the .debug_frame section of vmlinux into
> crash. By doing this, we could backtrace kernel stack frame using
> dwarf unwind information contained in that section.
> 
> ChangeLog:
> - Modified section_header_info() function to initialize the offset
>   and size of .debug_frame section.
> - Modified init_unwind_table() function to read in .debug_frame.
> - Modified the prototype of unwind(), adding a int argument to
>   indicate whether .eh_frame or .debug_frame is used. Also there're
>   a few changes due to the difference between these two sections.
> 
> Well, it's the first time I came to crash utility, and I hope that
> I didn't do anything wrong.
> 
> Thanks,
> Wang Chao

Hello Wang,

The dwarf-based backtrace code is suffering from bit-rot, and in testing
with your patch, I'm seeing a few problems with it on certain kernels,
where several backtraces of active tasks either fail, display strange
frames, show the same frame twice, or just miss frames entirely.  
(which is why I kept the two possible x86_64 backtrace facilities
separate...)  

But it seems to work for the most part, whereas before it could not
even attempt the backtrace.

So anyway, given that the patch does not affect the default backtrace path,
it seems safe enough to add your patch for those users who wish to run
with "unwind" turned on. 

Thanks,
  Dave




More information about the Crash-utility mailing list