From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27606 invoked by alias); 23 Aug 2004 18:04:38 -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 27579 invoked from network); 23 Aug 2004 18:04:37 -0000 Received: from unknown (HELO avtrex.com) (216.102.217.178) by sourceware.org with SMTP; 23 Aug 2004 18:04:37 -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:01:06 -0700 Message-ID: <412A30E5.9080809@avtrex.com> Date: Mon, 23 Aug 2004 18:04: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: Andrew Cagney CC: 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> In-Reply-To: <412A25B1.7080308@gnu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Aug 2004 18:01:06.0384 (UTC) FILETIME=[2965F500:01C4893B] X-SW-Source: 2004-08/txt/msg00286.txt.bz2 Andrew Cagney wrote: >>GNU gdb 6.2_2004-08-19-cvs >> >>from the gdb_6_2-branch yesterday. >> >>../gdbcvs/src/configure --build=i686-pc-linux --host=mipsel-linux >>--target=mipsel-linux --enable-tui=no >> >>Most of the time when I do next or nexti, gdb is treating it as if I did >>step or stepi. >> >>I have tracked the problem down to this portion of code: > > > Sounds like a bug in the MIPS unwind code. Can you build/test with > mainline (the fixes won't be backported). > I will try the mainline soon. > The problem is that, after the step-into the callee, the MIPS unwind > code is not correctly unwinding back to the caller's frame-ID. As > Theodore notes, this is very compiler dependant. > Currently GDB examines the next instruction to see if it is a branch (or jal or jalr..) to see where to place a temporary breakpoint for single stepping. 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? By compiler dependant, do you mean the compiler GDB was built with, or the one that compiled the target code? > Andrew > >