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

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!bu.edu!dartvax!Mark.R.Valence
  2. From: Mark.R.Valence@dartmouth.edu (Mark R. Valence)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Checksumming MemErr global variable (Tech Note 7) problem
  5. Message-ID: <1992Aug19.145956.810@dartvax.dartmouth.edu>
  6. Date: 19 Aug 92 14:59:56 GMT
  7. References: <1992Aug18.181714.12276@midway.uchicago.edu>  
  8.  <Bt74v9.KGF@taligent.com>
  9. Sender: news@dartvax.dartmouth.edu (The News Manager)
  10. Organization: Dartmouth College, Hanover, NH
  11. Lines: 26
  12.  
  13. In article <1992Aug18.181714.12276@midway.uchicago.edu>,
  14. chh9@quads.uchicago.edu
  15. (Conrad Halton Halling) writes:
  16. > I tried this, but apparently StripAddress() is using MemErr because it
  17. > is stuffing strange numbers into this global variable, so this technique
  18.  
  19. I think MacsBug is causing some confusion here.  You are not looking at
  20. the code for StripAddress, but rather at some unnamed code in ROM. 
  21. MacsBug likes to display routine names in ROM.  It figures out the name
  22. for a given chunk of code by looking in the trap tables and determining
  23. the nearest ROM routine above the given address(es).  So, since there
  24. is a bunch of internal ROM code immediately after StripAddress, it all
  25. gets grouped under the StripAddress routine label.
  26.  
  27. Of course this is a glossed over explanation, but you get the picture. 
  28. Oh, and StrippAddress might not be the only routine that gains this
  29. extra code.  Oh, and on some ROMs (past or future), StrippAddress might
  30. not gain any extra code.  Its all so ROM specific you see.
  31.  
  32. The upshot is, StripAddress is not cramming anything into MemErr, it's
  33. some other Trap, which calls some internal routine, and is probably
  34. stuffing a real honest-to-goodness memory error into MemErr.  Then when
  35. the internal routine exits, the caller will see the error, and use the
  36. stack for its memory needs instead :-)
  37.  
  38. Mark.
  39.