This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: Patch: rename to `insight'


> From: Tom Tromey <tromey@cygnus.com>
> Date: 29 Nov 2000 19:41:27 -0700
> 
> # Try to pick up gdb from the same directory as insight.
> path="`echo $0 | sed -e 's,/[^/]*$,,'`"
> if test -n "$path"; then
>    exe="$path/$gdb"
> else
>    exe="$bindir/$gdb"
> fi

Perhaps this should actually look for the executable (with "test -f"),
instead of just checking for the non-empty directory.  If you agree,
then this test should be moved down, where it falls back on PATH:

> if test -f "$exe"; then
>    # Nothing
>    :
> else
>    # Use PATH.
>    exe="$gdb"
> fi

If you use "test -f", you must append a .exe extension, because
there's no file named `gdb' on those systems which use .exe.

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