ari@eleazar.dartmouth.edu (Ari Halberstadt) (12/01/89)
While testing a program for size requirements, I stumbled uppon a debugger trap at address 0x81E434. The way I undertstand it, addresses with the high bit set are in the ROM. Using MacEnvy, I determined the Macintosh is running with the 256K ROM (version 120), rev. 1. I checked the global ROMBase, and it's set to 0x40800000. I'm using TMON version 2.8.1. Now, why on earth would there be a debugger statement in ROM? -- Ari Halberstadt '91, "Long live succinct signatures" ari@eleazar.dartmouth.edu Disclaimer: "Live Free or Die"
chewy@apple.com (Paul Snively) (12/02/89)
In article <17514@dartvax.Dartmouth.EDU> ari@eleazar.dartmouth.edu (Ari Halberstadt) writes: > While testing a program for size requirements, I stumbled uppon a debugger > trap at address 0x81E434. The way I undertstand it, addresses with the > high bit set are in the ROM. Using MacEnvy, I determined the Macintosh > is running with the 256K ROM (version 120), rev. 1. I checked the global > ROMBase, and it's set to 0x40800000. I'm using TMON version 2.8.1. Now, > why on earth would there be a debugger statement in ROM? Easy. So that in the event that something really catastrophic happens in the ROM, the debugger will be invoked so that some poor slob can attempt a post-mortem on it. If you do a search through ROM for the _SysError trap (the one that brings up the bomb box), you'll notice that a great many of them are followed by _Debugger traps. There's also a magic Segment Loader trick: if the BYTE (not word, not longword) at $12D is non-zero, a _Debugger trap will be invoked every time a segment is loaded. This can be very useful for debugging multi-segment applications. __________________________________________________________________________ Just because I work for Apple Computer, Inc. doesn't mean that they believe what I believe or vice-versa. __________________________________________________________________________ C++ -- The language in which only friends can access your private members. __________________________________________________________________________