From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21523 invoked by alias); 4 Jan 2003 00:59:53 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21512 invoked from network); 4 Jan 2003 00:59:52 -0000 Received: from unknown (HELO mta02-svc.ntlworld.com) (62.253.162.42) by 209.249.29.67 with SMTP; 4 Jan 2003 00:59:52 -0000 Received: from badsector ([213.107.73.223]) by mta02-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20030104005939.PSNL14589.mta02-svc.ntlworld.com@badsector> for ; Sat, 4 Jan 2003 00:59:39 +0000 Message-ID: <012a01c2b38c$10d0d4f0$0402a8c0@badsector> From: "Dave Hooper" To: Subject: No 'g' stab type generated for pointer-to-function in C/C++ - suggestion for devel. Date: Sat, 04 Jan 2003 00:59:00 -0000 Organization: @spc MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-01/txt/msg00110.txt.bz2 I'm new to the gcc lists, so I apologise deeply if this has already been discussed to death. I did perform a search of the archives and found nothing relevant. >From discussion on gdb development lists (circa Feb 2002) it appears gdb supports the 'g' stab to convey function argument type information. For example, .stabs "f1:G(1,1)=*(1,2)=g(0,1)(0,1)(0,1)#",32,0,0,0 is the corresponding stab for int (*f1)(int,int); In fact I've tried this with gdb and a hex editor and it correctly reports the type when I enter "whatis f1". However gcc only emits plain 'f' stabs, such as .stabs "f1:G(1,1)=*(1,2)=f(0,1)",32,0,0,0 which is equivalent to saying just int (*f1)(); (i.e. the parameters of f1 are 'unknown'). Any two function pointers that return the same type are thus indistinguishable, as the 'f' stab only declares return type, unlike the 'g' stab which declares return type and the type of all function parameters. So, gdb supports the 'g' stab but gcc doesn't ever generate it. Has anyone tried adding the 'g' stab output to dbxout.c ? I've also posted a similar report to gcc-bugs d