diff options
author | Gary Benson <gbenson@redhat.com> | 2015-04-02 13:38:28 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-04-02 13:38:28 +0100 |
commit | 4bd7dc42558fcf53bb0c783f852f03dcac38866f (patch) | |
tree | b88717681fa2110b29de6ae589a3a489a4f96e07 /gdb/remote.c | |
parent | 9b15c1f0419ae693fdcf6cca399e9a916e14c48e (diff) | |
download | gdb-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/remote.c')
-rw-r--r-- | gdb/remote.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index e0c831e..43f3165 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -9863,6 +9863,15 @@ remote_hostio_send_command (int command_bytes, int which_packet, return ret; } +/* Return nonzero if the filesystem accessed by the target_fileio_* + methods is the local filesystem, zero otherwise. */ + +static int +remote_filesystem_is_local (struct target_ops *self) +{ + return 0; +} + /* Open FILENAME on the remote target, using FLAGS and MODE. Return a remote file descriptor, or -1 if an error occurs (and set *REMOTE_ERRNO). */ @@ -11814,6 +11823,7 @@ Specify the serial device it is connected to\n\ remote_ops.to_supports_multi_process = remote_supports_multi_process; remote_ops.to_supports_disable_randomization = remote_supports_disable_randomization; + remote_ops.to_filesystem_is_local = remote_filesystem_is_local; remote_ops.to_fileio_open = remote_hostio_open; remote_ops.to_fileio_pwrite = remote_hostio_pwrite; remote_ops.to_fileio_pread = remote_hostio_pread; |