diff options
author | Mark Kettenis <kettenis@gnu.org> | 2002-11-03 12:32:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2002-11-03 12:32:42 +0000 |
commit | 1d70089aecbf9b18b944bd61707db3c541e2d429 (patch) | |
tree | acdcb0457307baed8ce798e48b285d6108dd954f | |
parent | 63a23799427cf70f5a1dde8db6f98caa1c9ce88b (diff) | |
download | gdb-1d70089aecbf9b18b944bd61707db3c541e2d429.zip gdb-1d70089aecbf9b18b944bd61707db3c541e2d429.tar.gz gdb-1d70089aecbf9b18b944bd61707db3c541e2d429.tar.bz2 |
* i387-tdep.c (i387_print_float_info): Replace calls to
register_read and deprecated_read_register_gen with calls to
frame_register_read, and make the necessary adjustments to the
surrounding code.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/i387-tdep.c | 45 |
2 files changed, 34 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aa2484d..06899a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-11-03 Mark Kettenis <kettenis@gnu.org> + + * i387-tdep.c (i387_print_float_info): Replace calls to + register_read and deprecated_read_register_gen with calls to + frame_register_read, and make the necessary adjustments to the + surrounding code. + 2002-11-02 Andrew Cagney <ac131313@redhat.com> * gdbarch.sh (register_reggroup_p): Allow default value. diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 53d2ae8..e465690 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -321,26 +321,35 @@ void i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) { - unsigned int fctrl; - unsigned int fstat; - unsigned int ftag; - unsigned int fiseg; - unsigned int fioff; - unsigned int foseg; - unsigned int fooff; - unsigned int fop; + char buf[4]; + ULONGEST fctrl; + ULONGEST fstat; + ULONGEST ftag; + ULONGEST fiseg; + ULONGEST fioff; + ULONGEST foseg; + ULONGEST fooff; + ULONGEST fop; int fpreg; int top; - fctrl = read_register (FCTRL_REGNUM); - fstat = read_register (FSTAT_REGNUM); - ftag = read_register (FTAG_REGNUM); - fiseg = read_register (FCS_REGNUM); - fioff = read_register (FCOFF_REGNUM); - foseg = read_register (FDS_REGNUM); - fooff = read_register (FDOFF_REGNUM); - fop = read_register (FOP_REGNUM); - + frame_register_read (frame, FCTRL_REGNUM, buf); + fctrl = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FSTAT_REGNUM, buf); + fstat = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FTAG_REGNUM, buf); + ftag = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FISEG_REGNUM, buf); + fiseg = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FIOFF_REGNUM, buf); + fioff = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FOSEG_REGNUM, buf); + foseg = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FOOFF_REGNUM, buf); + fooff = extract_unsigned_integer (buf, 4); + frame_register_read (frame, FOP_REGNUM, buf); + fop = extract_unsigned_integer (buf, 4); + top = ((fstat >> 11) & 7); for (fpreg = 7; fpreg >= 0; fpreg--) @@ -367,7 +376,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, break; } - deprecated_read_register_gen ((fpreg + 8 - top) % 8 + FP0_REGNUM, raw); + frame_register_read (frame, (fpreg + 8 - top) % 8 + FP0_REGNUM, raw); fputs_filtered ("0x", file); for (i = 9; i >= 0; i--) |