summaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-09-24 14:00:06 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-09-24 14:00:06 +0000
commit24ba069af8a2078bc634bbf2599381fc0ea471ad (patch)
treeb9b51a9595e0e4ea0723ed9f5541664e04bf05a3 /gdb/jit.c
parent4262abfb982e7afb257203a2dbdb921b57f5e39b (diff)
Keep objfile original filename
gdb/ 2013-09-24 Jan Kratochvil <jan.kratochvil@redhat.com> Pass down original filename for objfile. * coffread.c (coff_symfile_read): Update symbol_file_add_separate call. * elfread.c (elf_symfile_read): Likewise. * jit.c (jit_object_close_impl): Update allocate_objfile call, no longer set ORIGINAL_NAME. (jit_bfd_try_read_symtab): Update symbol_file_add_from_bfd call. * jv-lang.c (get_dynamics_objfile): Update allocate_objfile call. * machoread.c (macho_add_oso_symfile): Add parameter name. Update symbol_file_add_from_bfd call. (macho_symfile_read_all_oso): Update two macho_add_oso_symfile calls. (macho_check_dsym): Add parameter filenamep. Change function comment. Set *filenamep. (macho_symfile_read): New variable dsym_filename. Update macho_check_dsym call. Use it for symbol_file_add_separate. * objfiles.c (allocate_objfile): Add parameter name. New comment for it. Use it for objfile->original_name. (objfile_name): Return OBFD's filename, if available. * objfiles.h (allocate_objfile): Add new parameter name. * solib.c (solib_read_symbols): Update symbol_file_add_from_bfd call. * symfile-mem.c (symbol_file_add_from_memory): Update symbol_file_add_from_bfd call. * symfile.c (read_symbols): Update symbol_file_add_separate call, new comment for it. (symbol_file_add_with_addrs): New parameter name, add function comment for it. Remove variable name. Update allocate_objfile call. (symbol_file_add_separate): New parameter name, add function comment for it. Update symbol_file_add_with_addrs call. (symbol_file_add_from_bfd): New parameter name. Update symbol_file_add_with_addrs call. (symbol_file_add): Update symbol_file_add_from_bfd call. (reread_symbols): New variable original_name. Save objfile->original_name by it. * symfile.h (symbol_file_add_from_bfd, symbol_file_add_separate): Add second parameter.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r--gdb/jit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/jit.c b/gdb/jit.c
index ce66c9fabf..c7edd4a327 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -785,13 +785,11 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb,
priv_data = cb->priv_data;
- objfile = allocate_objfile (NULL, 0);
+ objfile = allocate_objfile (NULL, "<< JIT compiled code >>", 0);
objfile->per_bfd->gdbarch = target_gdbarch ();
terminate_minimal_symbol_table (objfile);
- objfile->original_name = "<< JIT compiled code >>";
-
j = NULL;
for (i = obj->symtabs; i; i = j)
{
@@ -927,7 +925,8 @@ JITed symbol file is not an object file, ignoring it.\n"));
/* This call does not take ownership of SAI. */
make_cleanup_bfd_unref (nbfd);
- objfile = symbol_file_add_from_bfd (nbfd, 0, sai, OBJF_SHARED, NULL);
+ objfile = symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd), 0, sai,
+ OBJF_SHARED, NULL);
do_cleanups (old_cleanups);
add_objfile_entry (objfile, entry_addr);