how does adb/dbx work?

Spencer W. Thomas thomas at utah-gr.UUCP
Mon Aug 12 15:18:02 AEST 1985


In article <456 at ittvax.ATC.ITT.UUCP> goldman at ittvax.ATC.ITT.UUCP (Ken Goldman) writes:
>Maybe I can help with some PDP11 insight.  First, hardware single step
>is out of the question in a multi-user system.  The way the PDP11
>debuggers work is by replacing the instruction to be traced with a
>trap instruction.  

This is true for breakpoints.  On the other hand, if you are
"single-stepping" (on a PDP-11 or a Vax, at least), the debugger sets
the "trace" bit in the subprocess's Program Status Word (PSW).  This bit
causes a trace interrupt after the next instruction executes, returning
control to the debugger.  This way, the debugger doesn't need to know
all the possible places the program might end up after an instruction is
executed (so it could stuff a trap in each possible location).

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas at utah-cs.ARPA)
	"You don't get to choose how you're going to die.  Or when.
	 You can only decide how you're going to live." Joan Baez



More information about the Comp.unix mailing list