Amiga Debugging Tools

The Amiga_Debugging tutorial covers the tools available on the Developer CD for finding bugs — particularly memory-related bugs that cause crashes on systems different from the developer's.

The two essential tools

Enforcer (MMU-based memory trap)

NDK_3.1/SWToolkit3/Enforcer-37.64/

Enforcer uses the MMU (Memory Management Unit) to trap accesses to low memory (address 0–1024) and non-existent memory the instant they occur. Requires a 68030 or 68040 with MMU.

What it catches: null pointer dereferences, uninitialized pointers, reads/writes of address 0, illegal memory access. These are called "Enforcer hits."

Why it matters: accesses that seem harmless on your system (like reading address 0) can cause failures in the field. "Many companies now require that all of their inhouse software pass at least Enforcer and Mungwall testing."

The V37.64 Enforcer on this CD supports 68040 processors and has configurable output options. It must be RUN (not just resident).

Mungwall (memory guard bands)

Mungwall wraps the memory allocator, placing guard bands (special fill patterns) around every allocation. Detects: - Buffer overruns and underruns - Use-after-free - Double-free - Writing past allocation boundaries

Other debugging tools from SWToolkit3

Tool Purpose
IO_Torture Stress-tests IO requests; finds improper IO usage
Scratch Memory allocation tracking
Devmon Device call monitoring
Owner Tracks memory ownership
LVO Library vector offset tracing
wack / RomWack Low-level system debugger (uses SAD kernel)
FindHit Finds the code responsible for an Enforcer hit
DiskEd Disk editor
tasklist Lists all tasks and their states
showconfig Shows system configuration
showlocks Shows file locks
watchmem Watches memory for changes
bumprev Bumps version numbers
eatmem Reduces free memory to stress-test allocation failures
snoop Monitors system activity

The debugging workflow

  1. Always develop with Enforcer + Mungwall running — catch bugs immediately, not in the field.
  2. Use IO_Torture for any code that does device I/O — catches improper IORequest handling.
  3. Test with eatmem — your allocation-failure paths need exercise.
  4. When an Enforcer hit occurs: note the PC (program counter), use FindHit to locate the source line.
  5. Use wack/RomWack for crash post-mortem — the SAD kernel (V39+) in exec allows debugging via serial port even when the system is hung.

Why this matters

From the source: "Hidden and obvious software problems are often caused by use of null pointers, uninitialized pointers, improperly initialized structures, improper use of IO requests, improper abort code, improper memory usage, or overwriting of memory allocations."

All of these are caught by Enforcer + Mungwall during development. Shipping software that generates Enforcer hits is considered unprofessional and was being publicly tracked by Amiga Technologies.

See Also


Sources: Commodore-Amiga, Inc., "Using Amiga Debugging Tools" tutorial (1991-1993); Ralph Babel, "The Amiga Guru Book" (1993), Ch. 11. Raw: raw/tutorials/v39-aa-features.md; raw/exec/mmu-library.md; raw/rkm/guru-book.md Updated: 2026-08-08