This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/4] Introduce gdb_chdir
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org, palves at redhat dot com
- Date: Tue, 12 Sep 2017 17:53:33 +0300
- Subject: Re: [PATCH 3/4] Introduce gdb_chdir
- Authentication-results: sourceware.org; auth=none
- References: <20170912042325.14927-1-sergiodj@redhat.com> <20170912042325.14927-4-sergiodj@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Pedro Alves <palves@redhat.com>, Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Tue, 12 Sep 2017 00:23:24 -0400
>
> In order to be able to change the inferior's directory before its
> execution, it is necessary to perform a tilde expansion of the
> directory provided by the user and then chdir into the resulting dir.
> This is what gdb_chdir does.
>
> Unfortunately it is not possible to use "tilde_expand" from readline
> because this is common code and gdbserver doesn't use readline. For
> that reason I decided to go with "glob" and its GNU extension,
> GLOB_TILDE. With the import of the "glob" module from gnulib, this is
> a no-brainer.
Why not simply 'getenv("HOME")'?