libctru  v2.3.1
gdbhio.h
Go to the documentation of this file.
1 /**
2  * @file gdbhio.h
3  * @brief Luma3DS GDB HIO (called File I/O in GDB documentation) functions.
4  */
5 
6 #pragma once
7 
8 #include <fcntl.h>
9 #include <sys/time.h>
10 #include <sys/stat.h>
11 
12 #define GDBHIO_STDIN_FILENO 0
13 #define GDBHIO_STDOUT_FILENO 1
14 #define GDBHIO_STDERR_FILENO 2
15 
16 int gdbHioOpen(const char *pathname, int flags, mode_t mode);
17 int gdbHioClose(int fd);
18 int gdbHioRead(int fd, void *buf, unsigned int count);
19 int gdbHioWrite(int fd, const void *buf, unsigned int count);
20 off_t gdbHioLseek(int fd, off_t offset, int flag);
21 int gdbHioRename(const char *oldpath, const char *newpath);
22 int gdbHioUnlink(const char *pathname);
23 int gdbHioStat(const char *pathname, struct stat *st);
24 int gdbHioFstat(int fd, struct stat *st);
25 int gdbHioGettimeofday(struct timeval *tv, void *tz);
26 int gdbHioIsatty(int fd);
27 
28 ///< Host I/O 'system' function, requires 'set remote system-call-allowed 1'.
29 int gdbHioSystem(const char *command);
int gdbHioIsatty(int fd)
Host I/O 'system' function, requires 'set remote system-call-allowed 1'.