/* Simulator tracing/debugging support.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
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-options.h"
#include "sim-fpu.h"
+#include "sim/callback.h"
#include "bfd.h"
#include "libiberty.h"
#include "sim-assert.h"
-#ifdef HAVE_STRING_H
#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifndef SIZE_PHASE
#define SIZE_PHASE 8
return 0;
}
-static int
+static int ATTRIBUTE_PRINTF (2, 3)
dis_printf (SIM_CPU *cpu, const char *fmt, ...)
{
SIM_DESC sd = CPU_STATE (cpu);
if (trace_data->dis_bfd != bfd)
{
trace_data->dis_bfd = bfd;
- trace_data->disassembler = disassembler (trace_data->dis_bfd);
+ trace_data->disassembler
+ = disassembler (bfd_get_arch (trace_data->dis_bfd),
+ bfd_big_endian (trace_data->dis_bfd),
+ bfd_get_mach (trace_data->dis_bfd),
+ trace_data->dis_bfd);
INIT_DISASSEMBLE_INFO (*info, cpu, dis_printf);
info->read_memory_func = dis_read;
info->arch = bfd_get_arch (bfd);