home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp / 13060 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.7 KB  |  50 lines

  1. Path: sparky!uunet!ogicse!uwm.edu!ux1.cso.uiuc.edu!sdd.hp.com!hp-col!hpfcnfs.sde.hp.com!bruno
  2. From: bruno@fc.hp.com (Bruno Melli)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: xdb accessing 'opaque' data structures
  5. Message-ID: <BxxA12.LBA@fc.sde.hp.com>
  6. Date: 18 Nov 92 17:31:47 GMT
  7. Article-I.D.: fc.BxxA12.LBA
  8. References: <Bxx17C.7KF@watserv2.uwaterloo.ca>
  9. Sender: news@fc.sde.hp.com (Notes Administrator)
  10. Organization: /STD/CoLL
  11. Lines: 36
  12. X-Newsreader: TIN [version 1.1.4 PL6]
  13.  
  14. > So the debugger know what _MyWidgetRec structure looks like, it just
  15. > can't figure out that typedef MyWidget.  It all very strange to me.
  16.  
  17. This is how it is supposed to work:
  18.  
  19. You have something like this in one file:
  20.  
  21. struct foo *p;
  22.  
  23. The compiler puts out debug info to the effect that p is a pointer
  24. to a struct foo. We don't know what foo is yet, so the compiler emits
  25. debug info for a "dummy" structure called foo.
  26.  
  27. In another file, you define foo:
  28.  
  29. struct foo { whatever..... };
  30.  
  31. At link time, /usr/bin/pxdb is supposed to redirect the pointer
  32. in the debug info for p from the dummy structure foo to the real
  33. structure foo.
  34.  
  35. Now the problem: 
  36.  
  37. There used to be a bug in the debug info generated by the
  38. C compiler. Instead of calling the dummy structure "foo", the compiler
  39. would call it <<NULL SYMBOL>> (or something like that).
  40. With this, pxdb had no way of fixing the debug info for p as the matching
  41. was done on a string compare basis.
  42.  
  43. My guess is that your program knows what the _MyWidgetRec in some
  44. modules, but that in the module where you use p, the type is still 
  45. opaque...
  46. A potential workaround if that's the case is to include a definition for
  47. _MyWidgetRec in the module where p is declared...
  48.  
  49. bruno.
  50.