From owner-cvs-all Tue Nov 19 1:33:46 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1B7037B401; Tue, 19 Nov 2002 01:33:44 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BCCC43E91; Tue, 19 Nov 2002 01:33:43 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA03379; Tue, 19 Nov 2002 20:33:38 +1100 Date: Tue, 19 Nov 2002 20:46:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Nate Lawson Cc: Jake Burkholder , , Subject: Re: cvs commit: src/sys/dev/sab sab.c In-Reply-To: Message-ID: <20021119203208.U30290-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 18 Nov 2002, Nate Lawson wrote: > > Modified files: > > sys/dev/sab sab.c > > Log: > > - Add support for ALT_BREAK_TO_DEBUGGER; this is the only reliable way > > to trigger a breakpoint with this chip. > > When I put together the GDB_AUTO_ENTER patch, I made a decision to > abstract out the state machine. You pass it a char and it returns 1 if it > has reached a match or zero otherwise. If multiple state machines were > needed (say sio + sab) then the caller would pass in static storage for > the state (say from the softc). Since you've duplicated the > ALT_BREAK_TO_DEBUGGER state machine now, it should probably get moved into > its own function as well. > > One question I had was where such state machines should go. Since they're > dependent on DDB, I put mine in db_trap.c. Ideas? I think this is a > useful move since there are UDP-based gdb stubs as well. The duplication is ugly, but so is looking at the data as it passes by siointr() is supposed to do only pseudo-dma (*bufptr++ = read_ioreg() for input, etc.) and everything else in it is a wart at best. But we really do want to look at the data at pseudo-dma time for at least the *BREAK_TO_DEBUGGER cases, since the higher-level interrupt or whatever that finishes the input may be blocked forever (due to bugs). There may also be locking problems with a generic routine. Fast interrupt handlers need different locking for (the closeure of) everything that accesses the state. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message