@@ -225,7 +225,7 @@ exec_file_attach (const char *filename, int from_tty)
if (is_target_filename (filename))
{
if (target_filesystem_is_local ())
- filename += strlen (TARGET_SYSROOT_PREFIX);
+ filename += strlen (TARGET_FILENAME_PREFIX);
else
load_via_target = 1;
}
@@ -235,8 +235,8 @@ exec_file_attach (const char *filename, int from_tty)
/* gdb_bfd_fopen does not support "target:" filenames. */
if (write_files)
warning (_("writing into executable files is "
- "not supported for %s sysroots"),
- TARGET_SYSROOT_PREFIX);
+ "not supported for %s filenames"),
+ TARGET_FILENAME_PREFIX);
scratch_pathname = xstrdup (filename);
make_cleanup (xfree, scratch_pathname);
@@ -144,7 +144,7 @@ eq_bfd (const void *a, const void *b)
int
is_target_filename (const char *name)
{
- return startswith (name, TARGET_SYSROOT_PREFIX);
+ return startswith (name, TARGET_FILENAME_PREFIX);
}
/* See gdb_bfd.h. */
@@ -223,7 +223,7 @@ gdb_bfd_iovec_fileio_open (struct bfd *abfd, void *inferior)
gdb_assert (is_target_filename (filename));
fd = target_fileio_open ((struct inferior *) inferior,
- filename + strlen (TARGET_SYSROOT_PREFIX),
+ filename + strlen (TARGET_FILENAME_PREFIX),
FILEIO_O_RDONLY, 0,
&target_errno);
if (fd == -1)
@@ -336,7 +336,7 @@ gdb_bfd_open (const char *name, const char *target, int fd)
gdb_bfd_iovec_fileio_fstat);
}
- name += strlen (TARGET_SYSROOT_PREFIX);
+ name += strlen (TARGET_FILENAME_PREFIX);
}
if (gdb_bfd_cache == NULL)
@@ -27,20 +27,20 @@ DECLARE_REGISTRY (bfd);
/* If supplied a path starting with this sequence, gdb_bfd_open will
open BFDs using target fileio operations. */
-#define TARGET_SYSROOT_PREFIX "target:"
+#define TARGET_FILENAME_PREFIX "target:"
-/* Returns nonzero if NAME starts with TARGET_SYSROOT_PREFIX, zero
+/* Returns nonzero if NAME starts with TARGET_FILENAME_PREFIX, zero
otherwise. */
int is_target_filename (const char *name);
/* Returns nonzero if the filename associated with ABFD starts with
- TARGET_SYSROOT_PREFIX, zero otherwise. */
+ TARGET_FILENAME_PREFIX, zero otherwise. */
int gdb_bfd_has_target_filename (struct bfd *abfd);
/* Open a read-only (FOPEN_RB) BFD given arguments like bfd_fopen.
- If NAME starts with TARGET_SYSROOT_PREFIX then the BFD will be
+ If NAME starts with TARGET_FILENAME_PREFIX then the BFD will be
opened using target fileio operations if necessary. Returns NULL
on error. On success, returns a new reference to the BFD, which
must be freed with gdb_bfd_unref. BFDs returned by this call are
@@ -48,7 +48,7 @@ int gdb_bfd_has_target_filename (struct bfd *abfd);
then after this call it is owned by BFD. If the BFD was not
accessed using target fileio operations then the filename
associated with the BFD and accessible with bfd_get_filename will
- not be exactly NAME but rather NAME with TARGET_SYSROOT_PREFIX
+ not be exactly NAME but rather NAME with TARGET_FILENAME_PREFIX
stripped. */
struct bfd *gdb_bfd_open (const char *name, const char *target, int fd);
@@ -675,7 +675,7 @@ gdbsim_open (const char *args, int from_tty)
sysroot = gdb_sysroot;
if (is_target_filename (sysroot))
- sysroot += strlen (TARGET_SYSROOT_PREFIX);
+ sysroot += strlen (TARGET_FILENAME_PREFIX);
if (remote_debug)
fprintf_unfiltered (gdb_stdlog,
@@ -167,7 +167,7 @@ solib_find_1 (char *in_pathname, int *fd, int is_solib)
for all local files regardless of whether a "target:" prefix was
used. */
if (is_target_filename (sysroot) && target_filesystem_is_local ())
- sysroot += strlen (TARGET_SYSROOT_PREFIX);
+ sysroot += strlen (TARGET_FILENAME_PREFIX);
/* Strip any trailing slashes from the absolute prefix. */
prefix_len = orig_prefix_len = strlen (sysroot);
@@ -239,7 +239,7 @@ solib_find_1 (char *in_pathname, int *fd, int is_solib)
There's no need to check for drive spec explicitly, as we only
get here if IN_PATHNAME is considered an absolute path. */
need_dir_separator = !(IS_DIR_SEPARATOR (in_pathname[0])
- || strcmp (TARGET_SYSROOT_PREFIX, sysroot) == 0);
+ || strcmp (TARGET_FILENAME_PREFIX, sysroot) == 0);
/* Cat the prefixed pathname together. */
temp_pathname = concat (sysroot,
@@ -1477,7 +1477,7 @@ gdb_sysroot_changed (char *ignored, int from_tty,
struct cmd_list_element *e)
{
const char *old_prefix = "remote:";
- const char *new_prefix = TARGET_SYSROOT_PREFIX;
+ const char *new_prefix = TARGET_FILENAME_PREFIX;
if (startswith (gdb_sysroot, old_prefix))
{