From: Simon Marchi <simark@simark.ca>
To: John Baldwin <jhb@FreeBSD.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 2/4] Add a new function child_path.
Date: Tue, 12 Feb 2019 02:46:00 -0000 [thread overview]
Message-ID: <d5b7e1fa-8839-f560-ce88-60b13f43b010@simark.ca> (raw)
In-Reply-To: <b88f9823-caee-cb57-835f-81297f481188@simark.ca>
On 2019-02-11 9:43 p.m., Simon Marchi wrote:
> On 2019-01-28 3:47 p.m., John Baldwin wrote:
>> child_path returns a pointer to the first component in a child path
>> that comes after a parent path. This does not depend on trying to
>> stat() the paths since they may describe remote paths but instead
>> relies on filename parsing. The function requires that the child path
>> describe a filename that contains at least one component below the
>> parent path and returns a pointer to the first component.
>>
>> gdb/ChangeLog:
>>
>> * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
>> unittests/child-path-selftests.c.
>> * common/pathstuff.c (child_path): New function.
>> * common/pathstuff.h (child_path): New prototype.
>> * unittests/child-path-selftests.c: New file.
>
> Thanks, this LGTM. Just minor comments below.
Oh, and maybe name the function is_child_path or child_path_p?
Simon
next prev parent reply other threads:[~2019-02-12 2:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 20:47 [PATCH v2 0/4] Some fixes for debug files and sysroots John Baldwin
2019-01-28 20:47 ` [PATCH v2 2/4] Add a new function child_path John Baldwin
2019-02-12 2:43 ` Simon Marchi
2019-02-12 2:46 ` Simon Marchi [this message]
2019-02-12 16:52 ` John Baldwin
2019-02-12 16:56 ` Simon Marchi
2019-01-28 20:47 ` [PATCH v2 3/4] Use child_path to determine if an object file is under a sysroot John Baldwin
2019-01-28 20:47 ` [PATCH v2 1/4] Look for separate debug files in debug directories " John Baldwin
2019-01-28 20:53 ` [PATCH v2 4/4] Try to use the canonical version of a sysroot for debug file links John Baldwin
2019-02-11 17:54 ` [PING] [PATCH v2 0/4] Some fixes for debug files and sysroots John Baldwin
2019-02-12 2:53 ` Simon Marchi
2019-02-12 21:59 ` John Baldwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5b7e1fa-8839-f560-ce88-60b13f43b010@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=jhb@FreeBSD.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox