Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site mordor.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!ut-sally!mordor!jdb
From: jdb@mordor.UUCP (John Bruner)
Newsgroups: net.unix
Subject: Re: how does adb/dbx work?
Message-ID: <3025@mordor.UUCP>
Date: Mon, 12-Aug-85 15:45:16 EDT
Article-I.D.: mordor.3025
Posted: Mon Aug 12 15:45:16 1985
Date-Received: Wed, 14-Aug-85 20:47:38 EDT
References: <410@uvm-cs.UUCP> <456@ittvax.ATC.ITT.UUCP> <1547@utah-gr.UUCP>
Organization: S-1 Project, LLNL
Lines: 16

> 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@mordor [jdb@s1-c.ARPA]	(415) 422-0758
  UUCP: ...!ucbvax!dual!mordor!jdb 	...!seismo!mordor!jdb