From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: uweigand@de.ibm.com (Ulrich Weigand)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] [0/9] Multi-target support: Fix show_mipsfpu_command crash
Date: Tue, 30 Oct 2007 21:54:00 -0000 [thread overview]
Message-ID: <200710302131.l9ULVms9010721@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200710260114.l9Q1EtUT003048@d12av02.megacenter.de.ibm.com> from "Ulrich Weigand" at Oct 26, 2007 03:14:55 AM
> I'm aware of one bug that still needs to be fixed: "info set"
> crashes as show_mipsfpu_command unconditionally refers to
> gdbarch_tdep (current_gdbarch), and assumes it to be formatted
> as defined in mips-tdep.c. This is of course no longer guaranteed
> to be the case ... It is certainly possible that other problems
> of that sort still lurk.
This adds a simple fix for the mips problem. The show_mips_abi routine
already contains a check to recognize if called while the current architecture
is not mips. This patch adds the same check to show_mipsfpu_command.
With this patch in addition to the other patches in the series, I'm able
to run the testsuite on s390x-ibm-linux using an --enable-targets=all
build with no regressions.
Bye,
Ulrich
ChangeLog:
* mips-tdep.c (show_mipsfpu_command): Do not crash if called when
current architecture is not MIPS.
diff -urNp gdb-orig/gdb/mips-tdep.c gdb-head/gdb/mips-tdep.c
--- gdb-orig/gdb/mips-tdep.c 2007-10-23 23:32:16.000000000 +0200
+++ gdb-head/gdb/mips-tdep.c 2007-10-30 20:16:56.403345116 +0100
@@ -4643,6 +4643,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:
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2007-10-30 21:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 1:15 [rfc] [0/9] Multi-target support Ulrich Weigand
2007-10-26 7:19 ` Daniel Jacobowitz
2007-10-30 21:54 ` Ulrich Weigand [this message]
2007-11-17 1:08 ` Ulrich Weigand
2007-11-19 10:14 ` Pierre Muller
2007-11-19 11:38 ` Ulrich Weigand
2007-11-19 16:35 ` Pierre Muller
2007-11-19 17:24 ` Ulrich Weigand
2007-11-19 17:28 ` Daniel Jacobowitz
2007-11-20 22:17 ` Ulrich Weigand
2007-11-20 22:23 ` [rfc/rft] --enable-targets=all with 32-bit BFD Ulrich Weigand
2007-11-21 1:01 ` Pedro Alves
2007-11-26 15:30 ` Ulrich Weigand
2007-11-27 3:00 ` Pedro Alves
2007-11-27 17:08 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710302131.l9ULVms9010721@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox