[OpenAFS-devel] Linux debug symbols for kernel modules and cache manager

Derrick Brashear shadow@gmail.com
Fri, 15 Oct 2010 14:07:29 -0400


On Fri, Oct 15, 2010 at 12:10 PM, Marc Dionne <marc.c.dionne@gmail.com> wro=
te:
> On Fri, Oct 15, 2010 at 10:02 AM, Edgecombe, Jason <jwedgeco@uncc.edu> wr=
ote:
>> Understood. I still need the kernel modules debug symbols for my purpose=
s... however I can get them. Patches may come later.
>>
>> Thanks,
>> Jason
>
> You can pass the --enable-debug-kernel to configure, which should add
> -g at the right places while building the kernel module. =A0I typically
> always configure with --enable-debug (for userspace) and
> --enable-kernel-debug.
>
> Your kernel build system may also automatically add -g if
> CONFIG_DEBUG_INFO is set in the kernel .config that's installed with
> the kernel-devel package. =A0For instance on a RHEL 5 system I just
> looked at, this is the case, so you will always get debugging symbols
> in the module even without --enable-kernel-debug.

As to packaging:
http://fedoraproject.org/wiki/Packaging/Debuginfo

Also of note, needed is:
%defattr(644,root,root,755)

"Kernel modules shall not be executable -- but they need to be after
%install to allow /usr/lib/rpm/find-debuginfo.sh to strip them."

So it's possibly the case that this would work:
http://gerrit.openafs.org/2992


--=20
Derrick