From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54604 invoked by alias); 12 Feb 2019 02:53:52 -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 54593 invoked by uid 89); 12 Feb 2019 02:53:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Feb 2019 02:53:51 +0000 Received: from [10.0.0.178] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id F3ED71E077; Mon, 11 Feb 2019 21:53:48 -0500 (EST) Subject: Re: [PING] [PATCH v2 0/4] Some fixes for debug files and sysroots To: John Baldwin , gdb-patches@sourceware.org Cc: Simon Marchi References: From: Simon Marchi Message-ID: <5c402a5c-e07e-51fd-a1af-84d884eeb134@simark.ca> Date: Tue, 12 Feb 2019 02:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00130.txt.bz2 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! Simon