aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-08-15 23:41:20 +0000
committerAndrew Cagney <cagney@redhat.com>2002-08-15 23:41:20 +0000
commit23e3a7ac79ad6f6648bd99602ba715874ce9ac9a (patch)
treeaeb8f594b82b8208465506f08189bc44ca618e88 /gdb/gdbarch.c
parent8de397a5ad45db45f00ce9b58c2b8b2d7b5aa765 (diff)
downloadgdb-23e3a7ac79ad6f6648bd99602ba715874ce9ac9a.zip
gdb-23e3a7ac79ad6f6648bd99602ba715874ce9ac9a.tar.gz
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/gdbarch.c')
-rw-r--r--gdb/gdbarch.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index e2e5b7b..abc7483 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -322,7 +322,7 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
- default_print_float_info,
+ 0,
0,
0,
0,
@@ -490,7 +490,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->register_virtual_size = generic_register_size;
current_gdbarch->max_register_virtual_size = -1;
current_gdbarch->do_registers_info = do_registers_info;
- current_gdbarch->print_float_info = default_print_float_info;
current_gdbarch->register_sim_regno = legacy_register_sim_regno;
current_gdbarch->cannot_fetch_register = cannot_register_not;
current_gdbarch->cannot_store_register = cannot_register_not;
@@ -637,7 +636,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
&& (gdbarch->register_virtual_type == 0))
fprintf_unfiltered (log, "\n\tregister_virtual_type");
/* Skip verify of do_registers_info, invalid_p == 0 */
- /* Skip verify of print_float_info, invalid_p == 0 */
+ /* Skip verify of print_float_info, has predicate */
/* Skip verify of register_sim_regno, invalid_p == 0 */
/* Skip verify of register_bytes_ok, has predicate */
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
@@ -2994,8 +2993,15 @@ set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
gdbarch->do_registers_info = do_registers_info;
}
+int
+gdbarch_print_float_info_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->print_float_info != 0;
+}
+
void
-gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame)
+gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->print_float_info == 0)
@@ -3003,7 +3009,7 @@ gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct
"gdbarch: gdbarch_print_float_info invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
- gdbarch->print_float_info (gdbarch, file, frame);
+ gdbarch->print_float_info (gdbarch, file, frame, args);
}
void