From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64560 invoked by alias); 15 Sep 2019 02:07: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 64467 invoked by uid 89); 15 Sep 2019 02:07:46 -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.1 spammy=straightforward, HX-Languages-Length:1616 X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 15 Sep 2019 02:07:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathworks.com; s=mimecast20180117; t=1568513261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ozs11Mj94Y+8XBHP570r/L3oTQMqbv6Cwr+/W7WplHY=; b=LE6RqVTclR/c0y8VJhcj2vD1Prq2djvYB/Bv1bN7Rdu3djyA4hDf5BHQYCIx4/y1mm4nt+ YuML8IiKZZVqJoSgL3FWKJk7RUImaLju0Wy2lNzVc8amhzOwAwc8lrU7Zc9vPzgXSEk0KA E+FtcI7+H7BVb5pe4fnDcSahOjh8Dnw= Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01lp2057.outbound.protection.outlook.com [104.47.32.57]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-MxprYRfEMsirUUlN7m9zRA-1; Sat, 14 Sep 2019 22:07:39 -0400 Received: from SN6PR05MB4159.namprd05.prod.outlook.com (52.135.67.138) by SN6PR05MB4077.namprd05.prod.outlook.com (52.135.66.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.14; Sun, 15 Sep 2019 02:07:37 +0000 Received: from SN6PR05MB4159.namprd05.prod.outlook.com ([fe80::3dfd:1d86:6748:c07d]) by SN6PR05MB4159.namprd05.prod.outlook.com ([fe80::3dfd:1d86:6748:c07d%4]) with mapi id 15.20.2284.009; Sun, 15 Sep 2019 02:07:37 +0000 From: Mike Gulick To: Eli Zaretskii , Andrew Burgess CC: "gdb-patches@sourceware.org" Subject: Re: [RFC] Apply compilation dir to source_path lookup Date: Sun, 15 Sep 2019 02:07:00 -0000 Message-ID: References: <8058b501-9020-84f1-ecf4-b46bfe3b86e3@mathworks.com> <20190907235059.GN6076@embecosm.com> <4d9f4c81-8580-2b42-a434-389ed7655d7f@mathworks.com> <20190913013851.GT6076@embecosm.com> <835zlw1z45.fsf@gnu.org> <834l1g1wp7.fsf@gnu.org> <20190913224535.GX6076@embecosm.com> <83r24jz7q4.fsf@gnu.org> <20190914152847.GY6076@embecosm.com> <83tv9eyiu0.fsf@gnu.org> In-Reply-To: <83tv9eyiu0.fsf@gnu.org> x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-ms-exchange-transport-forked: True Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: l68HJ5sa+JbD204FHBgHzvSn/wMWnb6DfK3texqypxnkS85eNykyZgzxZIDPTybkbAWqPsmqdElP+pnEwL2/5g== X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-09/txt/msg00258.txt.bz2 On 9/14/19 11:54 AM, Eli Zaretskii wrote: >> Date: Sat, 14 Sep 2019 11:28:47 -0400 >> From: Andrew Burgess >> Cc: mgulick@mathworks.com, gdb-patches@sourceware.org >> >> If we have: >> >> DW_AT_name: c:/project/foo.c >> DW_AT_comp_dir: d:/project/build/ >> >> And if the directory search path is: >> >> g:/mnt/project;$cdir;$cwd >> >> And the current directory is: >> >> h:/home/ >> >> Then this is what I think the search order will be: >> >> c:/project/foo.c >> g:/mnt/project/project/foo.c >> d:/project/build/project/foo.c >> h:/home/project/foo.c >> >> d:/project/build/project/foo.c >> g:/mnt/project/project/build/project/foo.c >> d:/project/build/project/build/project/foo.c >> h:/home/project/build/project/foo.c >> >> g:/mnt/project/foo.c >> d:/project/build/foo.c >> h:/home/foo.c >> >> The first and third block is what we currently (pre-patch) do, and the >> second block is what I think the patch should provide after Mike's >> last suggested update. >=20 > SGTM, thanks. >=20 Thanks Andrew and Eli for the clarification on the proper behavior on DOS paths. The only remaining questionable case for me is whether to check $cdir/COMP_DIR/FILENAME, which in your example above is 'd:/project/build/project/build/project/foo.c'. It seems reasonable to me to leave this out of the search, although one could argue leaving it on the source path may make the documentation slightly more straightforward (one less special case). Please let me know if you would like me to provide an updated version of the patch. Thanks, Mike