From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10266 invoked by alias); 12 Feb 2019 21:59:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10004 invoked by uid 89); 12 Feb 2019 21:59:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.freebsd.org Received: from mx2.freebsd.org (HELO mx2.freebsd.org) (8.8.178.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Feb 2019 21:59:13 +0000 Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id ABA617038D; Tue, 12 Feb 2019 21:59:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF25484E3E; Tue, 12 Feb 2019 21:59:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6D09B150D3; Tue, 12 Feb 2019 21:59:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: [PING] [PATCH v2 0/4] Some fixes for debug files and sysroots To: Simon Marchi , gdb-patches@sourceware.org Cc: Simon Marchi References: <5c402a5c-e07e-51fd-a1af-84d884eeb134@simark.ca> From: John Baldwin Openpgp: preference=signencrypt Message-ID: <0681d5ee-4eb0-5324-ed43-821e2800d265@FreeBSD.org> Date: Tue, 12 Feb 2019 21:59:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <5c402a5c-e07e-51fd-a1af-84d884eeb134@simark.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF25484E3E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00167.txt.bz2 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                                                                            Â