New flag OBJF_NOT_FILENAME

gdb/
2013-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

	New flag OBJF_NOT_FILENAME.
	* auto-load.c (auto_load_objfile_script): Check also OBJF_NOT_FILENAME.
	* jit.c (jit_object_close_impl): Use OBJF_NOT_FILENAME for
	allocate_objfile.
	(jit_bfd_try_read_symtab): Use OBJF_NOT_FILENAME for
	symbol_file_add_from_bfd.
	* jv-lang.c (get_dynamics_objfile): Use OBJF_NOT_FILENAME for
	allocate_objfile.
	* objfiles.c (allocate_objfile): Assert OBJF_NOT_FILENAME if NAME is
	NULL.
	* objfiles.h (OBJF_NOT_FILENAME): New.
This commit is contained in:
Jan Kratochvil
2013-10-09 13:22:36 +00:00
parent 86879d8871
commit 40135bb14b
6 changed files with 26 additions and 4 deletions

View File

@ -785,7 +785,8 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb,
priv_data = cb->priv_data;
objfile = allocate_objfile (NULL, "<< JIT compiled code >>", 0);
objfile = allocate_objfile (NULL, "<< JIT compiled code >>",
OBJF_NOT_FILENAME);
objfile->per_bfd->gdbarch = target_gdbarch ();
terminate_minimal_symbol_table (objfile);
@ -926,7 +927,7 @@ 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, bfd_get_filename (nbfd), 0, sai,
OBJF_SHARED, NULL);
OBJF_SHARED | OBJF_NOT_FILENAME, NULL);
do_cleanups (old_cleanups);
add_objfile_entry (objfile, entry_addr);