This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: No line number info debugging kernel modules with gdb 6.6.90.20070926-cvs (gdb 6.7 branch)


On Tue, Oct 02, 2007 at 01:25:58PM -0700, Jim Blandy wrote:
> 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.

Oh yes.  That's just a bug.  Unfortunately it is approximately
impossible to solve.  I do not remember how this works out for kernel
modules normally - maybe the answer is poorly.

We have to apply relocations, or else fake it by looking at the
slightly-relocated offsets (look at where we assign random VMAs
to the sections of unlinked objects during loading).

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]