This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 3/5] Introduce gdb_tilde_expand
On 09/22/2017 06:37 PM, Sergio Durigan Junior wrote:
> On Friday, September 22 2017, Pedro Alves wrote:
>> I realized something: in light of the fact that "cd" is not what
>> is used to specify the inferior's cwd anymore since v1, patching
>> this particular use of tilde_expand, and not others seems arbitrary.
>>
>> I.e., this now looks like kind of a spurious change to me, and
>> I think you should drop the changes to this file...
>
> Yeah, you're right. I still intend to keep the cleanups, if that's OK
> for you.
I don't know what you mean by that.
>
>>> +/* See common/gdb_tilde_expand.h. */
>>> +
>>> +std::string
>>> +gdb_tilde_expand (const char *dir)
>>> +{
>>> + gdb_glob glob (dir, GLOB_TILDE | GLOB_TILDE_CHECK | GLOB_ONLYDIR, NULL);
>>
>> By my reading of man glob, GLOB_TILDE_CHECK already implies GLOB_TILDE.
>
> Yes, but I think it pays to be explicit in this case.
I think it only adds to confusion. I did "man glob",
saw that GLOB_TILDE_CHECK implies GLOB_TILDE and then
got to wonder why is GLOB_TILDE being passed explicitly.
> I'll remove GLOB_ONLYDIR and resubmit the patch.
Fine with me.
Thanks,
Pedro Alves