diff options
author | Mark Kettenis <kettenis@gnu.org> | 2002-11-09 12:44:23 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2002-11-09 12:44:23 +0000 |
commit | e71ecd70b204292a4e65f6be9988a53797edcdfa (patch) | |
tree | fac4b76d8d26cbc2f6afad098db027d8bbac9ffd /gdb | |
parent | f72dfb13ce7b8dfb910e88946e284ecaf12a0d93 (diff) | |
download | gdb-e71ecd70b204292a4e65f6be9988a53797edcdfa.zip gdb-e71ecd70b204292a4e65f6be9988a53797edcdfa.tar.gz gdb-e71ecd70b204292a4e65f6be9988a53797edcdfa.tar.bz2 |
* infcmd.c (print_vector_info, print_float_info): Move code that
checks whether the target has any registers and whether there is a
selected frame up, such that it is also used if a target provides
multi-arch definitions of these functions.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/infcmd.c | 20 |
2 files changed, 17 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b87159b..42728f3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-11-09 Mark Kettenis <kettenis@gnu.org> + + * infcmd.c (print_vector_info, print_float_info): Move code that + checks whether the target has any registers and whether there is a + selected frame up, such that it is also used if a target provides + multi-arch definitions of these functions. + 2002-11-08 Andrew Cagney <ac131313@redhat.com> * Makefile.in (DESTDIR): Define. diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 15efbe1..2556221 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1791,6 +1791,11 @@ static void print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) { + if (!target_has_registers) + error ("The program has no registers now."); + if (selected_frame == NULL) + error ("No selected frame."); + if (gdbarch_print_vector_info_p (gdbarch)) gdbarch_print_vector_info (gdbarch, file, frame, args); else @@ -1798,11 +1803,6 @@ print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, int regnum; int printed_something = 0; - if (!target_has_registers) - error ("The program has no registers now."); - if (selected_frame == NULL) - error ("No selected frame."); - for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++) { if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup)) @@ -1958,6 +1958,11 @@ static void print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) { + if (!target_has_registers) + error ("The program has no registers now."); + if (selected_frame == NULL) + error ("No selected frame."); + if (gdbarch_print_float_info_p (gdbarch)) gdbarch_print_float_info (gdbarch, file, frame, args); else @@ -1971,11 +1976,6 @@ print_float_info (struct gdbarch *gdbarch, struct ui_file *file, int regnum; int printed_something = 0; - if (!target_has_registers) - error ("The program has no registers now."); - if (selected_frame == NULL) - error ("No selected frame."); - for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++) { if (gdbarch_register_reggroup_p (gdbarch, regnum, float_reggroup)) |