aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2015-04-02 13:38:28 +0100
committerGary Benson <gbenson@redhat.com>2015-04-02 13:38:28 +0100
commit4bd7dc42558fcf53bb0c783f852f03dcac38866f (patch)
treeb88717681fa2110b29de6ae589a3a489a4f96e07 /gdb/target.h
parent9b15c1f0419ae693fdcf6cca399e9a916e14c48e (diff)
downloadgdb-4bd7dc42558fcf53bb0c783f852f03dcac38866f.zip
gdb-4bd7dc42558fcf53bb0c783f852f03dcac38866f.tar.gz
gdb-4bd7dc42558fcf53bb0c783f852f03dcac38866f.tar.bz2
Introduce target_filesystem_is_local
This commit introduces a new target method target_filesystem_is_local which can be used to determine whether or not the filesystem accessed by the target_fileio_* methods is the local filesystem. gdb/ChangeLog: * target.h (struct target_ops) <to_filesystem_is_local>: New field. (target_filesystem_is_local): New macro. * target-delegates.c: Regenerate. * remote.c (remote_filesystem_is_local): New function. (init_remote_ops): Initialize to_filesystem_is_local.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index c4440ce..f57e431 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -825,6 +825,12 @@ struct target_ops
/* Target file operations. */
+ /* Return nonzero if the filesystem accessed by the
+ target_fileio_* methods is the local filesystem,
+ zero otherwise. */
+ int (*to_filesystem_is_local) (struct target_ops *)
+ TARGET_DEFAULT_RETURN (1);
+
/* Open FILENAME on the target, using FLAGS and MODE. Return a
target file descriptor, or -1 if an error occurs (and set
*TARGET_ERRNO). */
@@ -1921,6 +1927,11 @@ extern int target_search_memory (CORE_ADDR start_addr,
/* Target file operations. */
+/* Return nonzero if the filesystem accessed by the target_fileio_*
+ methods is the local filesystem, zero otherwise. */
+#define target_filesystem_is_local() \
+ current_target.to_filesystem_is_local (&current_target)
+
/* Open FILENAME on the target, using FLAGS and MODE. Return a
target file descriptor, or -1 if an error occurs (and set
*TARGET_ERRNO). */