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 12/15] PIE: Support loading PIEs from core files


>>>>> "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


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