This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 12/15] PIE: Support loading PIEs from core files
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 08 Jan 2010 16:52:06 -0700
- Subject: Re: [patch 12/15] PIE: Support loading PIEs from core files
- References: <20091109210040.GM19138@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> Another issue is whether `struct objfile *' passed between
Jan> functions should be:
Jan> (A) caller must pass always the main binary file
Jan> (B) caller must prefer to pass the separate debug info file if available
Jan> (C) callee must accept both variants
Jan> Currently the GDB code mostly follows (A) IMO so fixed
Jan> lookup_objfile_from_block for it and assertion-checked it in
Jan> elf_lookup_lib_symbol. Sure one could also choose (C) for
Jan> elf_lookup_lib_symbol which would be more regression-safe.
Having the debug files be objfiles in their own right seems strange to
me. Is there a situation where they are used "directly", instead of
being used as extra data for their parent objfile?
Anyway, I think you did an ok thing here.
Jan> gdb/
Jan> * solib-svr4.c (scan_dyntag): Remove variable dyn_addr. New variable
Jan> target_section. Find SECT in current_target_sections, gdb_assert it.
Jan> (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
Jan> New variable abfd.
Jan> * symtab.c (lookup_objfile_from_block): Return the binary file instead
Jan> of separate debug info file.
Jan> gdb/testsuite/
Jan> * gdb.base/break-interp.exp (test_core): New proc.
Jan> (test_ld): Call it.
This ok. Thanks.
Tom