This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Regression on prelinked-sepdebug-shlibs
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 6 Jan 2010 19:05:10 +0100
- Subject: Re: Regression on prelinked-sepdebug-shlibs
- References: <20091225200440.GA3747@host0.dyn.jankratochvil.net> <B936F89D-B788-405A-B9AD-27A0E50206DD@adacore.com>
Hi Tristan,
On Wed, 06 Jan 2010 17:38:55 +0100, Tristan Gingold wrote:
> do you have a patch for dwarf2read.c(dwarf2_psymtab_to_symtab) ?
>
> /* If this psymtab is constructed from a debug-only objfile, the
> has_section_at_zero flag will not necessarily be correct. We
> can get the correct value for this flag by looking at the data
> associated with the (presumably stripped) associated objfile. */
> if (pst->objfile->separate_debug_objfile_backlink)
> {
> struct dwarf2_per_objfile *dpo_backlink
> = objfile_data (pst->objfile->separate_debug_objfile_backlink,
> dwarf2_objfile_data_key);
> dwarf2_per_objfile->has_section_at_zero
> = dpo_backlink->has_section_at_zero;
> }
>
> I think this is not correct: the separate debug file may have one section at
> zero while the main may not. In the above code, we do not consider wether
> an offset is used.
>
> I am not sure that this can happen with ELF however.
This has_section_at_zero feature is intended for embedded targets. I only
know has_section_at_zero can never happen for cases I am aware of.
IMHO embedded targets do not use the file-vs-memory offsets but not sure.
Also the embedded targets probably do not use .linkonce/COMDAT - this is why
this has_section_at_zero differentiator could work.
[PATCH] Allow dwarf2 debug info for function at address 0
http://sourceware.org/ml/gdb-patches/2006-07/msg00291.html
Regards,
Jan