[Crash-utility] Re: source line numbers and modules (on x86_64)

Dave Anderson anderson at redhat.com
Thu May 1 00:21:36 UTC 2008


Mike Snitzer wrote:
> On Wed, Apr 30, 2008 at 7:41 PM, Dave Anderson <anderson at redhat.com> wrote:
>   
>> Mike Snitzer wrote:
>>
>>     
>>> On Wed, Apr 30, 2008 at 6:43 PM, Dave Anderson <anderson at redhat.com>
>>>       
>
>   
>>>>  Anyway, there are no kernel patches applied to RHEL5 kernels
>>>>  to make it work that I'm aware of.  That being said, I don't
>>>>  have an answer as to why they don't work for modules on your
>>>>  custom kernel (or why they don't work in RHEL4 kernels...).
>>>>
>>>>
>>>>         
>>> I configured my x86_64 kernel to be relocatable.  Could this be the
>>> reason for modules' line number debug data being off?  From:
>>> http://people.redhat.com/anderson/crash.changelog.html#4_0_4_5
>>>
>>> "Using /proc/kallsyms or a --reloc=[size] as a command line argument
>>>  is similar to using a System.map file, in that it results in the loss
>>>  of the use of line number debug data."
>>>
>>>
>>>       
>>  No, that particular issue only applies to the base kernel, and is
>> irrelevant with respect to modules.
>>  (Note that the RHEL5 kernel is relocatable as well.)
>>     
>
> OK, yeah making the base kernel non-relocatable didn't help.
>
>   
>>  What you might confirm is whether you're getting any debuginfo data when
>> you load the module?  Are you sure that your modules are being built with -g?
>>     
>
> How would I confirm that I'm getting debuginfo data when I 'mod -s
> ext3'?  I'm using an spec file that is based heavily (at least
> relative to debuginfo) on the redhat kernel-2.6.spec but I'll have to
> verify that I'm building with -g...
>
> Mike
>   

So your build procedure ends up with a kernel-debuginfo package that 
contains
a set of "split" <module-name>.ko.debug files?  If you take the module 
filename
displayed after the "mod -s" is done, and run it through "readelf -a", 
you'll see
a .gnu_debuglink section.  That /lib/modules/<path-to>/module.ko module 
will have
a link to its partner in 
/usr/lib/debug/lib/modules/<path-to>/module.ko.debug.

Dave

 




More information about the Crash-utility mailing list