From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19262 invoked by alias); 23 Apr 2002 09:16:59 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19200 invoked from network); 23 Apr 2002 09:16:48 -0000 Received: from unknown (HELO beta.dmz-eu.st.com) (164.129.1.35) by sources.redhat.com with SMTP; 23 Apr 2002 09:16:48 -0000 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with SMTP id 0852E4AD1 for ; Tue, 23 Apr 2002 09:16:44 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 0) id C37766168; Tue, 23 Apr 2002 09:16:43 +0000 (GMT) Received: from thistle.bri.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3FA9B1845 for ; Tue, 23 Apr 2002 09:16:43 +0000 (GMT) Received: from [164.129.8.14] (helo=masterwort) by thistle.bristol.st.com with esmtp (Exim 3.03 #5) id 16zwPi-00023J-00 for gdb@sources.redhat.com; Tue, 23 Apr 2002 10:16:42 +0100 Received: from [164.129.14.53] (helo=oswald) by masterwort with asmtp (Exim 3.22 #1) id 16zwPi-00046V-00 for gdb@sources.redhat.com; Tue, 23 Apr 2002 10:16:42 +0100 From: "Matthew Fyles" To: Subject: Re: GDB plugin proposal Date: Tue, 23 Apr 2002 02:16:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-SW-Source: 2002-04/txt/msg00383.txt.bz2 For the Superh H architecture we have added a command called fork into GDB = to allow the user to create a new process from the GDB command language in = the same way that the shell command is implemented. Basically the new process gets passed a pipe to the GDB command languange w= hen created allowing the user application to talk directly to GDB. This all= ows you to add new code which can be executed whilst in a GDB session witho= ut adding new commands into GDB. The main use we have for this at the momemt is to solve the problem of havi= ng to specify a port to a simulator that is driven via the GBD server inter= face. We fork a loader process from GDB which sets up the sockets for commu= nication and then passes a target-remote command with the port number back = into GDB which then connects to the simulator. This interface has proved very useful and allows us to add whatever functio= nality we require without changing the source code for GDB (with the except= ion of the 20 lines required to add the fork command) It will also work on all supported host platforms. If this would be useful to anybody then let me know.