This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] New "set cwd" command
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, palves at redhat dot com
- Date: Tue, 12 Sep 2017 13:51:36 -0400
- Subject: Re: [PATCH 0/4] New "set cwd" command
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 51CDB37E67
- References: <20170912042325.14927-1-sergiodj@redhat.com> <83fubsq84f.fsf@gnu.org> <87zi9zeud6.fsf@redhat.com> <83o9qfq2i1.fsf@gnu.org>
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/