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

Jan Kratochvil
2012-09-18T15:44:08Z

On Tue, 18 Sep 2012 17:37:40 +0200, Khoo Yit Phang wrote:
> If I understand relocate_gdb_directory, it already tries to relocate
> data-directory from /usr/local/share/gdb (GDB_DATADIR on my config) to
> build-directory/gdb/../share/gdb. Could we move the
> build-directory/gdb/data-directory there?

No.

> Otherwise, do you mean to change relocate_gdb_directory to specially check
> for GDB_DATADIR and replace it with buiid-directory/gdb/data-directory? That
> could lead to the odd possibility that an installed GDB would look for
> data-directory in a stray build directory. I suppose this can be prevented
> by checking if gdb_program_name is itself located in build-directory.

Installed GDB will have path /usr/bin/gdb and I find OK if GDB checks that
/usr/bin/data-directory/ does not exist.

Thanks,
Jan