home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!ux1.cso.uiuc.edu!sdd.hp.com!hp-col!hpfcnfs.sde.hp.com!bruno
- From: bruno@fc.hp.com (Bruno Melli)
- Newsgroups: comp.sys.hp
- Subject: Re: xdb accessing 'opaque' data structures
- Message-ID: <BxxA12.LBA@fc.sde.hp.com>
- Date: 18 Nov 92 17:31:47 GMT
- Article-I.D.: fc.BxxA12.LBA
- References: <Bxx17C.7KF@watserv2.uwaterloo.ca>
- Sender: news@fc.sde.hp.com (Notes Administrator)
- Organization: /STD/CoLL
- Lines: 36
- X-Newsreader: TIN [version 1.1.4 PL6]
-
- > So the debugger know what _MyWidgetRec structure looks like, it just
- > can't figure out that typedef MyWidget. It all very strange to me.
-
- This is how it is supposed to work:
-
- You have something like this in one file:
-
- struct foo *p;
-
- The compiler puts out debug info to the effect that p is a pointer
- to a struct foo. We don't know what foo is yet, so the compiler emits
- debug info for a "dummy" structure called foo.
-
- In another file, you define foo:
-
- struct foo { whatever..... };
-
- At link time, /usr/bin/pxdb is supposed to redirect the pointer
- in the debug info for p from the dummy structure foo to the real
- structure foo.
-
- Now the problem:
-
- There used to be a bug in the debug info generated by the
- C compiler. Instead of calling the dummy structure "foo", the compiler
- would call it <<NULL SYMBOL>> (or something like that).
- With this, pxdb had no way of fixing the debug info for p as the matching
- was done on a string compare basis.
-
- My guess is that your program knows what the _MyWidgetRec in some
- modules, but that in the module where you use p, the type is still
- opaque...
- A potential workaround if that's the case is to include a definition for
- _MyWidgetRec in the module where p is declared...
-
- bruno.
-