* mips-tdep.c (show_mipsfpu_command): Do not crash if called when

current architecture is not MIPS.
This commit is contained in:
Ulrich Weigand 2007-11-17 00:57:41 +00:00
parent f070423477
commit 6ca0852e7a
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
* mips-tdep.c (show_mipsfpu_command): Do not crash if called when
current architecture is not MIPS.
2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
* cli/cli-setshow.c (do_setshow_command): Use dynamically sized buffer

View file

@ -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: