diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-08-15 23:41:20 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-08-15 23:41:20 +0000 |
commit | 23e3a7ac79ad6f6648bd99602ba715874ce9ac9a (patch) | |
tree | aeb8f594b82b8208465506f08189bc44ca618e88 /gdb/infcmd.c | |
parent | 8de397a5ad45db45f00ce9b58c2b8b2d7b5aa765 (diff) | |
download | fsf-binutils-gdb-23e3a7ac79ad6f6648bd99602ba715874ce9ac9a.zip fsf-binutils-gdb-23e3a7ac79ad6f6648bd99602ba715874ce9ac9a.tar.gz fsf-binutils-gdb-23e3a7ac79ad6f6648bd99602ba715874ce9ac9a.tar.bz2 |
2002-08-15 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (PRINT_FLOAT_INFO): Change to a predicate method.
Add `args' parameter.
* gdbarch.h, gdbarch.c: Regenerate.
* arm-tdep.c (arm_print_float_info): Add the parameter `args'.
* infcmd.c (float_info): Call print_float_info.
(print_float_info): New function. By default, print the
floating-point registers.
* arch-utils.h (default_print_float_info): Delete declaration.
* arch-utils.c (default_print_float_info): Delete function.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 83267ad..42bb532 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1845,9 +1845,44 @@ interrupt_target_command (char *args, int from_tty) /* ARGSUSED */ static void -float_info (char *addr_exp, int from_tty) +print_float_info (struct gdbarch *gdbarch, struct ui_file *file, + struct frame_info *frame, const char *args) { - gdbarch_print_float_info (current_gdbarch, gdb_stdout, selected_frame); + if (gdbarch_print_float_info_p (gdbarch)) + gdbarch_print_float_info (gdbarch, file, frame, args); + else + { +#ifdef FLOAT_INFO +#if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL +#error "FLOAT_INFO defined in multi-arch" +#endif + FLOAT_INFO; +#else + int regnum; + int printed_something = 0; + for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++) + { + if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT) + { + printed_something = 1; +#if 0 + gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1); +#else + do_registers_info (regnum, 1); +#endif + } + } + if (!printed_something) + fprintf_filtered (file, "\ +No floating-point info available for this processor.\n"); +#endif + } +} + +static void +float_info (char *args, int from_tty) +{ + print_float_info (current_gdbarch, gdb_stdout, selected_frame, args); } /* ARGSUSED */ |