diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-22 22:14:04 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-22 22:14:04 +0000 |
commit | dfd4c728fa4aad5c2975966d280d3ae976dce121 (patch) | |
tree | d7d02525a949f01b4af79801638d678cba06740c /gdb/i386aix-nat.c | |
parent | a4738d5ed28c73761c121d19b599c688aa7c30ed (diff) | |
download | fsf-binutils-gdb-dfd4c728fa4aad5c2975966d280d3ae976dce121.zip fsf-binutils-gdb-dfd4c728fa4aad5c2975966d280d3ae976dce121.tar.gz fsf-binutils-gdb-dfd4c728fa4aad5c2975966d280d3ae976dce121.tar.bz2 |
* i386aix-nat.c (i386_float_info): Reverse order of registers before
passing them to print_387_status.
(print_387_status): Don't subtract top from 7 before using it.
* i387-tdep.c: Remove comment about AIX wanting "top" subtracted
from 7; the above explains it.
Diffstat (limited to 'gdb/i386aix-nat.c')
-rw-r--r-- | gdb/i386aix-nat.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gdb/i386aix-nat.c b/gdb/i386aix-nat.c index 0c26c8f..15e02b0 100644 --- a/gdb/i386aix-nat.c +++ b/gdb/i386aix-nat.c @@ -145,16 +145,16 @@ print_387_status (status, ep) 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 = 7- ((ep->status >> 11) & 7); - + + 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 >> ((7 - fpreg) * 2)) & 3) { case 0: printf_unfiltered ("valid "); break; @@ -177,6 +177,10 @@ i386_float_info () { struct env387 fps; int fpsaved = 0; + /* We need to reverse the order of the registers. Apparently AIX stores + the highest-numbered ones first. */ + struct env387 fps_fixed; + int i; if (inferior_pid) { @@ -210,8 +214,10 @@ i386_float_info () MIN(10, sizeof(fps) - offset)); } } - - print_387_status (0, (struct env387 *)&fps); + fps_fixed = fps; + for (i = 0; i < 8; ++i) + memcpy (fps_fixed.regs[i], fps.regs[7 - i], 10); + print_387_status (0, &fps_fixed); } /* Fetch one register. */ |