This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Look for system.gdbinit in specified --data-directory
On Wed, Nov 14, 2012 at 10:47 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Doug Evans <dje@google.com>
>> Date: Wed, 14 Nov 2012 10:17:46 -0800
>> Cc: gdb-patches@sourceware.org
>>
>> +* If the system-wide init file (specified by --with-system-gdbinit) lives
>> + in GDB's data-directory, then GDB will now look for it in the directory
>> + specified by the --data-directory command line option.
>
> "Look for it" means that GDB will search the file there. But what you
> really want to say is that GDB will read the file, because "if the
> system-wide init file lives in GDB's data-directory", there's no need
> to search for the file: it's already known to be there.
Well, yes and no.
The file should be there, that's the place to look, but the file needn't exist.
[Whether gdb should complain in that situation is a separate question.
It doesn't complain today.]
> Alternatively, you could say this simpler, e.g.:
>
> GDB now looks for a system-wide init file in the directory specified
> by the --data-directory command line option.
That's too brief, I like my wording better (given that we're both
using the word "look").
Remember, this only happens *if* system.gdbinit lives somewhere
underneath data-directory.
> (Assuming I understood correctly what the feature does.)
>
>> +If the system-wide init file lives in the @value{GDBN} data-directory
>> +(@pxref{Data Files}), then @value{GDBN} will look for the file in the
>> +directory specified by the @option{--data-directory} command line option.
>
> Same here.
>
> OK with those changes. Thanks.
I'm not sure how to proceed.
Can you give me acceptable phrasing for this?
[given the above condition that we need to state that this only
happens if system.gdbinit lives in data-directory]
TIA
+If the system-wide init file lives in the @value{GDBN} data-directory
+(@pxref{Data Files}), then @value{GDBN} will look for the file in the
+directory specified by the @option{--data-directory} command line option.