]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/common/sim-io.h
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / sim / common / sim-io.h
1 /* The common simulator framework for GDB, the GNU Debugger.
2
3 Copyright 2002, 2007 Free Software Foundation, Inc.
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
11 the Free Software Foundation; either version 2 of the License, or
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
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
23
24
25 #ifndef SIM_IO_H
26 #define SIM_IO_H
27
28 /* See the file include/callbacks.h for a description */
29
30 int sim_io_init (SIM_DESC sd);
31
32 int sim_io_shutdown (SIM_DESC sd);
33
34 int sim_io_unlink (SIM_DESC sd, const char *);
35
36 long sim_io_time (SIM_DESC sd, long *);
37
38 int sim_io_system (SIM_DESC sd, const char *);
39
40 int sim_io_rename (SIM_DESC sd, const char *, const char *);
41
42 int sim_io_write_stdout (SIM_DESC sd, const char *, int);
43
44 void sim_io_flush_stdout (SIM_DESC sd);
45
46 int sim_io_write_stderr (SIM_DESC sd, const char *, int);
47
48 void sim_io_flush_stderr (SIM_DESC sd);
49
50 int sim_io_write (SIM_DESC sd, int, const char *, int);
51
52 int sim_io_read_stdin (SIM_DESC sd, char *, int);
53
54 int sim_io_read (SIM_DESC sd, int, char *, int);
55
56 int sim_io_open (SIM_DESC sd, const char *, int);
57
58 int sim_io_lseek (SIM_DESC sd, int, long, int);
59
60 int sim_io_isatty (SIM_DESC sd, int);
61
62 int sim_io_get_errno (SIM_DESC sd);
63
64 int sim_io_close (SIM_DESC sd, int);
65
66 void sim_io_printf (SIM_DESC sd,
67 const char *fmt,
68 ...) __attribute__ ((format (printf, 2, 3)));
69
70 void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap);
71
72 void sim_io_eprintf (SIM_DESC sd,
73 const char *fmt,
74 ...) __attribute__ ((format (printf, 2, 3)));
75
76 void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap);
77
78 void sim_io_error (SIM_DESC sd,
79 const char *fmt,
80 ...) __attribute__ ((format (printf, 2, 3)));
81
82 void sim_io_poll_quit (SIM_DESC sd);
83
84 /* Returns -1 and sets (host) EAGAIN if not ready. */
85 int sim_io_poll_read (SIM_DESC sd, int, char *, int);
86
87 #endif