diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-11-17 00:57:41 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-11-17 00:57:41 +0000 |
commit | 6ca0852e7a0010edcf20292ab79c8c42c74b5567 (patch) | |
tree | 3120ff093ec59eeb7680f483b769df73f5e0fcfb /gdb/mips-tdep.c | |
parent | f0704234779ecc2cae657adc91d615d08dd8fe24 (diff) | |
download | gdb-6ca0852e7a0010edcf20292ab79c8c42c74b5567.zip gdb-6ca0852e7a0010edcf20292ab79c8c42c74b5567.tar.gz gdb-6ca0852e7a0010edcf20292ab79c8c42c74b5567.tar.bz2 |
* mips-tdep.c (show_mipsfpu_command): Do not crash if called when
current architecture is not MIPS.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index b9d65d6..54202ca 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4611,6 +4611,15 @@ static void show_mipsfpu_command (char *args, int from_tty) { char *fpu; + + if (gdbarch_bfd_arch_info (current_gdbarch)->arch != bfd_arch_mips) + { + printf_unfiltered + ("The MIPS floating-point coprocessor is unknown " + "because the current architecture is not MIPS.\n"); + return; + } + switch (MIPS_FPU_TYPE) { case MIPS_FPU_SINGLE: |