From: John Baldwin <jhb@FreeBSD.org>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: Re: [PING] [PATCH v2 0/4] Some fixes for debug files and sysroots
Date: Tue, 12 Feb 2019 21:59:00 -0000 [thread overview]
Message-ID: <0681d5ee-4eb0-5324-ed43-821e2800d265@FreeBSD.org> (raw)
In-Reply-To: <5c402a5c-e07e-51fd-a1af-84d884eeb134@simark.ca>
On 2/11/19 6:53 PM, Simon Marchi wrote:
> On 2019-02-11 12:54 p.m., John Baldwin wrote:
>> On 1/28/19 12:47 PM, John Baldwin wrote:
>>> Relative to the first series:
>>>
>>> 1) I combined the duplicate checks for "are we in a sysroot" in the
>>> first patch as as suggested by Simon.
>>>
>>> 2) I dropped the second patch (trim trailing '/' from sysroot).
>>>
>>> 3) Patches 2 and 3 are a different take on solving the issue when the
>>> sysroot ends in '/'. Patch 2 adds a 'child_path' function to
>>> determine if a child path is a child of a parent (requiring the child
>>> to have at least one component "below" the parent). It also returns
>>> a pointer to the first component below the parent (but after the
>>> directory separator). Patch 3 uses child_path in
>>> find_separate_debug_file which fixes it in the case that the sysroot
>>> ends in a /.
>>>
>>> 4) The 4th patch is a new patch for a different issue I ran into while
>>> testing this some more today. The paths to object files are always
>>> canonical paths with symlinks resolved. If the sysroot entered by
>>> the user is a path containing symlinks, the filename_ncmp will
>>> never match. To handle sysroot paths that traverse symlinks,
>>> use gdb_realpath to generate a canonical sysroot path and use that
>>> instead of gdb_sysroot with child_path.
>>>
>>> As an aside, it's not clear to me when one should use gdb_realpath
>>> instead of lrealpath. gdb_realpath seems more widespread and also
>>> returns an RAII-friendly type, so I used that.
>>>
>>> John Baldwin (4):
>>> Look for separate debug files in debug directories under a sysroot.
>>> Add a new function child_path.
>>> Use child_path to determine if an object file is under a sysroot.
>>> Try to use the canonical version of a sysroot for debug file links.
>>
>> Just a ping.
>>
>
> Hi John,
>
> Note the comments on patch #2, otherwise this LGTM.
>
> Thanks!
Thanks, I've pushed it with the fixes in #2. Do you want to push your
build-id + sysroot fix?
--
John Baldwin
                                                                           Â
prev parent reply other threads:[~2019-02-12 21:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 20:47 John Baldwin
2019-01-28 20:47 ` [PATCH v2 1/4] Look for separate debug files in debug directories under a sysroot John Baldwin
2019-01-28 20:47 ` [PATCH v2 3/4] Use child_path to determine if an object file is " 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
2019-02-12 16:52 ` John Baldwin
2019-02-12 16:56 ` Simon Marchi
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 [this message]
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=0681d5ee-4eb0-5324-ed43-821e2800d265@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=simon.marchi@ericsson.com \
/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