This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 4/5] Implement "set cwd" command on GDB


On Saturday, September 23 2017, Eli Zaretskii wrote:

>> From: Sergio Durigan Junior <sergiodj@redhat.com>
>> Cc: gdb-patches@sourceware.org,  palves@redhat.com
>> Date: Fri, 22 Sep 2017 16:55:35 -0400
>> 
>> @table @code
>> @kindex set cwd
>> @cindex change inferior's working directory
>> @item set cwd @r{[}@var{directory}@r{]}
>> Set the inferior's working directory to @var{directory}, which will be
>> @code{glob}-expanded in order to resolve tildes (@file{~}).  If no
>> argument has been specified, the command clears the setting and resets
>> it to an empty state.  This setting has no effect on @value{GDBN}'s
>> working directory, and it only takes effect the next time you start
>> the inferior.
>
> OK.  I'd suggest to append this text.
>
>   The @file{~} in @var{directory} is a short for the @dfn{home
>   directory}, usually pointed to by the @env{HOME} environment
>   variable.  On MS-Windows, if @env{HOME} is not defined, @value{GDBN}
>   uses the concatenation of @env{HOMEDRIVE} and @env{HOMEPATH} as
>   fallback.

Thanks, added.

> (This ignores the "~username" case -- is that important enough to
> mention?)

I don't think so.  I mean, the "~username" tilde expansion is part of
the default behaviour, so I think it's OK to leave it implicit.

> Btw, what should the user do if the file name includes a literal '~'?
> Escape it with a backslash?

Yes.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]