/* The common simulator framework for GDB, the GNU Debugger.
- Copyright 2002-2015 Free Software Foundation, Inc.
+ Copyright 2002-2019 Free Software Foundation, Inc.
Contributed by Andrew Cagney and Red Hat.
#include "sim-main.h"
#include "sim-assert.h"
+#include "libiberty.h"
#ifdef HAVE_STRING_H
#include <string.h>
#define _ETRACE sd, NULL
-#undef ETRACE_P
-#define ETRACE_P (WITH_TRACE && STATE_EVENTS (sd)->trace)
-
#undef ETRACE
#define ETRACE(ARGS) \
do \
{ \
- if (ETRACE_P) \
+ if (STRACE_EVENTS_P (sd)) \
{ \
if (STRACE_DEBUG_P (sd)) \
- { \
- const char *file; \
- SIM_FILTER_PATH (file, __FILE__); \
- trace_printf (sd, NULL, "%s:%d: ", file, __LINE__); \
- } \
+ trace_printf (sd, NULL, "%s:%d: ", lbasename (__FILE__), __LINE__); \
trace_printf ARGS; \
} \
} \
events->time_of_event = current_time - 1;
events->time_from_event = -1;
}
- if (ETRACE_P)
+ if (STRACE_EVENTS_P (sd))
{
sim_event *event;
int i;
new_event->data = data;
new_event->handler = handler;
new_event->watching = watch_timer;
- if (fmt == NULL || !ETRACE_P || vasprintf (&new_event->trace, fmt, ap) < 0)
+ if (fmt == NULL || !STRACE_EVENTS_P (sd) || vasprintf (&new_event->trace, fmt, ap) < 0)
new_event->trace = NULL;
insert_sim_event (sd, new_event, delta_time);
ETRACE ((_ETRACE,
/* type */
switch (byte_order)
{
- case 0:
+ case BFD_ENDIAN_UNKNOWN:
switch (nr_bytes)
{
case 1: new_event->watching = watch_sim_host_1; break;
default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes");
}
break;
- case BIG_ENDIAN:
+ case BFD_ENDIAN_BIG:
switch (nr_bytes)
{
case 1: new_event->watching = watch_sim_be_1; break;
default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes");
}
break;
- case LITTLE_ENDIAN:
+ case BFD_ENDIAN_LITTLE:
switch (nr_bytes)
{
case 1: new_event->watching = watch_sim_le_1; break;
/* type */
switch (byte_order)
{
- case 0:
+ case BFD_ENDIAN_UNKNOWN:
switch (nr_bytes)
{
case 1: new_event->watching = watch_core_targ_1; break;
default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes");
}
break;
- case BIG_ENDIAN:
+ case BFD_ENDIAN_BIG:
switch (nr_bytes)
{
case 1: new_event->watching = watch_core_be_1; break;
default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes");
}
break;
- case LITTLE_ENDIAN:
+ case BFD_ENDIAN_LITTLE:
switch (nr_bytes)
{
case 1: new_event->watching = watch_core_le_1; break;