/* The common simulator framework for GDB, the GNU Debugger.
- Copyright 2002-2021 Free Software Foundation, Inc.
+ Copyright 2002-2022 Free Software Foundation, Inc.
Contributed by Andrew Cagney and Red Hat.
/* This must come before any other includes. */
#include "defs.h"
+#include <signal.h> /* For SIGPROCMASK et al. */
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libiberty.h"
+
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-cpu.h"
-#include "libiberty.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h> /* For SIGPROCMASK et al. */
typedef enum {
watch_invalid,
void *data;
sim_event_handler *handler;
/* timer event */
- signed64 time_of_event;
+ int64_t time_of_event;
/* watch wallclock event */
unsigned wallclock;
/* watch core address */
int is_within; /* 0/1 */
unsigned ub;
unsigned lb;
- unsigned64 ub64;
- unsigned64 lb64;
+ uint64_t ub64;
+ uint64_t lb64;
/* trace info (if any) */
char *trace;
/* list */
INLINE_SIM_EVENTS\
-(signed64)
+(int64_t)
sim_events_time (SIM_DESC sd)
{
sim_events *events = STATE_EVENTS (sd);
/* Returns the time that remains before the event is raised. */
INLINE_SIM_EVENTS\
-(signed64)
+(int64_t)
sim_events_remain_time (SIM_DESC sd, sim_event *event)
{
if (event == 0)
update_time_from_event (SIM_DESC sd)
{
sim_events *events = STATE_EVENTS (sd);
- signed64 current_time = sim_events_time (sd);
+ int64_t current_time = sim_events_time (sd);
if (events->queue != NULL)
{
events->time_of_event = events->queue->time_of_event;
static void
insert_sim_event (SIM_DESC sd,
sim_event *new_event,
- signed64 delta)
+ int64_t delta)
{
sim_events *events = STATE_EVENTS (sd);
sim_event *curr;
sim_event **prev;
- signed64 time_of_event;
+ int64_t time_of_event;
if (delta < 0)
sim_io_error (sd, "what is past is past!\n");
#if EXTERN_SIM_EVENTS_P
sim_event *
sim_events_schedule (SIM_DESC sd,
- signed64 delta_time,
+ int64_t delta_time,
sim_event_handler *handler,
void *data)
{
#if EXTERN_SIM_EVENTS_P
sim_event *
sim_events_schedule_tracef (SIM_DESC sd,
- signed64 delta_time,
+ int64_t delta_time,
sim_event_handler *handler,
void *data,
const char *fmt,
#if EXTERN_SIM_EVENTS_P
sim_event *
sim_events_schedule_vtracef (SIM_DESC sd,
- signed64 delta_time,
+ int64_t delta_time,
sim_event_handler *handler,
void *data,
const char *fmt,
#if EXTERN_SIM_EVENTS_P
void
sim_events_schedule_after_signal (SIM_DESC sd,
- signed64 delta_time,
+ int64_t delta_time,
sim_event_handler *handler,
void *data)
{
sim_event *
sim_events_watch_pc (SIM_DESC sd,
int is_within,
- unsigned64 lb,
- unsigned64 ub,
+ uint64_t lb,
+ uint64_t ub,
sim_event_handler *handler,
void *data)
{
int nr_bytes,
enum bfd_endian byte_order,
int is_within,
- unsigned64 lb,
- unsigned64 ub,
+ uint64_t lb,
+ uint64_t ub,
sim_event_handler *handler,
void *data)
{
int nr_bytes,
enum bfd_endian byte_order,
int is_within,
- unsigned64 lb,
- unsigned64 ub,
+ uint64_t lb,
+ uint64_t ub,
sim_event_handler *handler,
void *data)
{
sim_events_process (SIM_DESC sd)
{
sim_events *events = STATE_EVENTS (sd);
- signed64 event_time = sim_events_time (sd);
+ int64_t event_time = sim_events_time (sd);
/* Clear work_pending before checking nr_held. Clearing
work_pending after nr_held (with out a lock could loose an