home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gdb / bug / 1408 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.8 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cleo.read.tasc.com!skay
  2. From: skay@cleo.read.tasc.com (Scott Kay)
  3. Newsgroups: gnu.gdb.bug
  4. Subject: calling member functions....(gcc-2.2.2,gdb-4.7,sun4)
  5. Date: 25 Jan 1993 21:13:36 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 37
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gdb@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301252008.AA07480@cleo.Read.TASC.COM>
  12. References: <1993Jan22.194413.22245@athena.mit.edu>
  13.  
  14. Hi,
  15.  
  16. >> When trying to call a member function in gcc-2.2.2, gdb-4.7 (on a sun4)
  17. >> replies systematically as in the folloing example:
  18.  
  19. >> (gdb) print f.y0(3,2)
  20. >> Structure has no component named y0.
  21.  
  22. >> Please, tell me that I am not the only one the have these problem !!!
  23. >> What can I do about it ?
  24.  
  25.  The answer is - it really doesn't know that there is an element y in
  26. that structure. (I'm not trying to be obvious). I had the same problem
  27. with some code I was writing on a Sun with gcc-2.2.2 and gdb-4.6. You
  28. must use the syntax:
  29.  (from a previous mail message)
  30.  I figured out the problem. I don't know why yet but structures which
  31. get "typdef'd" get handled as "unknown type" by gdb. By just stating
  32. them as "struct my_struct { ... };" everything was fine. Live and
  33. learn.
  34.  
  35.  
  36. This should take care of your immediate problem - apparently the other
  37. syntax causes gcc to simply malloc storage - essentially untyped which
  38. has a structure that it only knows the size of - not the members.
  39.  
  40. Let me know if this is still a problem.
  41.  
  42. *******************************************************************************
  43. Scott Kay
  44. The Analytical Sciences Corporation (TASC)
  45. 55 Walkers Brook Drive
  46. Reading, MA
  47. INTERNET ADRESS:  spkay@fandago.read.tasc.com
  48.  
  49. *******************************************************************************
  50.  
  51.