This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: No line number info debugging kernel modules with gdb 6.6.90.20070926-cvs (gdb 6.7 branch)
- From: Jim Blandy <jimb at codesourcery dot com>
- To: ringlej <ringlej at ringle dot org>
- Cc: Jon Ringle <jon at ringle dot org>, Jon Ringle <JRingle at vertical dot com>, gdb at sourceware dot org
- Date: Tue, 02 Oct 2007 13:25:58 -0700
- Subject: Re: No line number info debugging kernel modules with gdb 6.6.90.20070926-cvs (gdb 6.7 branch)
- References: <4DD3AF7ECBBC43409BA36508938D01851B00AE@CVAEX1.VERTICAL.COM> <m3d4w3lkkb.fsf@codesourcery.com> <46FC7961.2080706@ringle.org> <m3odfmqysb.fsf@codesourcery.com> <46FD72CE.9080603@ringle.org> <m3ejgie4fc.fsf@codesourcery.com> <20070929002707.GA6310@caradoc.them.org>
Daniel Jacobowitz <drow at false.org> writes:
> On Fri, Sep 28, 2007 at 04:49:43PM -0700, Jim Blandy wrote:
>> Okay. Some of the line table entries have been relocated into the
>> module's actual range (0xbf13100 on up), but others still look to me
>> like offsets within the .ko. Can you post the output from running
>> 'readelf -wil' on your .ko file?
>
> add-symbol-file doesn't relocate everything. You have to give it a
> separate value for every section.
Where does this relocation happen? By the time PSYMTAB_TO_SYMTAB
returns the job should be done; all I see happening in dwarf2read.c or
end_symtab is:
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
and then that gets applied to everything. For variables we do consult
other section offsets, but not for lines or functions.