From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6397 invoked by alias); 5 Mar 2002 02:27:22 -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 6038 invoked from network); 5 Mar 2002 02:27:09 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 5 Mar 2002 02:27:09 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 2EEFF3E69; Mon, 4 Mar 2002 20:05:53 -0500 (EST) Message-ID: <3C8419F1.8090601@cygnus.com> Date: Mon, 04 Mar 2002 18:27:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Wolfgang Denk Cc: gdb-patches@sources.redhat.com Subject: Re: New "attach" and "rsh" features for GDB/gdbserver on PowerPC References: <20020304091402.DE57C109E9@denx.denx.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00041.txt.bz2 Just FYI, > Description: > > Many embedded systems use gdbserver for application debugging. > However the current implementation (on PowerPC) requires that the > processes to be debugged are started under control of gdbserver. But > often you want to debug (examine) some process on the target system > that is already running. This is supported by the new support for the > "attach" command. I get the feeling that this change is pretty sigifnicant in terms of the protocol (new ``I'' response, new attach packet, ...?). Could you please post something describing what you plan on changing. > This allows to have always one instance of gdbserver running on the > target as a general purpose debug server that can be used to attach > to any of the running application processes. In this "server mode" > (when no command to debug is given on the gdbserver command line) > gdbserver will not terminate when the debugged process exits, thus > making sure you can continue to use the debug server. > > The "rshell" (remote shell) extension allows to use GDB/gdbserver to > run arbitrary commands on the target system. The main intention is to > be able to find out the PIDs of the processes you want to attach to > by running a "ps" command without need for additional services on the > target. BTW, there is already the ``(gdb) monitor'' command and the corresponding ``qRcmd'' packet. As a general rule, features are always present - using #ifdef HAVE_TARGET_ATTACH #ifdef FOO #else #endif is probably not a good idea. enjoy, Andrew