This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/1451: ptype showing incomplete type info for varargs function f(int, ...)
- From: marnix at ace dot nl
- To: gdb-gnats at sources dot redhat dot com
- Cc: jvd at ace dot nl
- Date: 13 Nov 2003 12:50:38 -0000
- Subject: gdb/1451: ptype showing incomplete type info for varargs function f(int, ...)
- Reply-to: marnix at ace dot nl
>Number: 1451
>Category: gdb
>Synopsis: ptype showing incomplete type info for varargs function f(int, ...)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 13 12:58:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: marnix@ace.nl
>Release: GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
>Organization:
>Environment:
>Description:
ptype does not show that a C function is in fact a
varargs function.
The ACE DWARF producer (so not gcc, did not check) includes a
TAG_unspecified_parameters in the debug information section for such a varargs function (after the TAG_formal_parameters).
>How-To-Repeat:
$ gcc -gdwarf-2 vat2.c
$ gdb a.out
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) ptype f0
type = int (int *, int)
(gdb) ptype f1
type = int (int *, int)
(gdb) quit
And note that there is no difference in type for f0 and f1
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="vat2.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="vat2.c"
I2luY2x1ZGUgPHN0ZGFyZy5oPgoKaW50IGYwKGludCAqLCBpbnQpOwoKaW50IGYxKGludCAqLCBp
bnQsIC4uLik7CgoKaW50IGYwKGludCAqcCwgaW50IG4pIHsKCXJldHVybiBuOwp9CgppbnQgZjEo
aW50KiBxLCBpbnQgbSwgLi4uKSB7CglyZXR1cm4gbTsKfQoKbWFpbigpCnsKfQo=