From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14244 invoked by alias); 23 Aug 2004 19:01:46 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14234 invoked from network); 23 Aug 2004 19:01:45 -0000 Received: from unknown (HELO avtrex.com) (216.102.217.178) by sourceware.org with SMTP; 23 Aug 2004 19:01:45 -0000 Received: from avtrex.com ([192.168.0.111] RDNS failed) by avtrex.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 23 Aug 2004 11:58:04 -0700 Message-ID: <412A3E3F.3020409@avtrex.com> Date: Mon, 23 Aug 2004 19:01:00 -0000 From: David Daney User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030 MIME-Version: 1.0 To: Daniel Jacobowitz CC: Andrew Cagney , gdb@sources.redhat.com Subject: Re: Unable to step over (n and ni) on mipsel-linux... References: <412649F4.9040002@avtrex.com> <412A25B1.7080308@gnu.org> <412A30E5.9080809@avtrex.com> <412A3672.5040904@gnu.org> <412A39AF.1080103@avtrex.com> <20040823184801.GA10657@nevyn.them.org> In-Reply-To: <20040823184801.GA10657@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Aug 2004 18:58:04.0779 (UTC) FILETIME=[1EEBA3B0:01C48943] X-SW-Source: 2004-08/txt/msg00290.txt.bz2 Daniel Jacobowitz wrote: >>>>Instead of stepping into a function and checking to see if we are in a >>>>different frame (settting a breakpoint at the return address location), >>>>why not set the breakpoint at the return location before making the >>>>function call? >>> >>> >>>That would mean examining every instruction to determine if it is a call >>>- effectively s/w single step. GDB tries to do avoid doing that so that >>>single-step is faster. >>> >> >>For my configuration, for some reason it is already doing this. Thus my >>comment. If we are doing s/w single step, we would not have to examine >>the stack frames. >> >>Could there are some configuration problems? > > > GDB already does this on all MIPS targets. > > >>This implies that if I write assembly language I cannot expect GDB's ni >>instruction to work. > > > It should work OK. You have to have some stack frame anyway, and GDB > has a prologue analyzer. > For next and nexti it does not need to analyse the stack frames. I have half a mind to hack up mips-tdep.c:mips32_next_pc so that it returns the address following the jal/jalr if step_over_calls == STEP_OVER_ALL or some such thing. David Daney.