how does adb/dbx work?
John Bruner
jdb at mordor.UUCP
Tue Aug 13 05:45:16 AEST 1985
> 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).
The "trace" bit can also be used by an intrusive debugger (one which
is linked with the program), since a program can use the "signal"
system call to catch trace traps and can set the T bit in its own
PS. I used this once to implement a PC address trace package.
--
John Bruner (S-1 Project, Lawrence Livermore National Laboratory)
MILNET: jdb at mordor [jdb at s1-c.ARPA] (415) 422-0758
UUCP: ...!ucbvax!dual!mordor!jdb ...!seismo!mordor!jdb
More information about the Comp.unix
mailing list