diff options
author | Jeff Law <law@redhat.com> | 1994-03-25 18:21:49 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-03-25 18:21:49 +0000 |
commit | eb1167c65cbe8bedb5a81796da38d394985d0dfc (patch) | |
tree | 25d434e65873a46285005604ef36a733efbfe97d | |
parent | c8f75fe8575af5ba7a81838e9398b7beebba7d21 (diff) | |
download | gdb-eb1167c65cbe8bedb5a81796da38d394985d0dfc.zip gdb-eb1167c65cbe8bedb5a81796da38d394985d0dfc.tar.gz gdb-eb1167c65cbe8bedb5a81796da38d394985d0dfc.tar.bz2 |
* tm-hppa.h (NUM_REGS): Bump to 128 registers.
(REGISTER_NAMES): Add entries for "right-half" of FP registers.
(REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE): Do not treat FP regs
differently. All registers are four bytes.
(REGISTER_BYTES, REGISTER_BYTE): Simplify now that all registers are
the same size.
(REGISTER_VIRTUAL_TYPE): Use builtin_type_float for all FP regs.
* hppa-tdep.c (pa_print_fp_reg): Update to print even numbered FP
registers as both single and double values (fetching 2nd 32bit half
as necessary). Annotate each register printed with its precision.
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 39 |
2 files changed, 38 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 68a6585..565e2bc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ Fri Mar 25 10:14:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + * tm-hppa.h (NUM_REGS): Bump to 128 registers. + (REGISTER_NAMES): Add entries for "right-half" of FP registers. + (REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE): Do not treat FP regs + differently. All registers are four bytes. + (REGISTER_BYTES, REGISTER_BYTE): Simplify now that all registers are + the same size. + (REGISTER_VIRTUAL_TYPE): Use builtin_type_float for all FP regs. + + * hppa-tdep.c (pa_print_fp_reg): Update to print even numbered FP + registers as both single and double values (fetching 2nd 32bit half + as necessary). Annotate each register printed with its precision. + * paread.c (read_unwind_info): Fix off-by-one error. Fri Mar 25 08:33:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com) diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index ff046f3..42ae0b3 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1220,27 +1220,40 @@ pa_print_fp_reg (i) unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE]; unsigned char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE]; - /* Get the data in raw format. */ + /* Get 32bits of data. */ read_relative_register_raw_bytes (i, raw_buffer); - /* Convert raw data to virtual format if necessary. */ -#ifdef REGISTER_CONVERTIBLE - if (REGISTER_CONVERTIBLE (i)) - { - REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i), - raw_buffer, virtual_buffer); - } - else -#endif - memcpy (virtual_buffer, raw_buffer, - REGISTER_VIRTUAL_SIZE (i)); + /* Put it in the buffer. No conversions are ever necessary. */ + memcpy (virtual_buffer, raw_buffer, REGISTER_RAW_SIZE (i)); fputs_filtered (reg_names[i], gdb_stdout); - print_spaces_filtered (15 - strlen (reg_names[i]), gdb_stdout); + print_spaces_filtered (8 - strlen (reg_names[i]), gdb_stdout); + fputs_filtered ("(single precision) ", gdb_stdout); val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, gdb_stdout, 0, 1, 0, Val_pretty_default); printf_filtered ("\n"); + + /* If "i" is even, then this register can also be a double-precision + FP register. Dump it out as such. */ + if ((i % 2) == 0) + { + /* Get the data in raw format for the 2nd half. */ + read_relative_register_raw_bytes (i + 1, raw_buffer); + + /* Copy it into the appropriate part of the virtual buffer. */ + memcpy (virtual_buffer + REGISTER_RAW_SIZE (i), raw_buffer, + REGISTER_RAW_SIZE (i)); + + /* Dump it as a double. */ + fputs_filtered (reg_names[i], gdb_stdout); + print_spaces_filtered (8 - strlen (reg_names[i]), gdb_stdout); + fputs_filtered ("(double precision) ", gdb_stdout); + + val_print (builtin_type_double, virtual_buffer, 0, gdb_stdout, 0, + 1, 0, Val_pretty_default); + printf_filtered ("\n"); + } } /* Function calls that pass into a new compilation unit must pass through a |