This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] New option -B: simplify running gdb from build directory
- From: Doug Evans <dje at google dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 27 Dec 2013 12:51:24 -0800
- Subject: Re: [RFC] New option -B: simplify running gdb from build directory
- Authentication-results: sourceware.org; auth=none
- References: <yjt2lhz6t716 dot fsf at ruffy dot mtv dot corp dot google dot com> <838uv63vav dot fsf at gnu dot org>
On Fri, Dec 27, 2013 at 12:15 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Doug Evans <dje@google.com>
>> Date: Fri, 27 Dec 2013 11:42:29 -0800
>>
>> The "make run" Makefile rule simplifies running gdb from the shell,
>> but it doesn't simplify running gdb from gdb: I'm always typing
>> "--data-directory=$(pwd)/data-directory".
>> And since we can't agree on a way to let gdb auto-detect being run
>> from the build directory, how about this?
>
> Thanks.
>
> However, if we cannot agree on the above, why would adding a new
> option facilitate agreement?
It's a different question.
This proposal is different: It's suggesting having the user pass an
explicit option as opposed to gdb automagically deciding
> Personally, this way of solving the issue makes little sense to me: if
> I need to specify a special option to GDB, I can be expected to
> specify --data-directory explicitly.
-B is a lot less to type than --data-directory=$(pwd)/data-directory.
It's a convenience option.
Note that we already do similar kinds of things. e.g. -x,-ex,-ix,-iex
vs --command,--eval-command,--init-command,--init-eval-command.