Convert "remote:" sysroots to "target:" and remove "remote:"

The functionality of "target:" sysroots is a superset of the
functionality of "remote:" sysroots.  This commit causes the
"set sysroot" command to rewrite "remote:" sysroots as "target:"
sysroots and replaces "remote:" specific code with "target:"
specific code where still necessary.

gdb/ChangeLog:

	* remote.h (REMOTE_SYSROOT_PREFIX): Remove definition.
	(remote_filename_p): Remove declaration.
	(remote_bfd_open): Likewise.
	* remote.c (remote_bfd_iovec_open): Remove function.
	(remote_bfd_iovec_close): Likewise.
	(remote_bfd_iovec_pread): Likewise.
	(remote_bfd_iovec_stat): Likewise.
	(remote_filename_p): Likewise.
	(remote_bfd_open): Likewise.
	* symfile.h (gdb_bfd_open_maybe_remote): Remove declaration.
	* symfile.c (separate_debug_file_exists): Use gdb_bfd_open.
	(gdb_bfd_open_maybe_remote): Remove function.
	(symfile_bfd_open):  Replace remote filename check with
	target filename check.
	(reread_symbols): Use gdb_bfd_open.
	* build-id.c (gdbcore.h): New include.
	(build_id_to_debug_bfd): Use gdb_bfd_open.
	* infcmd.c (attach_command_post_wait): Remove remote filename
	check.
	* solib.c (solib_find): Replace remote-specific handling with
	target-specific handling.  Update comments where necessary.
	(solib_bfd_open): Replace remote-specific handling with
	target-specific handling.
	(gdb_sysroot_changed): New function.
	(_initialize_solib): Call the above when gdb_sysroot changes.
	* windows-tdep.c (gdbcore.h): New include.
	(windows_xfer_shared_library): Use gdb_bfd_open.
This commit is contained in:
Gary Benson
2015-04-02 13:38:29 +01:00
parent f08e97fed1
commit 2938e6cf08
8 changed files with 80 additions and 165 deletions

View File

@ -26,6 +26,7 @@
#include "symfile.h"
#include "objfiles.h"
#include "filenames.h"
#include "gdbcore.h"
/* See build-id.h. */
@ -118,7 +119,7 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
continue;
/* We expect to be silent on the non-existing files. */
abfd = gdb_bfd_open_maybe_remote (filename);
abfd = gdb_bfd_open (filename, gnutarget, -1);
if (abfd == NULL)
continue;