/* GNU/Linux on ARM target support.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of GDB.
#include "target.h"
#include "value.h"
#include "gdbtypes.h"
-#include "floatformat.h"
#include "gdbcore.h"
#include "frame.h"
#include "regcache.h"
-#include "doublest.h"
#include "solib-svr4.h"
#include "osabi.h"
#include "regset.h"
struct regcache *regcache,
int regnum, const void *gregs_buf, size_t len)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
ULONGEST sp;
unsigned long sp_data;
CORE_ADDR next_pc = 0;
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int pc_offset = 0;
int is_sigreturn = 0;
}
else
{
- struct gdbarch *gdbarch = get_regcache_arch (self->regcache);
+ struct gdbarch *gdbarch = self->regcache->arch ();
enum bfd_endian byte_order_for_code =
gdbarch_byte_order_for_code (gdbarch);
unsigned long this_instr =
static std::vector<CORE_ADDR>
arm_linux_software_single_step (struct regcache *regcache)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
struct arm_get_next_pcs next_pcs_ctx;
/* If the target does have hardware single step, GDB doesn't have
static void
arm_linux_cleanup_svc (struct gdbarch *gdbarch,
struct regcache *regs,
- struct displaced_step_closure *dsc)
+ arm_displaced_step_closure *dsc)
{
ULONGEST apparent_pc;
int within_scratch;
static int
arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs,
- struct displaced_step_closure *dsc)
+ arm_displaced_step_closure *dsc)
{
CORE_ADDR return_to = 0;
{
inferior_thread ()->control.step_resume_breakpoint
= set_momentary_breakpoint (gdbarch, sal, get_frame_id (frame),
- bp_step_resume);
+ bp_step_resume).release ();
/* set_momentary_breakpoint invalidates FRAME. */
frame = NULL;
static void
cleanup_kernel_helper_return (struct gdbarch *gdbarch,
struct regcache *regs,
- struct displaced_step_closure *dsc)
+ arm_displaced_step_closure *dsc)
{
displaced_write_reg (regs, dsc, ARM_LR_REGNUM, dsc->tmp[0], CANNOT_WRITE_PC);
displaced_write_reg (regs, dsc, ARM_PC_REGNUM, dsc->tmp[0], BRANCH_WRITE_PC);
static void
arm_catch_kernel_helper_return (struct gdbarch *gdbarch, CORE_ADDR from,
CORE_ADDR to, struct regcache *regs,
- struct displaced_step_closure *dsc)
+ arm_displaced_step_closure *dsc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR from, CORE_ADDR to,
struct regcache *regs)
{
- struct displaced_step_closure *dsc = XNEW (struct displaced_step_closure);
+ arm_displaced_step_closure *dsc = new arm_displaced_step_closure;
/* Detect when we enter an (inaccessible by GDB) Linux kernel helper, and
stop at the return location. */
return find_solib_trampoline_target (frame, pc);
}
+/* Implement the gcc_target_options gdbarch method. */
+
+static char *
+arm_linux_gcc_target_options (struct gdbarch *gdbarch)
+{
+ /* GCC doesn't know "-m32". */
+ return NULL;
+}
+
static void
arm_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
arm_linux_record_tdep.arg5 = ARM_A1_REGNUM + 4;
arm_linux_record_tdep.arg6 = ARM_A1_REGNUM + 5;
arm_linux_record_tdep.arg7 = ARM_A1_REGNUM + 6;
+
+ set_gdbarch_gcc_target_options (gdbarch, arm_linux_gcc_target_options);
}
void