This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: rename to insight


>>>>> "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+"$@"}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]