This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: rename to insight
- To: cgd at sibyte dot com (Chris G. Demetriou)
- Subject: Re: rename to insight
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 22 Nov 2000 11:37:32 -0700
- Cc: insight at sourceware dot cygnus dot com
- References: <874s10dfwt.fsf@creche.cygnus.com> <mailpost.974851789.4627@postal.sibyte.com> <5t7l5vaopo.fsf@highland.sibyte.com>
- Reply-To: tromey at cygnus dot com
>>>>> "Chris" == Chris G Demetriou <cgd@sibyte.com> 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+"$@"}