public inbox for rda@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: rda@sources.redhat.com
Subject: [PATCH] linux-target.c: Fix MIPS software single step
Date: Fri, 09 May 2003 05:16:00 -0000	[thread overview]
Message-ID: <1030509051643.ZM6279@localhost.localdomain> (raw)

I've just committed the patch below.  It fixes some rather odd
problems that I was seeing with GDB's ``step'' and ``next'' commands
when debugging MIPS floating point code.

	* linux-target.c (mips_singlestep): Don't interpret all coprocessor
	instructions as conditional branches.

Index: linux-target.c
===================================================================
RCS file: /cvs/src/src/rda/unix/linux-target.c,v
retrieving revision 1.6
diff -u -p -r1.6 linux-target.c
--- linux-target.c	10 Apr 2003 20:35:54 -0000	1.6
+++ linux-target.c	9 May 2003 05:11:26 -0000
@@ -2640,6 +2640,15 @@ mips_singlestep (struct gdbserv *serv, p
     targ |= (insn.j_format.target << 2);
     break;
 
+  /* Some cop instructions are conditional... */
+  case cop0_op:
+  case cop1_op:
+  case cop2_op:
+    if (insn.i_format.rs != bc_op)
+      break;
+    else
+      ; /* fall through... */
+
   /*
    * These are conditional.
    */
@@ -2651,9 +2660,6 @@ mips_singlestep (struct gdbserv *serv, p
   case blezl_op:
   case bgtz_op:
   case bgtzl_op:
-  case cop0_op:
-  case cop1_op:
-  case cop2_op:
   case cop1x_op:
     is_branch = is_cond = 1;
     targ += 4 + (insn.i_format.simmediate << 2);

                 reply	other threads:[~2003-05-09  5:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1030509051643.ZM6279@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=rda@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).