Re: [PATCH 2/2] Try to initialize data-directory by first searching for "data-directory" in the same directory as the gdb binary

Eli Zaretskii
2012-09-24T14:24:32Z

> From: Khoo Yit Phang <khooyp@cs.umd.edu>
> Date: Mon, 24 Sep 2012 09:14:21 -0400
> Cc: Khoo Yit Phang <khooyp@cs.umd.edu>, Jan Kratochvil <jan.kratochvil@redhat.com>, GDB Patches <gdb-patches@sourceware.org>
>
> > Well, for my part, I cannot wait for this patch to go in, because
> > I've grown accustomed to being able to just run the GDB from the
> > build directory. Having to install it now is an important downer
> > for me.
>
> How about this solution, instead of patching the gdb binary, I can install a shell script into the build directory that contains:
>
> #!/bin/sh
> exec $BUILDDIR/gdb/gdb -data-directory $BUILDDIR/gdb/data-directory "$@"
>
> and call this script "gdb-local" (or alternatively, call this script "gdb" and the rename the actual binary to "gdb.exe" in the build directory).

Please don't. Invoking GDB from the build directory should "just
work".