From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30714 invoked by alias); 23 Mar 2002 19:01:17 -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 30704 invoked from network); 23 Mar 2002 19:01:15 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by 209.249.29.67 with SMTP; 23 Mar 2002 19:01:15 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3058E3DBC; Sat, 23 Mar 2002 14:00:58 -0500 (EST) Message-ID: <3C9CD0EA.50809@cygnus.com> Date: Sat, 23 Mar 2002 11:01:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] x86_64_skip_prologue References: <3C923BD9.80403@suse.cz> <1020315184051.ZM27571@localhost.localdomain> <3C9760B6.7040900@suse.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00443.txt.bz2 > Kevin Buettner wrote: > 3) Now pc points to the first line of the sourcecode of the function (usually opening '{'). If the next line with debuginfo has pc within bounds of this function, we will return this pc instead. > > You might want to take a look at some of the other prologue analyzers. > In particular, you might want to consider calling find_pc_line() instead > of accessing the data structures directly. > > Most of other *_skip_prologue functions pretend, that prolog is an always-the-same sequence of instructions, what is not the case on x86-64. I can't see an approach other than the one I have chosen. > Of course I can use other structures and maybe some macros, but the concept will remain. Or is there another way? > > Why should I preferably use find_pc_line()? It gives me the same symtab as find_pc_symtab() does... Anyway I have rewritten the code to use it. > > BTW, you might want to run your code through indent. > > Sorry, I'm not yet used to follow GNU coding style. Hopefully now it is better ;-) > Michal Ludvig The script gdb_indent.sh will always fix any problems :-) Yes, ok. (Don't forget the changelog when posting patches). Andrew