- int i;
- int bothstatus;
- int top;
- int fpreg;
- unsigned char *p;
-
- bothstatus = ((status != 0) && (ep->status != 0));
- if (status != 0)
- {
- if (bothstatus)
- printf_unfiltered ("u: ");
- print_387_status_word (status);
- }
-
- if (ep->status != 0)
- {
- if (bothstatus)
- printf_unfiltered ("e: ");
- print_387_status_word (ep->status);
- }
-
- print_387_control_word (ep->control);
- printf_unfiltered ("last exception: ");
- printf_unfiltered ("opcode %s; ", local_hex_string(ep->opcode));
- printf_unfiltered ("pc %s:", local_hex_string(ep->code_seg));
- printf_unfiltered ("%s; ", local_hex_string(ep->eip));
- printf_unfiltered ("operand %s", local_hex_string(ep->operand_seg));
- printf_unfiltered (":%s\n", local_hex_string(ep->operand));
-
- top = (ep->status >> 11) & 7;
-
- printf_unfiltered ("regno tag msb lsb value\n");
- for (fpreg = 7; fpreg >= 0; fpreg--)
- {
- double val;
-
- printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg);
-
- switch ((ep->tag >> (fpreg * 2)) & 3)
- {
- case 0: printf_unfiltered ("valid "); break;
- case 1: printf_unfiltered ("zero "); break;
- case 2: printf_unfiltered ("trap "); break;
- case 3: printf_unfiltered ("empty "); break;
- }
- for (i = 9; i >= 0; i--)
- printf_unfiltered ("%02x", ep->regs[fpreg][i]);
-
- floatformat_to_double (&floatformat_i387_ext, (char *)ep->regs[fpreg],
- &val);
- printf_unfiltered (" %g\n", val);
- }
- if (ep->r0)
- printf_unfiltered ("warning: reserved0 is %s\n", local_hex_string(ep->r0));
- if (ep->r1)
- printf_unfiltered ("warning: reserved1 is %s\n", local_hex_string(ep->r1));
- if (ep->r2)
- printf_unfiltered ("warning: reserved2 is %s\n", local_hex_string(ep->r2));
- if (ep->r3)
- printf_unfiltered ("warning: reserved3 is %s\n", local_hex_string(ep->r3));
+ struct reg_addr *reg_addr = arg;
+ struct i386_debug_state regs;
+
+ i386_gnu_dr_get (®s, thread);
+ regs.dr[reg_addr->regnum] = reg_addr->addr;
+ i386_gnu_dr_set (®s, thread);