* [PATCH] linux-target.c: Fix MIPS software single step
@ 2003-05-09 5:16 Kevin Buettner
0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2003-05-09 5:16 UTC (permalink / raw)
To: rda
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-09 5:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-09 5:16 [PATCH] linux-target.c: Fix MIPS software single step Kevin Buettner
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).