diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-08-16 00:27:46 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-08-16 00:27:46 +0000 |
commit | e76f1f2e332de69d2a48bd8ac7bf6d0390991f43 (patch) | |
tree | cf705bfaa288bfd083f9ef9f2999558450a55f79 /gdb/infcmd.c | |
parent | b3de5b86c2331bce5929f982e5b680227eb0fb1a (diff) | |
download | gdb-e76f1f2e332de69d2a48bd8ac7bf6d0390991f43.zip gdb-e76f1f2e332de69d2a48bd8ac7bf6d0390991f43.tar.gz gdb-e76f1f2e332de69d2a48bd8ac7bf6d0390991f43.tar.bz2 |
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.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 07b8cf4..95ee3e6 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); } |