home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / programm / 7141 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.3 KB  |  33 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!decwrl!netcomsv!dolphin!yamanote!gordie
  3. From: gordie@yamanote.dolphin.com (Gordie Freedman)
  4. Subject: Re: problem with gdb
  5. Message-ID: <1992Nov11.070028.8132@dolphin.com>
  6. Sender: gordie@dolphin.com
  7. Reply-To: gordie@yamanote.dolphin.com
  8. Organization: Dolphin Software
  9. References: <BxIo9p.142.2@cs.cmu.edu>
  10. Date: Wed, 11 Nov 1992 07:00:28 GMT
  11. Lines: 20
  12.  
  13. In article <BxIo9p.142.2@cs.cmu.edu> hill@norman.VI.RI.CMU.EDU (Robert  
  14. Hill) writes: 
  15. > I missed the original thread, but I have been having problems with gdb  
  16. > printing the wrong values for variables under 3.0.  I'll type something  
  17. > like "print x".  I am really sure x has the value of 1, but it says x is  
  18. > 0.  At first I thought I was wrong about the value of x, but adding a  
  19. > printf said that x was 1.  Very strange.
  20. > Is there any reported bugs for gdb under 3.0?
  21. > Rob
  22.  
  23. If you are compiling with optimization (cc -O) sometimes variables get  
  24. compiled out or reused. Debugging gets a little weird. I don't know if  
  25. this is your problem but I have seen similar things when using gdb on an  
  26. -O'd file. (It's really fun with C++ !)
  27. -- 
  28. Gordie Freedman gordie@yamanote.dolphin.com   ->   NextMail encouraged
  29. (Disclaimer: Opinions expressed are my own and represent no one else.)
  30.  
  31.