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: DWARF question


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Jim Blandy wrote:
>
> What probably happens is that '-readnow' somehow affects the order in
> which the full symtabs get put in the list.  I'm surprised that
> breakpoints by line number in both main and the function work, but I
> guess that has something to do with the nature of the bug in
> find_line_symtab.
Here's what I got. The loop  'ALL_SYMTABS' has only one iteration
because 's->next' is NULL. So it seems that GDB isn't loading the
other symtab.

When I use '-readnow', both symtabs are there:

(top-gdb) p s->filename
$6 = 0x106a4930 "init.c"
(top-gdb) p (s->next)->filename
$7 = 0x1069cf10 "/usr/src/packages/BUILD/glibc-2.4/cc-nptl/csu/crti.S"
(top-gdb) p ((s->next)->next)->filename
$8 = 0x1069cc60 "test-main.f"
(top-gdb) p (((s->next)->next)->next)->filename
$9 = 0x1069c280 "test-main.f"
(top-gdb) p ((((s->next)->next)->next)->next)->filename
$10 = 0x1068d5c0 "crtsavres.S"
(top-gdb) p (((((s->next)->next)->next)->next)->next)->filename
$11 = 0x1068d2a0 "/usr/src/packages/BUILD/glibc-2.4/cc-nptl/csu/crtn.S"
(top-gdb) p (((((s->next)->next)->next)->next)->next)->next
$17 = (struct symtab *) 0x0

And the loop 'ALL_SYMTABS' work. So, it looks like the bug isn't in
this function. I'm going to look at where GDB populates the symtabs
list now.

Any thoughts?

Regards,

- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHATM8qvq7Aov/qQARAjvjAJ9gkyzimsdqWIcfomV92r2epC14RgCeIij7
aImDP4A6XiUgmIRbEnRhe+Q=
=dpf+
-----END PGP SIGNATURE-----


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