From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9051 invoked by alias); 5 Mar 2005 11:29:42 -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 8778 invoked from network); 5 Mar 2005 11:29:06 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 5 Mar 2005 11:29:06 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j25BSvbO003270; Sat, 5 Mar 2005 12:28:58 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id j25BSvqp007323; Sat, 5 Mar 2005 12:28:57 +0100 (CET) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id j25BSruw007318; Sat, 5 Mar 2005 12:28:53 +0100 (CET) Date: Sat, 05 Mar 2005 11:29:00 -0000 Message-Id: <200503051128.j25BSruw007318@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sources.redhat.com In-reply-to: <20050304220104.GA14522@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 4 Mar 2005 17:01:04 -0500) Subject: Re: [RFA] New GDB target iq2000 References: <20050222114141.GA18314@cygbert.vinschen.de> <20050303173443.GD18681@nevyn.them.org> <20050304094605.GU2839@cygbert.vinschen.de> <20050304141439.GA30249@nevyn.them.org> <20050304150129.GF2839@cygbert.vinschen.de> <20050304220104.GA14522@nevyn.them.org> X-SW-Source: 2005-03/txt/msg00059.txt.bz2 Date: Fri, 4 Mar 2005 17:01:04 -0500 From: Daniel Jacobowitz I left the other function alone. skip_prologue_using_sal is already a bit bogus, for the reasons identified by Kevin as well as for at least one other that I can see. find_last_line_symbol is even boguser. Basically, any code that compares the LINE member of two arbitrary SALs _must_ be wrong. They don't even need to be in the same source file. Another issue with skip_prologue_using_sal() is that it will happily skip the entire function if the function body is basically empty. I really think it should be deprecated, and shouldn't be used in any new code. There's two things that GDB uses the guessed prologue line information for. One is to place an initial breakpoint, so that the arguments have been saved. This problem will hopefully eventually go away, with improved GCC -fvar-tracking - we should be able to print the arguments from anywhere. Someone needs to spend a little love on the compiler side of this. The important thing about placing the initial breakpoint, is that it shouldn't be placed too far into the function. In particular it should not end up after a branch instruction. The other is as a limit for prologue scanners. IMO, what you need in iq2000_scan_prologue is not line table data at all, but a list of instructions which can not be considered part of the prologue. Basically that is calls and branches, and a check that you only record a register save the first time you see the register being saved. Going too far here is not a major problem; after the patch below, I think the call in iq2000_skip_prologue is basically redundant. Returning FUNC_ADDR would work just about as well, since if we have no line data, we probably have no symbolic argument information either. Most prologue scanners indeed "know" about what conditions end a prologue. In those cases the limit is only there to prevent the analyzer to run away if for some reason it ends up analyzing code that it shouldn't. Mark