This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1451: ptype showing incomplete type info for varargs function f(int, ...)


>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=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]