Subject: re: db 'step' function
To: None <>
From: Stan Shebs <>
List: macbsd-general
Date: 01/03/1995 10:44:34
   Date: Tue, 3 Jan 95 11:32:54 -0500

   I'm no authority on this, but it seems to me that it is impossible to 
   'step' through ROM. The way I understand it, the debugger tries to use this 
   algorithm to 'step':
   1) save the instruction after the current instruction
   2) insert a trap after the current instruction
   3) execute the current instruction
   4) (control returns to the debugger via the inserted trap)
   5) replace the saved instruction (which is now current)
   In ROM (Read Only Memory), this algorithm fails, since you cannot write the 
   necessary trap instruction to ROM. This results in the 'step' command 
   acting like a 'continue' command (without the trap, control never returns 
   to the debugger; the processor simply continues to execute instructions in 

Exactly.  Now you know why ``hardware breakpoints'' are a good thing for
a chip to support, and why in-circuit emulator companies make money...