summaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-08-16 00:27:46 +0000
committerAndrew Cagney <cagney@redhat.com>2002-08-16 00:27:46 +0000
commit3957c785f50cb99a0960553eb311b02fbef14cfa (patch)
tree44fd47d4e4c165bdf9c288192ace377bf5d223e1 /gdb/infcmd.c
parentab70912354f204e20fdab4fbd4d898868b025972 (diff)
downloadgdb-3957c785f50cb99a0960553eb311b02fbef14cfa.tar.gz
2002-08-15 Andrew Cagney <ac131313@redhat.com>
* infcmd.c (vector_info): New function. (_initialize_infcmd): Add command "info vector". (print_vector_info): New function. * gdbarch.sh (PRINT_VECTOR_INFO): New method * gdbarch.h, gdbarch.c: Regenerate. Index: doc/ChangeLog 2002-08-15 Andrew Cagney <ac131313@redhat.com> * gdbint.texinfo (Target Architecture Definition): Document PRINT_VECTOR_INFO. * gdb.texinfo (Vector Unit): Document "info vectors" command.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 07b8cf4e794..95ee3e6195d 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1710,6 +1710,39 @@ nofp_registers_info (char *addr_exp, int from_tty)
{
registers_info (addr_exp, 0);
}
+
+static void
+print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, const char *args)
+{
+ if (gdbarch_print_vector_info_p (gdbarch))
+ gdbarch_print_vector_info (gdbarch, file, frame, args);
+ else
+ {
+ int regnum;
+ int printed_something = 0;
+ for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+ {
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (regnum)))
+ {
+ 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 vector information\n");
+ }
+}
+
+static void
+vector_info (char *args, int from_tty)
+{
+ print_vector_info (current_gdbarch, gdb_stdout, selected_frame, args);
+}
/*
@@ -2083,6 +2116,9 @@ Register name as argument means describe only that register.");
add_info ("float", float_info,
"Print the status of the floating point unit\n");
+ add_info ("vector", vector_info,
+ "Print the status of the vector unit\n");
+
inferior_environ = make_environ ();
init_environ (inferior_environ);
}