/* The common simulator framework for GDB, the GNU Debugger.
- Copyright 2002-2015 Free Software Foundation, Inc.
+ Copyright 2002-2022 Free Software Foundation, Inc.
Contributed by Andrew Cagney and Red Hat.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-io.h"
+#include "sim/callback.h"
#include "targ-vals.h"
#include <errno.h>
#include <unistd.h>
#endif
+#include <stdlib.h>
+
+#undef open
+
/* Define the rate at which the simulator should poll the host
for a quit. */
#ifndef POLL_QUIT_INTERVAL
}
-long
-sim_io_time (SIM_DESC sd,
- long *t)
+int64_t
+sim_io_time (SIM_DESC sd)
{
- return STATE_CALLBACK (sd)->time (STATE_CALLBACK (sd), t);
+ return STATE_CALLBACK (sd)->time (STATE_CALLBACK (sd));
}
}
-int
+int64_t
sim_io_lseek (SIM_DESC sd,
int fd,
- long off,
+ int64_t off,
int way)
{
return STATE_CALLBACK (sd)->lseek (STATE_CALLBACK (sd), fd, off, way);
va_start (ap, fmt);
STATE_CALLBACK (sd)->evprintf_filtered (STATE_CALLBACK (sd), fmt, ap);
va_end (ap);
- STATE_CALLBACK (sd)->error (STATE_CALLBACK (sd), "");
+ /* Printing a space here avoids empty printf compiler warnings. Not ideal,
+ but we want error's side-effect where it halts processing. */
+ STATE_CALLBACK (sd)->error (STATE_CALLBACK (sd), " ");
}
}