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 3/5] Introduce gdb_tilde_expand


On Friday, September 22 2017, Pedro Alves wrote:

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

Sorry, I hadn't really understood what you were saying.  I will remove
the changes to gdb/cli/cli-cmds.c from the patch.

>>>> +/* 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.

Well, I personally don't really see the reason for the confusion here
since you could have read GLOB_TILDE's entry as well and noticed that
there is nothing fancy being done here, but I respect your way of
thinking, so I will just remove GLOB_TILDE_CHECK.

Thanks,

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


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