/* Target-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of GDB.
#include "frv-tdep.h"
#include "objfiles.h"
-extern void _initialize_frv_tdep (void);
-
struct frv_unwind_cache /* was struct frame_extra_info */
{
/* The previous frame's inner-most stack address. Used as this
}
static enum register_status
-frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+frv_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
int reg, gdb_byte *buffer)
{
enum register_status status;
if (reg == iacc0_regnum)
{
- status = regcache_raw_read (regcache, iacc0h_regnum, buffer);
+ status = regcache->raw_read (iacc0h_regnum, buffer);
if (status == REG_VALID)
- status = regcache_raw_read (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
+ status = regcache->raw_read (iacc0l_regnum, (bfd_byte *) buffer + 4);
}
else if (accg0_regnum <= reg && reg <= accg7_regnum)
{
int byte_num = (reg - accg0_regnum) % 4;
gdb_byte buf[4];
- status = regcache_raw_read (regcache, raw_regnum, buf);
+ status = regcache->raw_read (raw_regnum, buf);
if (status == REG_VALID)
{
memset (buffer, 0, 4);
{
if (reg == iacc0_regnum)
{
- regcache_raw_write (regcache, iacc0h_regnum, buffer);
- regcache_raw_write (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
+ regcache->raw_write (iacc0h_regnum, buffer);
+ regcache->raw_write (iacc0l_regnum, (bfd_byte *) buffer + 4);
}
else if (accg0_regnum <= reg && reg <= accg7_regnum)
{
int byte_num = (reg - accg0_regnum) % 4;
gdb_byte buf[4];
- regcache_raw_read (regcache, raw_regnum, buf);
+ regcache->raw_read (raw_regnum, buf);
buf[byte_num] = ((bfd_byte *) buffer)[0];
- regcache_raw_write (regcache, raw_regnum, buf);
+ regcache->raw_write (raw_regnum, buf);
}
}
frv_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
bfd_byte val[4];
memset (val, 0, sizeof (val));
memcpy (val + (4 - len), valbuf, len);
- regcache_cooked_write (regcache, 8, val);
+ regcache->cooked_write (8, val);
}
else if (len == 8)
{
- regcache_cooked_write (regcache, 8, valbuf);
- regcache_cooked_write (regcache, 9, (bfd_byte *) valbuf + 4);
+ regcache->cooked_write (8, valbuf);
+ regcache->cooked_write (9, (bfd_byte *) valbuf + 4);
}
else
internal_error (__FILE__, __LINE__,
break;
}
- set_gdbarch_print_insn (gdbarch, print_insn_frv);
if (frv_abi (gdbarch) == FRV_ABI_FDPIC)
set_gdbarch_convert_from_func_ptr_addr (gdbarch,
frv_convert_from_func_ptr_addr);