Re: gdb doesn't load line number information from object (kgdb target)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you have a different architecture than x86, I would be grateful if
you could dump the output of readelf -wL <somemodule>.ko somewhere so
we can see what's happening for other archs.

-wL outputs information from .debug_line section of the ELF object.

Thanks,
-Joel

On Wed, Jan 27, 2010 at 4:24 PM, Joel Fernandes <agnel.joel@xxxxxxxxx> wrote:
> I think the problems were in the way the line information was
> structured in the kernel module ELF.
>
> The line information of all the objects were clubbed together when
> compiling for x86_64 but the starting numbers were not taken into
> account.
> This how the line no.s in the resulting ko ELF objects looks like for x84_64:
> addr line file
> 0x1  1    super.c
> 0x2  2    super.c
> 0x3  3    super.c
> 0x1  4    balloc.c
> 0x2  5    balloc.c
>
> As you can see, from balloc.c onwards, the addresses are reset to 1
> (instead of 0x4).
>
> On the other hand I've compiled for different architectures like (UML)
> and the resulting ko have continugous addresses across different .o :
> 0x1  1    super.c
> 0x2  2    super.c
> 0x3  3    super.c
> 0x4  4    balloc.c
> 0x5  5    balloc.c
>
> Looks like gdb 6.8 gets confused when the addresses are reset, but gdb
> 7.0 doesn't.
>
> Further, gdb 6.8 works and can interpret line numbers properly when
> compiling kernel modules for different architectures (other than
> x86_64) so the problem is in the way line number debug info is
> structured in the ko and not in gdb.
>
> Thanks,
> -Joel
>
> On Wed, Jan 27, 2010 at 5:23 AM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
>> this is interesting....i learning something new again...
>>
>> pardon me if i may disagree :-).
>>
>> i don't think it is a bug for gdb6.8 - it is a very simple
>> feature....and gdb6.8 must have got right....some point in time in the
>> past --> for a particular version of gcc in the past (which create the
>> debuginfo).   but when u move forward your gcc version, and gdb lacks
>> behind too far.....there will be a mismatch problem.....developer
>> cannot possibly test so many version combination....well this is
>> controversial....i may be wrong.....
>>
>> On Fri, Jan 22, 2010 at 10:04 PM, Mulyadi Santosa
>> <mulyadi.santosa@xxxxxxxxx> wrote:
>>> On Fri, Jan 22, 2010 at 12:20 PM, Joel Fernandes <agnel.joel@xxxxxxxxx> wrote:
>>>> Incase it helps some one else, I upgraded from gdb-6.8 to gdb 7.0 and
>>>> the line numbers show up fine.
>>>
>>> hmffffff, bug in DWARF reading....
>>>
>>> --
>>> regards,
>>>
>>> Mulyadi Santosa
>>> Freelance Linux trainer and consultant
>>>
>>> blog: the-hydra.blogspot.com
>>> training: mulyaditraining.blogspot.com
>>>
>>> --
>>> To unsubscribe from this list: send an email with
>>> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> Peter Teoh
>>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux