Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / sim / common / sim-io.h
CommitLineData
b85e4829
AC
1/* The common simulator framework for GDB, the GNU Debugger.
2
88b9d363 3 Copyright 2002-2022 Free Software Foundation, Inc.
b85e4829
AC
4
5 Contributed by Andrew Cagney and Red Hat.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
4744ac1b 11 the Free Software Foundation; either version 3 of the License, or
b85e4829
AC
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
4744ac1b 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c
SS
21
22
23#ifndef SIM_IO_H
24#define SIM_IO_H
25
26/* See the file include/callbacks.h for a description */
27
28int sim_io_init (SIM_DESC sd);
29
30int sim_io_shutdown (SIM_DESC sd);
31
32int sim_io_unlink (SIM_DESC sd, const char *);
33
00330cd1 34int64_t sim_io_time (SIM_DESC sd);
c906108c
SS
35
36int sim_io_system (SIM_DESC sd, const char *);
37
38int sim_io_rename (SIM_DESC sd, const char *, const char *);
39
40int sim_io_write_stdout (SIM_DESC sd, const char *, int);
41
42void sim_io_flush_stdout (SIM_DESC sd);
43
44int sim_io_write_stderr (SIM_DESC sd, const char *, int);
45
46void sim_io_flush_stderr (SIM_DESC sd);
47
48int sim_io_write (SIM_DESC sd, int, const char *, int);
49
50int sim_io_read_stdin (SIM_DESC sd, char *, int);
51
52int sim_io_read (SIM_DESC sd, int, char *, int);
53
54int sim_io_open (SIM_DESC sd, const char *, int);
55
2fbe9507 56int64_t sim_io_lseek (SIM_DESC sd, int, int64_t, int);
c906108c
SS
57
58int sim_io_isatty (SIM_DESC sd, int);
59
60int sim_io_get_errno (SIM_DESC sd);
61
62int sim_io_close (SIM_DESC sd, int);
63
64void sim_io_printf (SIM_DESC sd,
65 const char *fmt,
f0c4dc40 66 ...) ATTRIBUTE_PRINTF (2, 3);
c906108c 67
fda2f85e
MF
68void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap)
69 ATTRIBUTE_PRINTF (2, 0);
c906108c
SS
70
71void sim_io_eprintf (SIM_DESC sd,
72 const char *fmt,
f0c4dc40 73 ...) ATTRIBUTE_PRINTF (2, 3);
c906108c 74
fda2f85e
MF
75void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap)
76 ATTRIBUTE_PRINTF (2, 0);
c906108c
SS
77
78void sim_io_error (SIM_DESC sd,
79 const char *fmt,
2a8922a9 80 ...)
f0c4dc40
MF
81 ATTRIBUTE_PRINTF (2, 3)
82 ATTRIBUTE_NORETURN;
c906108c
SS
83
84void sim_io_poll_quit (SIM_DESC sd);
85
86/* Returns -1 and sets (host) EAGAIN if not ready. */
87int sim_io_poll_read (SIM_DESC sd, int, char *, int);
88
165b70ea
KB
89#include <sys/types.h>
90#include <sys/stat.h>
91
92int sim_io_stat (SIM_DESC sd, const char *path, struct stat *buf);
93
94int sim_io_fstat (SIM_DESC sd, int fd, struct stat *buf);
c906108c 95#endif
This page took 1.678122 seconds and 4 git commands to generate.