home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / aix / 9606 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.7 KB  |  34 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!yktnews!prener
  3. From: prener@watson.ibm.com (Dan Prener)
  4. Subject: Re: xlc -g option
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <PRENER.92Sep12032836@encap2.watson.ibm.com>
  7. In-Reply-To: jpennell@axion.bt.co.uk's message of 11 Sep 92 13:58:42 GMT
  8. Date: Sat, 12 Sep 1992 08:28:36 GMT
  9. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  10. References: <1992Sep11.145842@axion.bt.co.uk>
  11. Nntp-Posting-Host: encap2.watson.ibm.com
  12. Organization: IBM T.J. Watson Research Center, Hawthorne, New York
  13. Lines: 19
  14.  
  15. In article <1992Sep11.145842@axion.bt.co.uk> jpennell@axion.bt.co.uk (John Pennell) writes:
  16.  
  17. > Thanks to all who mailed me regarding the problems I was having using
  18. > -O on the xlc compiler.  A new set of binaries are winging their way
  19. > to me from IBM.  Now, I have another problem.  Somewhere I have read
  20. > that it is inadvisable to use -g with -O.  Why?  I am asking because I
  21. > wish to use PURIFY, a memory allocation tool and it would be useful if
  22. > the -g switch could be used.  Am I correct in assuming the only reason
  23. > it shouldn't be used is because the output (post-optimisation) may not
  24. > be reliable?
  25.  
  26. You can use -g and -O together.  I do it frequently.  However, you should
  27. be aware of the limitations on debugging such code.  You will not be able 
  28. to count on the values of variables displayed at arbitrary points in the
  29. code, since the variables may be held in registers, rather than in their
  30. storage locations, or may not exist at all.  Values displayed at the
  31. start of non-inlined functions will be correct.
  32. --
  33.                                    Dan Prener (prener@watson.ibm.com)
  34.