From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20831 invoked by alias); 17 Feb 2003 17:46:11 -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 20807 invoked from network); 17 Feb 2003 17:46:10 -0000 Received: from unknown (HELO nimbus19.internetters.co.uk) (209.61.216.65) by 172.16.49.205 with SMTP; 17 Feb 2003 17:46:10 -0000 Received: (qmail 31823 invoked from network); 17 Feb 2003 17:46:08 -0000 Received: from unknown (HELO ?192.168.0.251?) (81.152.26.239) by nimbus19.internetters.co.uk with SMTP; 17 Feb 2003 17:46:08 -0000 Subject: Re: What has replaced fork to launch external commands? From: Alex Bennee To: Daniel Jacobowitz Cc: gdb@sources.redhat.com In-Reply-To: <20030217172738.GA19524@nevyn.them.org> References: <1045500565.2505.20.camel@cambridge.braddahead> <20030217170013.GA18947@nevyn.them.org> <1045501672.2505.25.camel@cambridge.braddahead> <20030217172738.GA19524@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1 Organization: Hackers Inc Message-Id: <1045503576.2505.30.camel@cambridge.braddahead> Mime-Version: 1.0 Date: Mon, 17 Feb 2003 17:46:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00276.txt.bz2 On Mon, 2003-02-17 at 17:27, Daniel Jacobowitz wrote: > > > > Meanwhile you can probably roughly use "shell" if I'm understanding > > > what you're doing. > > > > Mmm, tried that but it ends up echoing gdb server stuff to the gdb > > command line. > > Eh? An example, please? I guess it depends what the fork command is > actually _doing_. I modified the _connectsh4 script command: define _connectsh4 set endian $arg0 set architecture sh4 if ($NoPosixConsole) # fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 noposixconsole printf "Attempting to fork gdbserver NoPosixConsole\n" shell /opt/STM/ST40R2.0.5/bin/shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 noposixconsole & else if ($KeepPosixConsole) #fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 keepposixopen shell /opt/STM/ST40R2.0.5/bin/shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 keepposixopen & printf "Attempting to fork gdbserver KeepPosixConsole\n" else # fork shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 shell /opt/STM/ST40R2.0.5/bin/shlaunch -si $arg0 -gdbserv host=$arg1 -cid0 host=$arg1 & printf "Attempting to fork gdbserver\n" end end if (!$SHLaunchErrorCode) $arg2 end end And gdb fails with: [alex@cambridge linux-2.4.20]$ ~/sources/gdb/gdb-5.3-sh/gdb/gdb -nw -x loadlinux GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sh4-gnu-linux". `uX~a1Missing argument 1 in user function. I'm *assuming* the `uX bit is part of the gdbserver protocol getting echoed back. Once I've finsihed checking out the gdb source I may be able to see what this fork command does different from the shell command already provided. I assume something subtle otherwise why add the feature instead of enhancing shell? -- Alex, homepage: http://www.bennee.com/~alex/ Whenever I date a guy, I think, is this the man I want my children to spend their weekends with? -- Rita Rudner