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


> 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.

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

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


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