From 3055e3d2f13bb84db90b9c19d427c362053775d2 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Tue, 21 May 2024 15:58:02 +0100 Subject: gdb: add GDB side target_ops::fileio_stat implementation This commit adds the GDB side of target_ops::fileio_stat. There's an implementation for inf_child_target, which just calls 'lstat', and there's an implementation for remote_target, which sends a new vFile:stat packet. The new packet is documented. There's still no users of target_fileio_stat as I have not yet added support for vFile::stat to gdbserver. If these packets are currently sent to gdbserver then they will be reported as not supported and the ENOSYS error code will be returned. Reviewed-By: Eli Zaretskii --- gdb/inf-child.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/inf-child.h') diff --git a/gdb/inf-child.h b/gdb/inf-child.h index 91955a6..65d42e1 100644 --- a/gdb/inf-child.h +++ b/gdb/inf-child.h @@ -81,6 +81,8 @@ public: int fileio_pread (int fd, gdb_byte *read_buf, int len, ULONGEST offset, fileio_error *target_errno) override; int fileio_fstat (int fd, struct stat *sb, fileio_error *target_errno) override; + int fileio_stat (struct inferior *inf, const char *filename, + struct stat *sb, fileio_error *target_errno) override; int fileio_close (int fd, fileio_error *target_errno) override; int fileio_unlink (struct inferior *inf, const char *filename, -- cgit v1.1