26 #include <sys/ptrace.h>
28 #include <sys/procfs.h>
40 #define M32R_LINUX_NUM_REGS (M32R_NUM_REGS - 1)
45 4, 5, 6, 7, 0, 1, 2, 8,
46 9, 10, 11, 12, 13, 24, 25, 23,
47 19, 19, 26, 23, 22, 20, 16, 15
51 #define BBPSW_REGMAP 21
56 #define GETREGS_SUPPLIES(regno) (0 <= (regno) \
57 && (regno) <= M32R_LINUX_NUM_REGS)
70 const elf_greg_t *regp = (
const elf_greg_t *) gregsetp;
72 unsigned long psw, bbpsw;
84 regval = ((0x00c1 & bbpsw) << 8) | ((0xc100 & psw) >> 8);
87 regval = ((psw >> 8) & 1);
90 regval = *(regp +
regmap[i]);
96 else if (psw & 0x8000)
123 elf_gregset_t * gregsetp,
int regno)
125 elf_greg_t *regp = (elf_greg_t *) gregsetp;
127 unsigned long psw, bbpsw, tmp;
134 if (regno != -1 && regno != i)
145 else if (psw & 0x8000)
214 _(
"Got request for bad register number %d."), regno);
239 _(
"Got request to store bad register number %d."), regno);
void _initialize_m32r_linux_nat(void)
static void m32r_linux_fetch_inferior_registers(struct target_ops *ops, struct regcache *regcache, int regno)
void internal_error(const char *file, int line, const char *fmt,...)
#define M32R_LINUX_NUM_REGS
static void store_regs(const struct regcache *regcache, int tid, int regno)
void fill_gregset(const struct regcache *regcache, elf_gregset_t *gregsetp, int regno)
GDB_FPREGSET_T gdb_fpregset_t
#define GETREGS_SUPPLIES(regno)
static void m32r_linux_store_inferior_registers(struct target_ops *ops, struct regcache *regcache, int regno)
void linux_nat_add_target(struct target_ops *t)
struct target_ops * linux_target(void)
int ptid_get_pid(ptid_t ptid)
void supply_fpregset(struct regcache *regcache, const gdb_fpregset_t *fpregs)
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
void fill_fpregset(const struct regcache *regcache, gdb_fpregset_t *fpregs, int regno)
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
void supply_gregset(struct regcache *regcache, const elf_gregset_t *gregsetp)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
static void fetch_regs(struct regcache *regcache, int tid)
long ptid_get_lwp(ptid_t ptid)
void regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())