info-mac@uw-beaver (07/18/84)
From: Bill Croft <croft@safe> The "new" macsbug (that uses a window at the bottom of the Mac screen) that was posted to info-mac a few weeks ago, has some new command syntax. Here is a note from Bruce Horn explaining the new commands: ---- Here's a summary of the new Macsbug commands: CL a -- clears the breakpoint at location a. If a is omitted, all breakpoints are cleared. BR a c -- sets a breakpoint at location a for count c. This allows you to say "Stop after this location is hit 6 times." GT a -- is Go Till a. (i.e. sets temporary breakpoint at a and goes.) T n -- Traces n instructions. S n -- Steps through n instructions This is just like the old trace, where it will actually step into the dispatcher. Now T, the previous command, will step OVER a trap. No more tracing through the dispatcher when you just want to get back to the main procedure. MR n -- Looks n bytes down the stack and replaces the longword there (usually a return address) with a magic address in the debugger. Instead of returning normally, this returns control to the debugger which puts back in the real address. This is a good way to step across subroutines which you know are good--just trace one instruction into the routine and type MR. WH x -- if x<512, prints out the address corresponding to the A-Trap numbered x. If >=512, the A-Trap "nearest" the address X will be printed. This is useful for finding out what trap was executing when an error occurred. RX -- Toggles the display mode so that the registers are or are not dumped during a trace command. The disassembly at PC will always occur. I think that's all of the new or changed routines in the improved Macsbug. Parsing is slightly different, however. Gone is the DH command, replaced by the prefix @ for indirect. So the command DH 4200 is replaced by DM @4200. An additional symbol, TP (thePort) is also supported. This is useful for looking at the Quickdraw globals. You can reference addresses relative to a given location just by using the + operator. You can also use ".", last address referenced, to temporarily have an anchor from which to reference relative addresses. For example, DM 14000 will set . to 14000, and then you can say DM .+200, DM .+400, etc. Bruce -------