[PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory
Thu Oct 4 17:07:00 GMT 2012
> Date: Thu, 4 Oct 2012 06:49:28 -0700
> From: Joel Brobecker <firstname.lastname@example.org>
> Cc: email@example.com, firstname.lastname@example.org, email@example.com,
> > Why not? Aren't there specific directories and/or files near the GDB
> > executable in this case?
> I have a feeling that this would open the door allowing attackers
> to setup GDB to execute unwanted code if we make it easy to reproduce
> the same environment and place GDB in a mode where it thinks it is
> inside a build directory.
Well, FWIW, Emacs uses a similar scheme (it tests for a couple of
files in specific directories around itself to decide whether it is
invoked without being installed), and I don't think anyone complained
> But beyond this technical aspect, I am reluctant to add a mode to GDB
> that would then become useless to 99% of the people once GDB is properly
> installed. I don't think that the convenience it provides is important
> enough to justify it.
The question is: what's the price? If the price is sufficiently low,
I don't see why you should be reluctant, even if you are right and 99%
of users will find this useless. (FWIW, I almost always use GDB from
its build directory, I don't even know why.)
More information about the Gdb-patches