This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
debug/9161: No function argument debug info for function pointers
- From: dave at rebuzz dot org
- To: gcc-gnats at gcc dot gnu dot org
- Date: 3 Jan 2003 19:36:24 -0000
- Subject: debug/9161: No function argument debug info for function pointers
- Reply-to: dave at rebuzz dot org
>Number: 9161
>Category: debug
>Synopsis: No function argument debug info for function pointers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 03 11:46:03 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Dave Hooper
>Release: gcc (GCC) 3.2 20020927 (prerelease)
>Organization:
>Environment:
cygwin
>Description:
No debug information is generated to describe function arguments for function pointers. This can be seen with gdb, as well as examining the stabs output in the assembly file.
The specification for stabs appears to support lists of function arguments for any function types and since a function pointer is just a pointer to a function type this information should be included.
Apologies if I misinterpreted what the "debug" category is for.
>How-To-Repeat:
Compile something like "int (g_pf*)(); char (g_pf2*)(int,char*,int*);" with gcc -g option. Load the resulting executable into gdb, but don't run it - instead just type whatis g_pf (it will say "int (*)(void)") and then type whatis g_pf2 (it will sat "char (*)(void)" !!)
The function argument information is completely missing from the debug info.
The argument info is also missing from gcc -gdump-translation-unit
>Fix:
The stabs information for g_pf2 generated by gcc contains just
.stabs "g_pf2:G(1,7)=*(1,8)=f(0,1)",32,0,4,0
but it should include function argument type information as described in the Type section for stabs type "f" in 'info stabs'.
>Release-Note:
>Audit-Trail:
>Unformatted: