From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15396 invoked by alias); 1 Oct 2008 21:10:16 -0000 Received: (qmail 15388 invoked by uid 22791); 1 Oct 2008 21:10:15 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Oct 2008 21:09:36 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2616E10D34; Wed, 1 Oct 2008 21:09:34 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id D225810D33; Wed, 1 Oct 2008 21:09:33 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Kl8wv-0002Hr-58; Wed, 01 Oct 2008 17:09:33 -0400 Date: Wed, 01 Oct 2008 21:10:00 -0000 From: Daniel Jacobowitz To: Bart Veer Cc: gdb-patches@sourceware.org Subject: Re: add file I/O support when debugging an embedded target via jtag Message-ID: <20081001210933.GA8477@caradoc.them.org> Mail-Followup-To: Bart Veer , gdb-patches@sourceware.org References: <48BAAC44.4000002@codesourcery.com> <20080925222009.GA8202@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00036.txt.bz2 On Wed, Oct 01, 2008 at 07:38:22PM +0100, Bart Veer wrote: > Adding a new stratum certainly appears to be controversial, although I > am not certain why. Because this is not about what in the current sources will break. It's about the purpose of the target stack, which does not include synthesizing operations like this. > Daniel> I don't see why it has to be in the target vector at all. > > The h/w debug file I/O code needs to take some action for every load, > resume and wait operation. For the wait, deprecated_target_wait_hook > provides an alternative but I assume that hook is going to disappear > at some point. There are no equivalent hooks for load and resume. Those operations are where your patch acts, but I don't think they're what you actually want. What you do after load doesn't have anything to do with "load"; I assume that at load time you're setting the breakpoint, but GDB already has several hooks to set internal breakpoints. And it already has support for hitting an internal breakpoint, hiding it from the user, and taking some action - this is how SVR4 shared library support works. -- Daniel Jacobowitz CodeSourcery