From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31288 invoked by alias); 15 Feb 2002 16:12:10 -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 31173 invoked from network); 15 Feb 2002 16:12:00 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 15 Feb 2002 16:12:00 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16bkxq-0005ng-00; Fri, 15 Feb 2002 11:11:58 -0500 Date: Fri, 15 Feb 2002 08:12:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] gdbserver --attach support Message-ID: <20020215111158.C21634@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/msg00430.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? And in the gdbserver man page would be nice too. OK to commit? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer 2002-02-15 Daniel Jacobowitz * gdbserver/gdbserver.1: Document --attach. Index: gdbserver.1 =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/gdbserver.1,v retrieving revision 1.2 diff -u -r1.2 gdbserver.1 --- gdbserver.1 2001/03/06 08:21:44 1.2 +++ gdbserver.1 2002/02/15 16:10:49 @@ -10,6 +10,11 @@ .RB tty .RB prog .RB "[\|" args... "\|]" +.PP +.B gdbserver +.RB tty +.B --attach +.RB PID .ad b .SH DESCRIPTION GDBSERVER is a program that allows you to run GDB on a different machine @@ -49,6 +54,14 @@ GDBs `target remote' command, which will be described shortly. Note that if you chose a port number that conflicts with another service, gdbserver will print an error message and exit. + +On some targets, gdbserver can also attach to running programs. +This is accomplished via the --attach argument. The syntax is: + + target> gdbserver COMM --attach PID + +PID is the process ID of a currently running process. It isn't +necessary to point gdbserver at a binary for the running process. Usage (host side):