Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site utah-gr.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!utah-cs!utah-gr!thomas From: thomas@utah-gr.UUCP (Spencer W. Thomas) Newsgroups: net.unix Subject: Re: how does adb/dbx work? Message-ID: <1547@utah-gr.UUCP> Date: Mon, 12-Aug-85 01:18:02 EDT Article-I.D.: utah-gr.1547 Posted: Mon Aug 12 01:18:02 1985 Date-Received: Wed, 14-Aug-85 00:47:59 EDT References: <410@uvm-cs.UUCP> <456@ittvax.ATC.ITT.UUCP> Reply-To: thomas@utah-gr.UUCP (Spencer W. Thomas) Organization: Univ of Utah CS Dept Lines: 18 In article <456@ittvax.ATC.ITT.UUCP> goldman@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@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