From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10565 invoked by alias); 29 Feb 2008 20:26:21 -0000 Received: (qmail 10554 invoked by uid 22791); 29 Feb 2008 20:26:20 -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; Fri, 29 Feb 2008 20:25:57 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D4822983A1 for ; Fri, 29 Feb 2008 20:25:55 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8503E9831E for ; Fri, 29 Feb 2008 20:25:55 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JVBnm-00025y-GH for gdb@sourceware.org; Fri, 29 Feb 2008 15:25:54 -0500 Date: Fri, 29 Feb 2008 20:29:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: target remote-attach? Message-ID: <20080229202554.GA7757@caradoc.them.org> Mail-Followup-To: gdb@sourceware.org References: <1204316091.19253.525.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1204316091.19253.525.camel@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00268.txt.bz2 On Fri, Feb 29, 2008 at 12:14:51PM -0800, Michael Snyder wrote: > Just thinking aloud... we ought to have a sort of "remote-attach" > command, that would allow us to connect to a remote target when it > is already in a "run" state. Right now the initial handshake > protocol prevents doing that. > > The target might be waiting to tell gdb "I stopped because of > a SIGTRAP", or similar, or it might actually be running, and > need to be stopped via a serial BRK or the like. After that, > we would be in a sane state from which we could do the usual > remote_open handshake. > > Or is there something like that already? It's true that we can't attach to a remote stub where the target is currently running; we'll be looking at that in the context of non-stop debugging but probably by changing the remote protocol somewhat. With the existing protocol it's hard because sending a query may be interpreted as an interrupt. If the stub's waiting to send something, how's the user supposed to figure out if it already has or not? -- Daniel Jacobowitz CodeSourcery