/* Target-machine dependent code for Nios II, for GDB.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2017 Free Software Foundation, Inc.
Contributed by Peter Brookes (pbrookes@altera.com)
and Andrew Draper (adraper@altera.com).
Contributed by Mentor Graphics, Inc.
#include "value.h"
#include "symfile.h"
#include "arch-utils.h"
-#include "floatformat.h"
#include "infcall.h"
#include "regset.h"
#include "target-descriptions.h"
}
}
-/* Implement the print_insn gdbarch method. */
-
-static int
-nios2_print_insn (bfd_vma memaddr, disassemble_info *info)
-{
- if (info->endian == BFD_ENDIAN_BIG)
- return print_insn_big_nios2 (memaddr, info);
- else
- return print_insn_little_nios2 (memaddr, info);
-}
-
-
/* Implement the frame_align gdbarch method. */
static CORE_ADDR
/* Implement the software_single_step gdbarch method. */
-static VEC (CORE_ADDR) *
-nios2_software_single_step (struct frame_info *frame)
+static std::vector<CORE_ADDR>
+nios2_software_single_step (struct regcache *regcache)
{
- struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR next_pc = nios2_get_next_pc (regcache, regcache_read_pc (regcache));
- VEC (CORE_ADDR) *next_pcs = NULL;
-
- VEC_safe_push (CORE_ADDR, next_pcs, next_pc);
- return next_pcs;
+ return {next_pc};
}
/* Implement the get_longjump_target gdbarch method. */
frame_base_set_default (gdbarch, &nios2_frame_base);
- set_gdbarch_print_insn (gdbarch, nios2_print_insn);
-
/* Enable inferior call support. */
set_gdbarch_push_dummy_call (gdbarch, nios2_push_dummy_call);
return gdbarch;
}
-extern initialize_file_ftype _initialize_nios2_tdep; /* -Wmissing-prototypes */
-
void
_initialize_nios2_tdep (void)
{