From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14601 invoked by alias); 15 Feb 2002 16:01:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14502 invoked from network); 15 Feb 2002 16:01:40 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 15 Feb 2002 16:01:40 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16bknc-0005eZ-00; Fri, 15 Feb 2002 11:01:24 -0500 Date: Fri, 15 Feb 2002 08:01:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] gdbserver --attach support Message-ID: <20020215110124.A21634@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sources.redhat.com References: <20020117152504.A6947@nevyn.them.org> <6137-Fri18Jan2002101403+0200-eliz@is.elta.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6137-Fri18Jan2002101403+0200-eliz@is.elta.co.il> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-02/txt/msg00428.txt.bz2 On Fri, Jan 18, 2002 at 10:14:03AM +0200, Eli Zaretskii wrote: > > Date: Thu, 17 Jan 2002 15:25:04 -0500 > > From: Daniel Jacobowitz > > > > Someone else did this some time ago, but got lost in the paper trail, I > > think. This adds '--attach ' as an alternative for 'prog [args...]'. > > How about documenting this in gdb.texinfo? Well, that took me much too long. Eli, how's this? I haven't written texinfo before, but I think I did OK. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer 2002-02-15 Daniel Jacobowitz * gdb.texinfo: Document gdbserver ``--attach'' command. Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.89 diff -u -r1.89 gdb.texinfo --- gdb.texinfo 2002/02/08 00:39:45 1.89 +++ gdb.texinfo 2002/02/15 15:59:44 @@ -9956,7 +9956,7 @@ system does all the symbol handling. To use the server, you must tell it how to communicate with @value{GDBN}; -the name of your program; and the arguments for your program. The +the name of your program; and the arguments for your program. The usual syntax is: @smallexample @@ -9992,6 +9992,16 @@ conflicts with another service, @code{gdbserver} prints an error message and exits.} You must use the same port number with the host @value{GDBN} @code{target remote} command. + +On some targets, @code{gdbserver} can also attach to running programs. +This is accomplished via the @code{--attach} argument. The syntax is: + +@smallexample +target> gdbserver @var{comm} --attach @var{PID} +@end smallexample + +@var{PID} is the process ID of a currently running process. It isn't necessary +to point @code{gdbserver} at a binary for the running process. @item On the @value{GDBN} host machine, you need an unstripped copy of your program, since @value{GDBN} needs