Return to BSD News archive
Xref: sserve gnu.gcc.help:8080 gnu.g++.help:5431 comp.os.386bsd.questions:10282
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!spool.mu.edu!sgiblab!bridge2!usenet.coe.montana.edu!pcnot4me
From: pcnot4me@cs.montana.edu (Craig Pratt)
Newsgroups: gnu.gcc.help,gnu.g++.help,comp.os.386bsd.questions
Subject: GDB "incomplete type" messages
Message-ID: <2qprbh$2ni@pdq.coe.montana.edu>
Date: 11 May 94 05:44:17 GMT
Reply-To: pcnot4me@cs.montana.edu (Craig Pratt)
Organization: Dept of Computer Science, Montana State University, Bozeman, MT
Lines: 40
NNTP-Posting-Host: fubar.cs.montana.edu
We're having a problem with either gdb 4.11 or gcc 2.4.5 under FreeBSD
1.1.0 Beta that may qualify as a "bug."
A structure in the program is declared as:
typedef struct {
id_name type_name;
int typeOf; // type (via the #defines in typclass.h)
int flags; // weird things (forward, private)
int ssPosition; // position of this type in the Static Scope Table
void *element; // pointer to some type class
} AdacsType;
in a .h file. A file which includes it, resname.cc, is compiled as:
g++ -c -I./pccts/h -I../../emachine -g resname.cc
And linked as:
g++ -o adacs adacs.o err.o scan.o main.o hash.o symbolt.o types.o
typclass.o id_list.o codesect.o packsect.o srcsect.o strsect.o
lablsect.o statsect.o varsect.o namet.o subtypes.o except.o estuff.o
resname.o -static
Now, when I enter gdb and try to print a variable declared as this type
or enter a "ptype AdacsType" gdb prints:
type = struct AdacsType {
<incomplete type>
}
Debugging a symbol table w/o looking at these structures is a major pain.
I would greatly appreciate any hints you have regarding this.
Thanks much.
--
Craig Pratt Craig.Pratt@cs.montana.edu
Montana State University, Bozeman MT gcp1070@msu.oscs.montana.edu
"Think for yourself and feel the walls...
become sand beneath your feet." - Queensrych