- int val, regno;
- struct user u;
- struct exception_stack *pes = (struct exception_stack *) core_reg_sect;
-#define es (*pes)
- char *buf;
-
- if (which == 0) {
- if (core_reg_size <
- ((char *) &es.e_offset - (char *) &es.e_regs[R0]))
- error ("Not enough registers in core file");
- for (regno = 0; (regno < PS_REGNUM); regno++)
- supply_register (regno, &es.e_regs[regno + R0]);
- val = es.e_PS;
- supply_register (regno++, &val);
- supply_register (regno++, &es.e_PC);
-
- } else if (which == 2) {
-
- /* FIXME: This may not work if the float regs and control regs are
- discontinuous. */
- for (regno = FP0_REGNUM, buf = core_reg_sect;
- (regno < NUM_REGS);
- buf += REGISTER_RAW_SIZE (regno), regno++)
- {
- supply_register (regno, buf);
- }
- }