jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
- if (target_read_memory (jb_addr
- + MIPS_LINUX_JB_PC * MIPS_LINUX_JB_ELEMENT_SIZE,
+ if (target_read_memory ((jb_addr
+ + MIPS_LINUX_JB_PC * MIPS_LINUX_JB_ELEMENT_SIZE),
buf, gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT))
return 0;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[MAX_REGISTER_SIZE];
store_signed_integer (buf, register_size (gdbarch, regnum), byte_order,
- extract_signed_integer (addr, 4, byte_order));
+ extract_signed_integer (addr, 4, byte_order));
regcache_raw_supply (regcache, regnum, buf);
}
static void
mips_supply_gregset_wrapper (const struct regset *regset,
- struct regcache *regcache,
- int regnum, const void *gregs, size_t len)
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
{
gdb_assert (len == sizeof (mips_elf_gregset_t));
static void
mips_supply_fpregset_wrapper (const struct regset *regset,
- struct regcache *regcache,
- int regnum, const void *gregs, size_t len)
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
{
gdb_assert (len == sizeof (mips_elf_fpregset_t));
for (regi = MIPS64_EF_REG0 + 1; regi <= MIPS64_EF_REG31; regi++)
supply_64bit_reg (regcache, regi - MIPS64_EF_REG0,
- (const gdb_byte *)(regp + regi));
+ (const gdb_byte *) (regp + regi));
if (mips_linux_restart_reg_p (gdbarch))
supply_64bit_reg (regcache, MIPS_RESTART_REGNUM,
- (const gdb_byte *)(regp + MIPS64_EF_REG0));
+ (const gdb_byte *) (regp + MIPS64_EF_REG0));
supply_64bit_reg (regcache, mips_regnum (gdbarch)->lo,
(const gdb_byte *) (regp + MIPS64_EF_LO));
static void
mips64_supply_gregset_wrapper (const struct regset *regset,
- struct regcache *regcache,
- int regnum, const void *gregs, size_t len)
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
{
gdb_assert (len == sizeof (mips64_elf_gregset_t));
{
memset (regp, 0, sizeof (mips64_elf_gregset_t));
for (regi = 1; regi < 32; regi++)
- mips64_fill_gregset (regcache, gregsetp, regi);
+ mips64_fill_gregset (regcache, gregsetp, regi);
mips64_fill_gregset (regcache, gregsetp, mips_regnum (gdbarch)->lo);
mips64_fill_gregset (regcache, gregsetp, mips_regnum (gdbarch)->hi);
mips64_fill_gregset (regcache, gregsetp, mips_regnum (gdbarch)->pc);
if (register_size (gdbarch, gdbarch_fp0_regnum (gdbarch)) == 4)
for (regi = 0; regi < 32; regi++)
{
- const gdb_byte *reg_ptr = (const gdb_byte *)(*fpregsetp + (regi & ~1));
+ const gdb_byte *reg_ptr
+ = (const gdb_byte *) (*fpregsetp + (regi & ~1));
if ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) != (regi & 1))
reg_ptr += 4;
regcache_raw_supply (regcache,
for (regi = 0; regi < 32; regi++)
regcache_raw_supply (regcache,
gdbarch_fp0_regnum (gdbarch) + regi,
- (const char *)(*fpregsetp + regi));
+ (const char *) (*fpregsetp + regi));
supply_32bit_reg (regcache, mips_regnum (gdbarch)->fp_control_status,
- (const gdb_byte *)(*fpregsetp + 32));
+ (const gdb_byte *) (*fpregsetp + 32));
/* The ABI doesn't tell us how to supply FCRIR, and core dumps don't
include it - but the result of PTRACE_GETFPREGS does. The best we
can do is to assume that its value is present. */
supply_32bit_reg (regcache,
mips_regnum (gdbarch)->fp_implementation_revision,
- (const gdb_byte *)(*fpregsetp + 32) + 4);
+ (const gdb_byte *) (*fpregsetp + 32) + 4);
}
static void
mips64_supply_fpregset_wrapper (const struct regset *regset,
- struct regcache *regcache,
- int regnum, const void *gregs, size_t len)
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
{
gdb_assert (len == sizeof (mips64_elf_fpregset_t));
mips64_fill_fpregset (regcache, fpregsetp,
mips_regnum (gdbarch)->fp_control_status);
mips64_fill_fpregset (regcache, fpregsetp,
- (mips_regnum (gdbarch)
- ->fp_implementation_revision));
+ mips_regnum (gdbarch)->fp_implementation_revision);
}
}
static const struct regset *
mips_linux_regset_from_core_section (struct gdbarch *gdbarch,
- const char *sect_name, size_t sect_size)
+ const char *sect_name, size_t sect_size)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
mips_elf_gregset_t gregset;
{
if (tdep->gregset == NULL)
tdep->gregset = regset_alloc (gdbarch,
- mips_supply_gregset_wrapper,
- mips_fill_gregset_wrapper);
+ mips_supply_gregset_wrapper,
+ mips_fill_gregset_wrapper);
return tdep->gregset;
}
else if (sect_size == sizeof (gregset64))
{
if (tdep->gregset64 == NULL)
tdep->gregset64 = regset_alloc (gdbarch,
- mips64_supply_gregset_wrapper,
- mips64_fill_gregset_wrapper);
+ mips64_supply_gregset_wrapper,
+ mips64_fill_gregset_wrapper);
return tdep->gregset64;
}
else
{
if (tdep->fpregset == NULL)
tdep->fpregset = regset_alloc (gdbarch,
- mips_supply_fpregset_wrapper,
- mips_fill_fpregset_wrapper);
+ mips_supply_fpregset_wrapper,
+ mips_fill_fpregset_wrapper);
return tdep->fpregset;
}
else if (sect_size == sizeof (fpregset64))
{
if (tdep->fpregset64 == NULL)
tdep->fpregset64 = regset_alloc (gdbarch,
- mips64_supply_fpregset_wrapper,
- mips64_fill_fpregset_wrapper);
+ mips64_supply_fpregset_wrapper,
+ mips64_fill_fpregset_wrapper);
return tdep->fpregset64;
}
else
for (ireg = 1; ireg < 32; ireg++)
trad_frame_set_reg_addr (this_cache,
- ireg + MIPS_ZERO_REGNUM
- + gdbarch_num_regs (gdbarch),
- regs_base + SIGCONTEXT_REGS
- + ireg * SIGCONTEXT_REG_SIZE);
+ (ireg + MIPS_ZERO_REGNUM
+ + gdbarch_num_regs (gdbarch)),
+ (regs_base + SIGCONTEXT_REGS
+ + ireg * SIGCONTEXT_REG_SIZE));
/* The way that floating point registers are saved, unfortunately,
depends on the architecture the kernel is built for. For the r3000 and
for (ireg = 0; ireg < 32; ireg++)
if ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) != (ireg & 1))
trad_frame_set_reg_addr (this_cache,
- ireg + regs->fp0 +
- gdbarch_num_regs (gdbarch),
- sigcontext_base + SIGCONTEXT_FPREGS + 4
- + (ireg & ~1) * SIGCONTEXT_REG_SIZE);
+ ireg + regs->fp0 + gdbarch_num_regs (gdbarch),
+ (sigcontext_base + SIGCONTEXT_FPREGS + 4
+ + (ireg & ~1) * SIGCONTEXT_REG_SIZE));
else
trad_frame_set_reg_addr (this_cache,
- ireg + regs->fp0
- + gdbarch_num_regs (gdbarch),
- sigcontext_base + SIGCONTEXT_FPREGS
- + (ireg & ~1) * SIGCONTEXT_REG_SIZE);
+ ireg + regs->fp0 + gdbarch_num_regs (gdbarch),
+ (sigcontext_base + SIGCONTEXT_FPREGS
+ + (ireg & ~1) * SIGCONTEXT_REG_SIZE));
trad_frame_set_reg_addr (this_cache,
regs->pc + gdbarch_num_regs (gdbarch),
regs_base + SIGCONTEXT_PC);
trad_frame_set_reg_addr (this_cache,
- regs->fp_control_status
- + gdbarch_num_regs (gdbarch),
+ (regs->fp_control_status
+ + gdbarch_num_regs (gdbarch)),
sigcontext_base + SIGCONTEXT_FPCSR);
if (regs->dspctl != -1)
for (ireg = 1; ireg < 32; ireg++)
trad_frame_set_reg_addr (this_cache,
- ireg + MIPS_ZERO_REGNUM
- + gdbarch_num_regs (gdbarch),
- sigcontext_base + N64_SIGCONTEXT_REGS
- + ireg * N64_SIGCONTEXT_REG_SIZE);
+ (ireg + MIPS_ZERO_REGNUM
+ + gdbarch_num_regs (gdbarch)),
+ (sigcontext_base + N64_SIGCONTEXT_REGS
+ + ireg * N64_SIGCONTEXT_REG_SIZE));
for (ireg = 0; ireg < 32; ireg++)
trad_frame_set_reg_addr (this_cache,
- ireg + regs->fp0
- + gdbarch_num_regs (gdbarch),
- sigcontext_base + N64_SIGCONTEXT_FPREGS
- + ireg * N64_SIGCONTEXT_REG_SIZE);
+ ireg + regs->fp0 + gdbarch_num_regs (gdbarch),
+ (sigcontext_base + N64_SIGCONTEXT_FPREGS
+ + ireg * N64_SIGCONTEXT_REG_SIZE));
trad_frame_set_reg_addr (this_cache,
regs->pc + gdbarch_num_regs (gdbarch),
sigcontext_base + N64_SIGCONTEXT_PC);
trad_frame_set_reg_addr (this_cache,
- regs->fp_control_status
- + gdbarch_num_regs (gdbarch),
+ (regs->fp_control_status
+ + gdbarch_num_regs (gdbarch)),
sigcontext_base + N64_SIGCONTEXT_FPCSR);
trad_frame_set_reg_addr (this_cache,
return ret;
}
-/* Translate signals based on MIPS signal values.
+/* Translate signals based on MIPS signal values.
Adapted from gdb/common/signals.c. */
static enum gdb_signal
mips_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
{
- switch (signo)
+ switch (signo)
{
case 0:
return GDB_SIGNAL_0;
{
case MIPS_ABI_O32:
set_gdbarch_get_longjmp_target (gdbarch,
- mips_linux_get_longjmp_target);
+ mips_linux_get_longjmp_target);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
tramp_frame_prepend_unwinder (gdbarch, &mips_linux_o32_sigframe);
break;
case MIPS_ABI_N32:
set_gdbarch_get_longjmp_target (gdbarch,
- mips_linux_get_longjmp_target);
+ mips_linux_get_longjmp_target);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
set_gdbarch_long_double_bit (gdbarch, 128);
break;
case MIPS_ABI_N64:
set_gdbarch_get_longjmp_target (gdbarch,
- mips64_linux_get_longjmp_target);
+ mips64_linux_get_longjmp_target);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);
set_gdbarch_long_double_bit (gdbarch, 128);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
- svr4_fetch_objfile_link_map);
+ svr4_fetch_objfile_link_map);
/* Initialize this lazily, to avoid an initialization order
dependency on solib-svr4.c's _initialize routine. */