From 6ca0852e7a0010edcf20292ab79c8c42c74b5567 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sat, 17 Nov 2007 00:57:41 +0000 Subject: * mips-tdep.c (show_mipsfpu_command): Do not crash if called when current architecture is not MIPS. --- gdb/mips-tdep.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gdb/mips-tdep.c') 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: -- cgit v1.1