MacsBug


MacsBug is a low-level debugger for the classic Mac OS. MacsBug is an acronym for Motorola Advanced Computer Systems Debugger, as opposed to Macintosh debugger. The original version was developed by Motorola as a general debugger for its 68000 systems — it was ported to the Mac as a programmer's tool early in the project's development.
MacsBug is invoked by hitting the Macintosh's "Programmer's Key" or, as it became later known, the "Interrupt Key" or by pressing "Command-Power". MacsBug offers many commands for disassembling, searching, and viewing data as well as control over processor registers. MacsBug is not installed by default with Mac OS, although every Macintosh since the Macintosh Plus includes a debugger in ROM known as MicroBug.
Users who stumble into MacsBug by accident need only to enter G and press return to escape from MacsBug; however, MacsBug is not installed by default, requiring a system extension, so a typical user environment does not include it. However, it was occasionally installed by end users to provide very basic error recovery. As the classic Mac OS lacked memory protection, "hard crashes" where an application crash simply froze the entire system weren't uncommon. With MacsBug installed, instead of an unresponsive system, the user would be dumped into MacsBug, where they could type ES to Exit to Shell or RB for ReBoot, which restarted the system. Such recovery efforts were often not successful, with the only alternative a hard reset.
In Mac OS versions 7.5 and later, the presence of MacsBug is indicated at startup; it is present if the user sees the text Debugger installed.
MacsBug was originally for the Motorola 68000 series of processors only. When Apple introduced the Power Macintosh in 1994, it was followed by an updated MacsBug that supported the PowerPC instruction set and architecture.
The last version of MacsBug was 6.6.3, released September 14, 2000. This final version works with all of the machines released in the July–September timeframe of 2000, including the Power Mac G4, Power Mac G4 Cube, the iMac family, and the iBook family.
6.6.3 includes better support for debugging MP tasks, and fixes some serious bugs in the memory setting commands when used in PCI I/O space. It can also be used in Classic when running under Mac OS X, where it is invoked by pressing "⌘-⏏".
Mac OS X allows programmers to use familiar MacsBug commands in gdb. This gdb plugin is included with the OS X Developer Tools, located in the directory /usr/libexec/gdb/plugins/MacsBug/.
Third party alternatives to MacsBug included ICOM Simulations' TMON which came with the Darin Adler Extended User Area & Trap Discipline and the fully symbolic Jasik debugger, which was much more powerful, but harder to use due to the intricate and non-standard user interface.