From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10983 invoked by alias); 16 May 2007 15:32:56 -0000 Received: (qmail 10970 invoked by uid 22791); 16 May 2007 15:32:55 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 May 2007 15:32:50 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id D08034B267; Wed, 16 May 2007 10:32:45 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 73CD34B262; Wed, 16 May 2007 10:32:43 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HoLUY-00026K-Va; Wed, 16 May 2007 11:32:42 -0400 Date: Wed, 16 May 2007 15:32:00 -0000 From: Daniel Jacobowitz To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, Nigel Stephens , "Maciej W. Rozycki" Subject: Re: Disassemble branch delay slot instructions automatically Message-ID: <20070516153242.GA8062@caradoc.them.org> Mail-Followup-To: "Maciej W. Rozycki" , gdb-patches@sourceware.org, Nigel Stephens , "Maciej W. Rozycki" References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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/msg00283.txt.bz2 On Tue, May 15, 2007 at 07:13:41PM +0100, Maciej W. Rozycki wrote: > Hello, > > This is a change that implements automatic disassembly of instructions in > a branch delay slot if a branch is the last instruction to be output. It > is especially useful with the "display /i" command when single-stepping, > where you may want to see a single instruction normally not to get > distracted, but with a branch an intruction that follows would be executed > without having been printed. > > Here is an example for MIPS machine code -- this is with our current > implementation: > > (gdb) x /i 0x801018a4 > 0x801018a4 : beqz v0,0x80101a10 > > and here -- the same command with the patch applied: > > (gdb) x /i 0x801018a4 > 0x801018a4 : beqz v0,0x80101a10 > 0x801018a8 : li v1,11 > > This change has been tested natively for mips-unknown-linux-gnu and > remotely for mipsisa32-sde-elf, using mips-sim-sde32/-EB and > mips-sim-sde32/-EL as the targets, with no regressions. I would like additional opinions on this patch. My first reaction was "hey, that would be useful to me", but my second was concern that this would upset a GDB/MI frontend. We should at least try to provoke a problem in one such frontend first. -- Daniel Jacobowitz CodeSourcery