From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7017 invoked by alias); 9 Feb 2002 20:15:31 -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 6937 invoked from network); 9 Feb 2002 20:15:21 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 9 Feb 2002 20:15:21 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id A539B5E9DE; Sat, 9 Feb 2002 15:16:56 -0500 (EST) To: Daniel Jacobowitz Cc: Jason Merrill , gdb-patches@sources.redhat.com Subject: Re: function pointer stabs (was Re: RFA: MI tests: tolerate prototypes) References: <20020203210609.E5E035E9DE@zwingli.cygnus.com> <20020203180133.C26302@nevyn.them.org> <20020205202132.A17384@nevyn.them.org> <20020208104402.A15801@nevyn.them.org> From: Jim Blandy Date: Sat, 09 Feb 2002 12:15:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00285.txt.bz2 All right --- I've committed a change to allow GDB to read Sun-style prototyped function types, and I've posted tests for it, which hopefully will be approved soon. So it's you GCC guys' turn to teach GCC to emit those, now that you have a GDB you can test against. The format is documented in: http://www.cs.ucsb.edu/facilities/software/cc-info/stabs.ps Also, the test case includes examples of the sort of STABS GDB expects to see: /**** Pointers to functions *******/ typedef int (*func_type) (int (*) (int, float), float); double (*old_fptr) (); double (*new_fptr) (void); int (*fptr) (int, float); int *(*fptr2) (int (*) (int, float), float); int (*xptr) (int (*) (), int (*) (void), int); int (*(*ffptr) (char)) (short); int (*(*(*fffptr) (char)) (short)) (long); /* Here are the sort of stabs we expect to see for the above: .stabs "func_type:t(0,100)=*(0,101)=g(0,1)(0,102)=*(0,103)=g(0,1)(0,1)(0,14)#(0,14)#",128,0,234,0 .stabs "old_fptr:G(0,110)=*(0,111)=f(0,15)",32,0,231,0 .stabs "new_fptr:G(0,120)=*(0,121)=g(0,15)(0,122)=(0,122)#",32,0,232,0 .stabs "fptr:G(0,130)=*(0,103)#",32,0,233,0 .stabs "fptr2:G(0,140)=*(0,141)=g(0,142)=*(0,1)(0,102)(0,14)#",32,0,235,0 .stabs "xptr:G(0,150)=*(0,151)=g(0,1)(0,152)=*(0,153)=f(0,1)(0,154)=*(0,155)=g(0,1)(0,122)#(0,1)#",32,0,236,0 .stabs "ffptr:G(0,160)=*(0,161)=g(0,162)=*(0,163)=g(0,1)(0,8)#(0,2)#",32,0,237,0\ .stabs "fffptr:G(0,170)=*(0,171)=g(0,172)=*(0,173)=g(0,174)=*(0,175)=g(0,1)(0,3)#(0,8)#(0,2)#",32,0,237,0 Most of these use Sun's extension for prototyped function types --- the 'g' type descriptor. As of around 9 Feb 2002, GCC didn't emit those, but GDB can read them, so the related tests in ptype.exp will all xfail. */