From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2362 invoked by alias); 8 Feb 2002 15:44:12 -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 2263 invoked from network); 8 Feb 2002 15:44:06 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 8 Feb 2002 15:44:06 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16ZDBz-0004Ck-00; Fri, 08 Feb 2002 10:44:03 -0500 Date: Fri, 08 Feb 2002 07:44:00 -0000 From: Daniel Jacobowitz To: Jason Merrill Cc: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: function pointer stabs (was Re: RFA: MI tests: tolerate prototypes) Message-ID: <20020208104402.A15801@nevyn.them.org> Mail-Followup-To: Jason Merrill , Jim Blandy , gdb-patches@sources.redhat.com References: <20020203210609.E5E035E9DE@zwingli.cygnus.com> <20020203180133.C26302@nevyn.them.org> <20020205202132.A17384@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-02/txt/msg00227.txt.bz2 On Fri, Feb 08, 2002 at 01:16:10PM +0000, Jason Merrill wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > > Of course those have the same types. But even if you differentiate > > them, stabs only describes function pointers by their return type. > > Quite regrettable; it must be a GCC bug or at least limitation. This > > is the one that's actually related to the patch at the start of this > > thread. I think that the patch is fine, but that this should go on our > > list of things to fix in GCC's debug output. Jason, I don't suppose > > you could look at it? The 'right' thing to do would be to emit the Sun > > extension for any prototyped function or properly declared (prototyped, > > essentially) function pointer. > > >On Tue, Feb 05, 2002 at 06:56:04PM -0500, Jim Blandy wrote: > > >> Anyway, there's a standard syntax for prototyped function types > >> defined in the STABS manual. GDB even reads it. If GCC would just > >> emit it, things would be better. > > Looking at stabsread.c:read_type:case 'f', I don't see any support for > reading parameter types. For function definitions, it's in define_symbol. First it falls in to process_function_types, then into process_prototype_types, where it checks: /* Sun acc puts declared types of arguments here. */ if (*p == ';') But the only thing we need that information for AFAIK is curiousity. We don't really need to know if the function was originally prototyped if we know how it should be called. For function TYPES, there's vestigial support for ignoring an os9k prototype, but no support for the Sun prototypes. I stand corrected. Should we add this, or write it off? > Also, the spec in stabs.texi seems to describe different extensions for > expressing parameters to actual functions versus function pointers. Hmm, yes, I had not seen that. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer