From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18200 invoked by alias); 9 May 2003 05:16:58 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 18171 invoked from network); 9 May 2003 05:16:58 -0000 Date: Fri, 09 May 2003 05:16:00 -0000 From: Kevin Buettner Message-Id: <1030509051643.ZM6279@localhost.localdomain> X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: rda@sources.redhat.com Subject: [PATCH] linux-target.c: Fix MIPS software single step MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-q2/txt/msg00001.txt.bz2 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);