diff options
author | Gary Benson <gbenson@redhat.com> | 2015-06-10 14:28:44 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-06-10 14:28:44 +0100 |
commit | 14d2069a321cdd2b06f1982e6832c8c5661febf4 (patch) | |
tree | 2473ce366cec53612aa1b2ad559a5a1725039a35 /gdb/gdbserver/linux-low.c | |
parent | 15a201c844e770d3c6edf174b9ef6596fbae7eb2 (diff) | |
download | gdb-14d2069a321cdd2b06f1982e6832c8c5661febf4.zip gdb-14d2069a321cdd2b06f1982e6832c8c5661febf4.tar.gz gdb-14d2069a321cdd2b06f1982e6832c8c5661febf4.tar.bz2 |
Implement vFile:setfs in gdbserver
This commit implements the "vFile:setfs" packet in gdbserver.
gdb/gdbserver/ChangeLog:
* target.h (struct target_ops) <multifs_open>: New field.
<multifs_unlink>: Likewise.
<multifs_readlink>: Likewise.
* linux-low.c (nat/linux-namespaces.h): New include.
(linux_target_ops): Initialize the_target->multifs_open,
the_target->multifs_unlink and the_target->multifs_readlink.
* hostio.h (hostio_handle_new_gdb_connection): New declaration.
* hostio.c (hostio_fs_pid): New static variable.
(hostio_handle_new_gdb_connection): New function.
(handle_setfs): Likewise.
(handle_open): Use the_target->multifs_open as appropriate.
(handle_unlink): Use the_target->multifs_unlink as appropriate.
(handle_readlink): Use the_target->multifs_readlink as
appropriate.
(handle_vFile): Handle vFile:setfs packets.
* server.c (handle_query): Call hostio_handle_new_gdb_connection
after target_handle_new_gdb_connection.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r-- | gdb/gdbserver/linux-low.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index d763c66..3774d170 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -52,6 +52,7 @@ definition of elf_fpregset_t. */ #include <elf.h> #endif +#include "nat/linux-namespaces.h" #ifndef SPUFS_MAGIC #define SPUFS_MAGIC 0x23c9b64e @@ -6644,6 +6645,9 @@ static struct target_ops linux_target_ops = { #endif linux_supports_range_stepping, linux_proc_pid_to_exec_file, + linux_mntns_open_cloexec, + linux_mntns_unlink, + linux_mntns_readlink, }; static void |