Subject: re: db 'step' function
To: None <magnus@MIT.EDU>
From: Stan Shebs <firstname.lastname@example.org>
Date: 01/03/1995 12:37:02
From: email@example.com (Daniel Risacher)
Date: Tue, 3 Jan 95 14:56:11 EST
another way to do the debugging might be to
put a trap to the debugger in RAM (somewhere).
copy the current instruction (ROM or RAM)
to the slot before the trap.
Jump to it.
Would this not work?
It could, but would be very hard to implement. For instance, you would
have to know how big the instruction is - can't just copy part of it.
For another, anything PC-relative would have to be changed to something
else - think of a jump backwards using an 8-bit offset; it would have to
be turned into an equivalent absolute jump.
Just out of curiosity, I looked up what Macsbug does; it executes in
trace mode (an m68k feature), which causes an exception at each instruction.
This is a very slow way to do things, but is better than nothing.
I'm somewhat embarassed to admit that native m68k GDB doesn't appear
to know how to use trace mode... something else to add!