From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30976 invoked by alias); 2 Mar 2004 15:48:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30969 invoked from network); 2 Mar 2004 15:48:25 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 2 Mar 2004 15:48:25 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 10DA22B92; Tue, 2 Mar 2004 10:48:16 -0500 (EST) Message-ID: <4044ACBF.1020302@gnu.org> Date: Tue, 02 Mar 2004 15:48:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Joel Brobecker Cc: kettenis@gnu.org, Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] use frame IDs to detect function calls while stepping References: <20040205044119.GC18961@gnat.com> <20040205171324.GF18961@gnat.com> <16418.37058.65446.669052@localhost.redhat.com> <20040207040049.GH18961@gnat.com> <403F60F1.7020902@gnu.org> <20040301194801.GK1051@gnat.com> <20040301235239.GP1051@gnat.com> <20040302061642.GW1051@gnat.com> In-Reply-To: <20040302061642.GW1051@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00024.txt Message-ID: <20040302154800.4SQ168_gTJ1l1PhREcmbHxwItVgC21hnaCJL4t2CGTk@z> >>After two iterations (one for the call insn, and one for the delay >>> slot), GDB lands at the begining of function "exit" at 0x00020950, >>> which is: >>> >>> 0x00020950 : sethi %hi(0xf000), %g1 >>> 0x00020954 : b,a 0x20914 <_PROCEDURE_LINKAGE_TABLE_> >>> 0x00020958 : nop >>> >>> So at this point, the registers window has not been rotated. >>> I don't know if this is the cause for this problem, but at this >>> point GDB is unable to unwind the call stack: >>> >>> (gdb) bt >>> #0 0x00020950 in _PROCEDURE_LINKAGE_TABLE_ () >>> >>> (And gets the wrong procedure name as well, but that's a separate >>> issue - although "x /i" does report what I believe is the correct >>> name, strange!). >>> >>> I am looking into the sparc unwinder code right now, to try to >>> understand a bit better the source of the problem. > > > I think I found the source of the glitch. I may have the solution > to fix it, but my little finger is telling that it might be a bit > too extreme... Maybe MarkK has some comments about this? How about this as a compromize: - in 6.1 your original patch (but with a comment saying that the + if (IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name)) is a hack and shouldn't be included in the mainline) - in mainline: Assuming Mark's ok with the sparc changes, your patch without that part? This way 6.1 is robust regardless of which SPARC architecture code is in place. Andrew