home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12539 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  2.2 KB

  1. Path: sparky!uunet!olivea!decwrl!concert!sas!mozart.unx.sas.com!jamie
  2. From: jamie@cdevil.unx.sas.com (James Cooper)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re:  Programming Tools (was: Amiga programmers UNITE)
  5. Message-ID: <BtC8Fs.74F@unx.sas.com>
  6. Date: 21 Aug 92 14:33:27 GMT
  7. References: <1992Aug04.235557.26121@NeoSoft.com> <56478@mentor.cc.purdue.edu> <1992Aug10.223432.27395@CS.ORST.EDU> <piet.025y@okapi.sub.org> <fgd3.01p9@nifty.UUCP>
  8. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  9. Organization: SAS Institute Inc.
  10. Lines: 37
  11. Originator: jamie@cdevil.unx.sas.com
  12. Nntp-Posting-Host: cdevil.unx.sas.com
  13.  
  14.  
  15. In article <fgd3.01p9@nifty.UUCP>, fgd3@nifty.UUCP (Fabbian G. Dufoe, III) writes:
  16. >In article <piet.025y@okapi.sub.org> piet@okapi.sub.org (Peter Vohmann) writes:
  17. >>Have you ever used CodeProbe (SAS/C debugger)? It does a lot of the things
  18. >>you mentioned (except the guarantee). Yesterday again I stepped through my
  19. >>assembler code with cpr, watching the register values I had done. 'Quit'
  20. >>cleaned everything up nicely, one instruction before the point-of-crash.
  21. >>So what? ;-)
  22. >
  23. >   Isn't that a bit of an overstatement?  The "Quit" command in CodeProbe
  24. >doesn't clean up everything--CodeProbe doesn't keep track of the resources
  25. >you've allocated.  It does get you out of the debugger and let you continue
  26. >what you were doing without a crash.  But until you reboot you can't recover
  27. >the memory you've allocated, free any locks that were left hanging, and so
  28. >forth.
  29.  
  30. Actually, CodePRobe can clean up a lot for you, if you set your program
  31. up "correctly".
  32.  
  33. If you don't use the -s switch on CPR (nostartup mode), it will call the
  34. exit() code before it quits.  If you have setup your own exit code with
  35. the ONEXIT() call, the exit() code will call this for you.
  36.  
  37. In other words, you could have the entire program clean itself up as if
  38. it had exited normally when you use the QUIT command in CPR.
  39.  
  40. This will work in Assembly code as well, it you have an _main and an
  41. _exit.  CPR looks for those particular lablels when starting/quitting
  42. your program.
  43.  
  44. -- 
  45. ---------------
  46. Jim Cooper
  47. (jamie@unx.sas.com)                             bix: jcooper
  48.  
  49. Any opinions expressed herein are mine (Mine, all mine!  Ha, ha, ha!),
  50. and not necessarily those of my employer.
  51.