/* Target-dependent code for FreeBSD/mips.
- Copyright (C) 2017 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of GDB.
mips_fbsd_supply_fpregs (struct regcache *regcache, int regnum,
const void *fpregs, size_t regsize)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
const gdb_byte *regs = (const gdb_byte *) fpregs;
int i, fp0num;
mips_fbsd_supply_gregs (struct regcache *regcache, int regnum,
const void *gregs, size_t regsize)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
mips_fbsd_collect_fpregs (const struct regcache *regcache, int regnum,
void *fpregs, size_t regsize)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
gdb_byte *regs = (gdb_byte *) fpregs;
int i, fp0num;
mips_fbsd_collect_gregs (const struct regcache *regcache, int regnum,
void *gregs, size_t regsize)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
gdb_byte *regs = (gdb_byte *) gregs;
int i;
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+ size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_FPREGS * regsize);
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
- size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+ size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_FPREGS * regsize);
struct regcache *regcache, int regnum,
const void *gregs, size_t len)
{
- size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+ size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_GREGS * regsize);
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
+ size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_GREGS * regsize);
{
size_t regsize = mips_abi_regsize (gdbarch);
- cb (".reg", MIPS_FBSD_NUM_GREGS * regsize, &mips_fbsd_gregset,
- NULL, cb_data);
- cb (".reg2", MIPS_FBSD_NUM_FPREGS * regsize, &mips_fbsd_fpregset,
- NULL, cb_data);
+ cb (".reg", MIPS_FBSD_NUM_GREGS * regsize, MIPS_FBSD_NUM_GREGS * regsize,
+ &mips_fbsd_gregset, NULL, cb_data);
+ cb (".reg2", MIPS_FBSD_NUM_FPREGS * regsize, MIPS_FBSD_NUM_FPREGS * regsize,
+ &mips_fbsd_fpregset, NULL, cb_data);
}
/* Signal trampoline support. */
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { MIPS_INST_ADDIU_A0_SP_O32, -1 }, /* addiu a0, sp, SIGF_UC */
- { MIPS_INST_LI_V0_SIGRETURN, -1 }, /* li v0, SYS_sigreturn */
- { MIPS_INST_SYSCALL, -1 }, /* syscall */
- { MIPS_INST_BREAK, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_ADDIU_A0_SP_O32, ULONGEST_MAX }, /* addiu a0, sp, SIGF_UC */
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX }, /* li v0, SYS_sigreturn */
+ { MIPS_INST_SYSCALL, ULONGEST_MAX }, /* syscall */
+ { MIPS_INST_BREAK, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_fbsd_sigframe_init
};
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { MIPS_INST_ADDIU_A0_SP_N32, -1 }, /* addiu a0, sp, SIGF_UC */
- { MIPS_INST_LI_V0_SIGRETURN, -1 }, /* li v0, SYS_sigreturn */
- { MIPS_INST_SYSCALL, -1 }, /* syscall */
- { MIPS_INST_BREAK, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_ADDIU_A0_SP_N32, ULONGEST_MAX }, /* addiu a0, sp, SIGF_UC */
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX }, /* li v0, SYS_sigreturn */
+ { MIPS_INST_SYSCALL, ULONGEST_MAX }, /* syscall */
+ { MIPS_INST_BREAK, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips64_fbsd_sigframe_init
};
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { MIPS_INST_DADDIU_A0_SP_N64, -1 }, /* daddiu a0, sp, SIGF_UC */
- { MIPS_INST_LI_V0_SIGRETURN, -1 }, /* li v0, SYS_sigreturn */
- { MIPS_INST_SYSCALL, -1 }, /* syscall */
- { MIPS_INST_BREAK, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_DADDIU_A0_SP_N64, ULONGEST_MAX }, /* daddiu a0, sp, SIGF_UC */
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX }, /* li v0, SYS_sigreturn */
+ { MIPS_INST_SYSCALL, ULONGEST_MAX }, /* syscall */
+ { MIPS_INST_BREAK, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips64_fbsd_sigframe_init
};