This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix dangling displays in separate debug
On Friday 09 April 2010 16:52:49, Jan Kratochvil wrote:
> > Would using objfile_separate_debug_iterate be better?
>
> In this case we are examining `struct expression *'.
> EXP contains `struct symbol *'.
> SYMBOL points to `struct objfile *' of the separate debug info file.
>
> If SYMBOL points to `struct objfile *' of the main binary, it is equal to
> SOLIB->OBJFILE and it has been already checked before.
>
> The main binary -> separate debug info direction provided by the iterating
> functionality of objfile_separate_debug_iterate is not useful in this case.
Thanks for explaining. I should have read the patch properly.
Just one more question:
> - if (SYMBOL_SYMTAB (symbol)->objfile == solib->objfile)
> + symbol_objfile = SYMBOL_SYMTAB (symbol)->objfile;
> + if (symbol_objfile == solib->objfile
> + || symbol_objfile->separate_debug_objfile_backlink
> + == solib->objfile)
> return 1;
Can't both `symbol_objfile->separate_debug_objfile_backlink' (because
symbol_objfile is the main objfile already) and `solib->objfile'
(because GDB didn't find any symbols for the shared library) be NULL,
and hence this returns false positives?
--
Pedro Alves