* mips64obsd-nat.c: Include "mips-tdep.h".
(MIPS64OBSD_NUM_REGS): Remove define. (MIPS_PC_REGNUM, MIPS_FP0_REGNUM, MIPS_FSR_REGNUM): New defines. (mips64obsd_supply_gregset, mips64obsd_collect_gregset): Handle floating-point registers correctly. * Makefile.in (mips64obsd-nat.o): Update dependencies.
This commit is contained in:
parent
8e763687bf
commit
366e93e85b
@ -1,5 +1,12 @@
|
|||||||
2004-11-07 Mark Kettenis <kettenis@gnu.org>
|
2004-11-07 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* mips64obsd-nat.c: Include "mips-tdep.h".
|
||||||
|
(MIPS64OBSD_NUM_REGS): Remove define.
|
||||||
|
(MIPS_PC_REGNUM, MIPS_FP0_REGNUM, MIPS_FSR_REGNUM): New defines.
|
||||||
|
(mips64obsd_supply_gregset, mips64obsd_collect_gregset): Handle
|
||||||
|
floating-point registers correctly.
|
||||||
|
* Makefile.in (mips64obsd-nat.o): Update dependencies.
|
||||||
|
|
||||||
* mips64obsd-tdep.c: Include "trad-frame.h", "tramp-frame.h" and
|
* mips64obsd-tdep.c: Include "trad-frame.h", "tramp-frame.h" and
|
||||||
"gdb_assert.h".
|
"gdb_assert.h".
|
||||||
(mips64obsd_sigframe_init): New function.
|
(mips64obsd_sigframe_init): New function.
|
||||||
|
@ -2236,7 +2236,7 @@ mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
|
|||||||
minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
|
minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
|
||||||
$(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h)
|
$(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h)
|
||||||
mips64obsd-nat.o: mips64obsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
|
mips64obsd-nat.o: mips64obsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
|
||||||
$(target_h) $(inf_ptrace_h)
|
$(target_h) $(mips_tdep_h) $(inf_ptrace_h)
|
||||||
mips64obsd-tdep.o: mips64obsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) \
|
mips64obsd-tdep.o: mips64obsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) \
|
||||||
$(regset_h) $(trad_frame_h) $(tramp_frame_h) $gdb_assert_h) \
|
$(regset_h) $(trad_frame_h) $(tramp_frame_h) $gdb_assert_h) \
|
||||||
$(gdb_string_h) $(mips_tdep_h) $(solib_svr4_h)
|
$(gdb_string_h) $(mips_tdep_h) $(solib_svr4_h)
|
||||||
|
@ -28,9 +28,13 @@
|
|||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#include <machine/reg.h>
|
#include <machine/reg.h>
|
||||||
|
|
||||||
|
#include "mips-tdep.h"
|
||||||
#include "inf-ptrace.h"
|
#include "inf-ptrace.h"
|
||||||
|
|
||||||
#define MIPS64OBSD_NUM_REGS 73
|
/* Shorthand for some register numbers used below. */
|
||||||
|
#define MIPS_PC_REGNUM MIPS_EMBED_PC_REGNUM
|
||||||
|
#define MIPS_FP0_REGNUM MIPS_EMBED_FP0_REGNUM
|
||||||
|
#define MIPS_FSR_REGNUM MIPS_EMBED_FP0_REGNUM + 32
|
||||||
|
|
||||||
/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
|
/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
|
||||||
|
|
||||||
@ -40,8 +44,11 @@ mips64obsd_supply_gregset (struct regcache *regcache, const void *gregs)
|
|||||||
const char *regs = gregs;
|
const char *regs = gregs;
|
||||||
int regnum;
|
int regnum;
|
||||||
|
|
||||||
for (regnum = 0; regnum < MIPS64OBSD_NUM_REGS; regnum++)
|
for (regnum = MIPS_ZERO_REGNUM; regnum <= MIPS_PC_REGNUM; regnum++)
|
||||||
regcache_raw_supply (regcache, regnum, regs + regnum * 8);
|
regcache_raw_supply (regcache, regnum, regs + regnum * 8);
|
||||||
|
|
||||||
|
for (regnum = MIPS_FP0_REGNUM; regnum <= MIPS_FSR_REGNUM; regnum++)
|
||||||
|
regcache_raw_supply (regcache, regnum, regs + (regnum + 2) * 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Collect the general-purpose registers from REGCACHE and store them
|
/* Collect the general-purpose registers from REGCACHE and store them
|
||||||
@ -54,11 +61,17 @@ mips64obsd_collect_gregset (const struct regcache *regcache,
|
|||||||
char *regs = gregs;
|
char *regs = gregs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i <= MIPS64OBSD_NUM_REGS; i++)
|
for (i = MIPS_ZERO_REGNUM; i <= MIPS_PC_REGNUM; i++)
|
||||||
{
|
{
|
||||||
if (regnum == -1 || regnum == i)
|
if (regnum == -1 || regnum == i)
|
||||||
regcache_raw_collect (regcache, i, regs + i * 8);
|
regcache_raw_collect (regcache, i, regs + i * 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
|
||||||
|
{
|
||||||
|
if (regnum == -1 || regnum == i)
|
||||||
|
regcache_raw_collect (regcache, i, regs + (i + 2) * 8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user