This is the mail archive of the gdb-patches@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: [patch 2/3 ppc64] Provide new sym_read parameter ADDRS


Jan Kratochvil wrote:

> elf_symfile_read needs in [patch 3/3] to access the original (backlink)
> objfile for a new separate debug info file and best even the already prepared
> section_addr_info from the caller symbol_file_add_separate which already holds
> it.  There currently was no way as OBJFILE will get its
> SEPARATE_DEBUG_OBJFILE_BACKLINK assigned only after elf_symfile_read has
> already finished (and read in the ELF symbols already the wrong way).

Thanks for working on that; I've run into that problem on ppc64 as well ...

I'm just wondering if it wouldn't be simpler, instead of passing the extra
argument to all the _read function, to fix the problem that _backlink is
set too late.

For example, couldn't you add a "parent" objfile parameter to
symbol_file_add_with_addrs_or_offsets, and have it set the
_backlink as soon as the new objfile is allocated, before ever
calling syms_from_objfile?

Then, elfread.c could simply check _backlink to get at the original
objfile.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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