From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31325 invoked by alias); 24 May 2007 18:21:28 -0000 Received: (qmail 31277 invoked by uid 22791); 24 May 2007 18:21:20 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 24 May 2007 18:21:18 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0) with ESMTP id l4OIL55S031837; Thu, 24 May 2007 20:21:05 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0/Submit) id l4OIL5wX018281; Thu, 24 May 2007 20:21:05 +0200 (CEST) Date: Thu, 24 May 2007 18:21:00 -0000 Message-Id: <200705241821.l4OIL5wX018281@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: macro@mips.com CC: gdb-patches@sourceware.org, chris@mips.com, macro@linux-mips.org In-reply-to: (macro@mips.com) Subject: Re: mips-tdep.c: Adjust breakpoints in branch delay slots References: Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00376.txt.bz2 > Date: Thu, 24 May 2007 19:07:46 +0100 (BST) > From: "Maciej W. Rozycki" > > Hello, > > This is a change that makes breakpoints requested in a branch or jump > delay slot be moved to the preceding instruction. This removes a > confusion that arises when such a breakpoint is hit and the resulting > message like this: > > (gdb) break *0x00400670 > Breakpoint 1 at 0x400670: file foo.c, line 12. > (gdb) run > Starting program: .../foo > > Program received signal SIGTRAP, Trace/breakpoint trap. > main (argc=1, argv=0x7fd7c874) at foo.c:12 > 12 } > (gdb) x /2i $pc > 0x40066c : jr ra > 0x400670 : move v0,zero > > This change has been tested natively for mips-unknown-linux-gnu and > remotely for mipsisa32-sde-elf, using mips-sim-sde32/-EB, > mips-sim-sde32/-mips16/-EB, mips-sim-sde32/-EL and > mips-sim-sde32/-mips16/-EL as the targets, with no regressions. > > 2007-05-24 Chris Dearman > Maciej W. Rozycki > > * mips-tdep.c (mips32_instruction_has_delay_slot): New function. > (mips16_instruction_has_delay_slot): Likewise. > (mips_segment_boundary): Likewise. > (mips_adjust_breakpoint_address): Likewise. > (mips_gdbarch_init): Use mips_adjust_breakpoint_address. > > OK to apply? Do we have a testcase for this? I also would like to test this on OpenBSD/mips64. Unfortunately I won't be able to test this in the next three weeks. Can this wait until then?