MacsBug

Last updated
MacsBug
Developer(s) Motorola, Apple Computer
Initial release1979;45 years ago (1979)
Stable release
6.6.3 / September 14, 2000;23 years ago (2000-09-14)
Operating system Classic Mac OS
Platform 680x0 and PowerPC
Type debugger
Website developer.apple.com/tools/debuggers/MacsBug/   OOjs UI icon edit-ltr-progressive.svg

MacsBug is a low-level (assembly language/machine-level) debugger for the classic Mac OS operating system. MacsBug is an acronym for Motorola Advanced Computer Systems Debugger, as opposed to Macintosh debugger (The Motorola 68000 Microprocessor is imprinted with the MACSS acronym [1] ). The original version was developed by Motorola as a general debugger for its 68000 systems. [2] [3] — it was ported to the Mac as a programmer's tool early in the project's development.

Contents

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. [4]

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 (force quit the crashed application and return to the Finder) or RB for ReBoot, which restarted the system. [5] 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 (although, occasionally, this may indicate the presence of another piece of software loaded into the area of memory reserved for the debugger, instead).

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 (uni- and multi-processor), Power Mac G4 Cube, the iMac family (Ruby, Indigo, Sage, Graphite, and Snow), and the iBook family (Indigo, Key Lime, and Graphite).

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 "⌘-⏏" (or "⌘-F12" on systems without an Eject key).

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 (allowing all documented Mac API parameters to be verified) and the fully symbolic Jasik debugger, which was much more powerful, but harder to use due to the intricate and non-standard user interface.

Versions

Related Research Articles

<span class="mw-page-title-main">GNU Debugger</span> Source-level debugger

The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, Assembly, C, C++, D, Fortran, Haskell, Go, Objective-C, OpenCL C, Modula-2, Pascal, Rust, and partially others.

An integrated development environment (IDE) is a software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, and a debugger. Some IDEs, such as IntelliJ IDEA, Eclipse and Lazarus contain the necessary compiler, interpreter or both; others, such as SharpDevelop and NetBeans, do not.

<span class="mw-page-title-main">A/UX</span> Early Unix-based operating system from Apple Computer

A/UX is a Unix-based operating system from Apple Computer for Macintosh computers, integrated with System 7's graphical interface and application compatibility. It is Apple's first official Unix-based operating system, launched in 1988 and discontinued in 1995 with version 3.1.1. A/UX requires select 68k-based Macintosh models with an FPU and a paged memory management unit (PMMU), including the Macintosh II, SE/30, Quadra, and Centris series.

<span class="mw-page-title-main">Classic Mac OS memory management</span>

Historically, the classic Mac OS used a form of memory management that has fallen out of favor in modern systems. Criticism of this approach was one of the key areas addressed by the change to Mac OS X.

<span class="mw-page-title-main">System 7</span> Seventh major release of the classic Mac OS

System 7 is the seventh major release of the classic Mac OS operating system for Macintosh computers, made by Apple Computer. It was launched on May 13, 1991, to succeed System 6 with virtual memory, personal file sharing, QuickTime, TrueType fonts, the Force Quit dialog, and an improved user interface.

<span class="mw-page-title-main">Macintosh Programmer's Workshop</span> Software development package for the Classic Mac OS

Macintosh Programmer's Workshop (MPW) is a software development environment for the Classic Mac OS operating system, written by Apple Computer. For Macintosh developers, it was one of the primary tools for building applications for System 7.x and Mac OS 8.x and 9.x. Initially MPW was available for purchase as part of Apple's professional developers program, but Apple made it a free download after it was superseded by CodeWarrior. On Mac OS X it was replaced by the Project Builder IDE, which eventually became Xcode.

<span class="mw-page-title-main">ResEdit</span>

ResEdit is a discontinued developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler Rez. For the average user, ResEdit was generally easier to use, because it used a graphical user interface. Although it had been intended to be a developer tool, power users often used it to edit icons, menus, and other elements of an application's GUI, customizing it to their own preferences.

<span class="mw-page-title-main">Power Mac G4</span> Series of personal computers

The Power Mac G4 is a series of personal computers designed, manufactured, and sold by Apple Computer from 1999 to 2004 as part of the Power Macintosh line. Built around the PowerPC G4 series of microprocessors, the Power Mac G4 was marketed by Apple as the first "personal supercomputers", reaching speeds of 4 to 20 gigaFLOPS. This was the first existing Macintosh product to be officially shortened as "Mac", and is the last Mac able to boot into classic Mac OS.

<span class="mw-page-title-main">Programmer's key</span>

The programmer's key, or interrupt button, is a button or switch on Classic Mac OS-era Macintosh systems, which jumps to a machine code monitor. The symbol on the button is ⎉: U+2389CIRCLED HORIZONTAL BAR WITH NOTCH. On most 68000 family based Macintosh computers, an interrupt request can also be sent by holding down the command key and pressing the power key on the keyboard. This effect is also simulated by the 68000 environment of the Mac OS nanokernel on PowerPC machines and the Classic environment.

<span class="mw-page-title-main">Macintosh clone</span> Computer running Mac OS not produced by Apple

A Macintosh clone is a computer running the Mac OS operating system that was not produced by Apple Inc. The earliest Mac clones were based on emulators and reverse-engineered Macintosh ROMs. During Apple's short lived Mac OS 7 licensing program, authorized Mac clone makers were able to either purchase 100% compatible motherboards or build their own hardware using licensed Mac reference designs.

The bomb icon (💣) has several different applications in computing, and typically indicates a fatal system error.

<span class="mw-page-title-main">Rosetta (software)</span> Operating system component

Rosetta is a dynamic binary translator developed by Apple Inc. for macOS, an application compatibility layer between different instruction set architectures. It enables a transition to newer hardware, by automatically translating software. The name is a reference to the Rosetta Stone, the artifact which enabled translation of Egyptian hieroglyphs.

The Mac OS nanokernel is an operating system kernel serving as the basis of most PowerPC based system software versions 7 through 9 of the classic Mac OS, predating Mac OS X.

MagiC is a third party and now open-sourced multitasking-capable TOS-compatible operating system for Atari computers, including some newer clone systems manufactured later. There are also variants that run as part of Mac and PC emulation environments, as well as on macOS Intel-Mac computers.

<span class="mw-page-title-main">ZTerm</span> Shareware terminal emulator

ZTerm is a shareware terminal emulator for Macintosh operating system. It was introduced in 1992 for System 7 and has been updated to run on macOS. Its name comes from its use of the ZModem file transfer protocol, which ZTerm implemented in a particularly high-performance package. In contrast to the built-in macOS Terminal app, which only communicates with other programs, ZTerm only communicates with hardware serial ports.

ptrace is a system call found in Unix and several Unix-like operating systems. By using ptrace one process can control another, enabling the controller to inspect and manipulate the internal state of its target. ptrace is used by debuggers and other code-analysis tools, mostly as aids to software development.

<span class="mw-page-title-main">Classic Mac OS</span> Original operating system of Apple Mac (1984–2001)

Mac OS is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and ending with Mac OS 9. The Macintosh operating system is credited with having popularized the graphical user interface concept. It was included with every Macintosh that was sold during the era in which it was developed, and many updates to the system software were done in conjunction with the introduction of new Macintosh systems.

References

  1. "Image: L_Motorola-XC68000L%20(SN807).jpg, (890 × 425 px)". cpu-world.com. Retrieved 2015-09-02.
  2. "MACSbug 68000 Debugger User's Manual]" (PDF). Corvus Systems. March 1983. Much of the information contained in this manual is reprinted with the permission of Motorola Inc. from the Motorola MC68000 Design Module User's Guide (Motorola part number MEX68KDM(D4) AUGUST, 1980)
  3. 1 2 MACSbug 68000 Debugger User's Manual, Catalog entry, Computer History Museum
  4. Karl Dandenell (11 February 2001). "TN 1136: MicroBug: The ROM Debugger" (PDF). Archived from the original (PDF) on 2014-11-13. Retrieved 2015-09-02.
  5. "MacsBug Reference and Debugging Guide" (PDF). developer.apple.com. 1995. Archived from the original (PDF) on June 5, 2011.