This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Describe "incomplete type" (was: <incomplete type>)
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 27 Aug 2005 15:50:18 +0300
- Subject: [commit] Describe "incomplete type" (was: <incomplete type>)
- References: <1125021866.10500.71.camel@norman> <m3acj45xnv.fsf@alligator.red-bean.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
Jim's reply on gdb@ caused me to look for "incomplete type" in the
manual. Since I didn't find it, I added it. Thanks for the clear
explanation, Jim.
Committed.
2005-08-27 Eli Zaretskii <eliz@gnu.org>
(Variables, Symbols): Document the "<incomplete type>" message and
its reasons.
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.277
diff -u -r1.277 gdb.texinfo
--- gdb/doc/gdb.texinfo 27 Aug 2005 12:04:58 -0000 1.277
+++ gdb/doc/gdb.texinfo 27 Aug 2005 12:47:41 -0000
@@ -5179,6 +5179,11 @@
@xref{C, , Debugging C++}, for more info about debug info formats
that are best suited to C@t{++} programs.
+If you ask to print an object whose contents are unknown to
+@value{GDBN}, e.g., because its data type is not completely specified
+by the debug information, @value{GDBN} will say @samp{<incomplete
+type>}. @xref{Symbols, incomplete type}, for more about this.
+
@node Arrays
@section Artificial arrays
@@ -10008,6 +10013,30 @@
As with @code{whatis}, using @code{ptype} without an argument refers to
the type of @code{$}, the last value in the value history.
+@cindex incomplete type
+Sometimes, programs use opaque data types or incomplete specifications
+of complex data structure. If the debug information included in the
+program does not allow @value{GDBN} to display a full declaration of
+the data type, it will say @samp{<incomplete type>}. For example,
+given these declarations:
+
+@smallexample
+ struct foo;
+ struct foo *fooptr;
+@end smallexample
+
+@noindent
+but no definition for @code{struct foo} itself, @value{GDBN} will say:
+
+@smallexample
+ (gdb) ptype foo
+ $1 = <incomplete type>
+@end smallexample
+
+@noindent
+``Incomplete type'' is C terminology for data types that are not
+completely specified.
+
@kindex info types
@item info types @var{regexp}
@itemx info types