[PATCH 0/4] New "set cwd" command

Sergio Durigan Junior sergiodj@redhat.com
Tue Sep 12 17:51:00 GMT 2017


On Tuesday, September 12 2017, Eli Zaretskii wrote:

>> From: Sergio Durigan Junior <sergiodj@redhat.com>
>> Cc: gdb-patches@sourceware.org,  palves@redhat.com
>> Date: Tue, 12 Sep 2017 12:48:05 -0400
>> 
>> The new "set cwd" command also uses chdir (i.e., no shell involved), but
>> because it is shared code between GDB and gdbserver, and because
>> gdbserver doesn't link against readline, it cannot use tilde_expand.
>> Therefore I had to import the "glob" module from gnulib. And also, this
>> specific chdir is only invoked after the call to fork/vfork on
>> fork_inferior, but before we actually execute the binary.
>
> Thanks.
>
> The last bit means that this will only work for targets that use
> fork/vfork, i.e. only for Posix targets.  Right?

Well, the way it's implemented, yes.  AFAIK there's nothing preventing
this feature to be implemented in non-vfork targets like Windows, except
the fact that I don't have access to those targets to test.

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



More information about the Gdb-patches mailing list