Re: [PATCH] Warn about data-directory when failing to import Python "gdb" module

Eli Zaretskii
2012-09-18T06:17:44Z

> Date: Mon, 17 Sep 2012 13:58:29 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, GDB Patches <gdb-patches@sourceware.org>
>
> > If you are running GDB from the build directory, please run gdb with
> > the -data-directory flag set as appropriate, e.g., "builddir/gdb
> > -data-directory builddir/data-directory".
>
> I expect that the majority of users will *not* be running GDB out
> of the build directory. If they encounter the same issue with a
> poorly installed GDB (Eg: They copied the GDB binary from one location
> to another without copying the remaining support files), the error
> message is not going to help them.
>
> I think that people who do run GDB from the build directory (a power
> user setup) should be sufficiently knowledgeable, and we should try
> to tailor the hints towards regular users.

Is it possible to make GDB find its data-directory when it is run from
the directory where it was built?