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