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-24T18:11:48Z

> From: Khoo Yit Phang <khooyp@cs.umd.edu>
> Date: Mon, 24 Sep 2012 12:09:34 -0400
> Cc: Khoo Yit Phang <khooyp@cs.umd.edu>, Jan Kratochvil <jan.kratochvil@redhat.com>, GDB Patches <gdb-patches@sourceware.org>
>
> A simpler alternative would be to detect if the gdb_program_name == $BUILDDIR/gdb/gdb, then only look for $BUILDDIR/gdb/data-directory. It would still hard code parts of the build directory into the binary (i.e., make sure you don't have any embarrassing/privacy-leaking paths in your home directory structure), but would much lessen the risk of a stray data-directory. What do you think?

Sounds fine to me.