From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Tromey To: cgd@sibyte.com (Chris G. Demetriou) Cc: insight@sourceware.cygnus.com Subject: Re: rename to insight Date: Wed, 22 Nov 2000 10:29:00 -0000 Message-id: <8766lfc0pf.fsf@creche.cygnus.com> References: <874s10dfwt.fsf@creche.cygnus.com> <5t7l5vaopo.fsf@highland.sibyte.com> X-SW-Source: 2000-q4/msg00272.html >>>>> "Chris" == Chris G Demetriou writes: >> +exec gdb -w ${1+"$@"} Chris> This may get you a different 'gdb' than the one corresponding Chris> to the 'insight' being invoked. Yeah, and in fact I got to experience this yesterday. Chris> The good news is, i'm pretty sure that pretty much all UNIX-ish Chris> systems invoke shell scripts with a path of the script as $0 Yes. See appended script. Tom #! /bin/sh # GUI wrapper for gdb. # Copyright 1986-2000 Free Software Foundation, Inc. # This file is part of GDB. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. path="`echo $0 | sed -e 's,/[^/]*$,,'`" if test -n "$path"; then gdb="$path/gdb" else gdb=gdb fi exec $gdb -w ${1+"$@"}