Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1044346pxu; Thu, 17 Dec 2020 00:15:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnUlxQwhkN0s4/YRthD5Sbf1OczHWFAm4+Ja8ZN/NibhTf74vMtcEl98bGHCgv8eyO2qNO X-Received: by 2002:a17:906:eb5b:: with SMTP id mc27mr12246873ejb.163.1608192946328; Thu, 17 Dec 2020 00:15:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608192946; cv=none; d=google.com; s=arc-20160816; b=rrp34XLad3jhG/icfp+ihkSb4HZyXuVtYm/F6q7Pu5Tj4IfbtnaEdKckdb4jnEgqlD 3Ty/h06AtmgqlGt7DHGFJfMh2LM1yPg3RUQ+gVVhIi3dxzME2sCgHQGYa3kOKNNKJoy2 9KiYWsWU8/Dw6bbs+LoDmBXxLRIzCusOMBOClcbTMmEIbxuojw5y1eZdWsw8WfZCedF0 ibNUlHuR9mCsy23Y09XE5GsE4UYkYZZBfXmEl929Q0oM8k5NTXICyLmXbFRuAhoNn6aQ elKX/QqHCwuJlDVzPKYJHX8Zdj0tS3IYjdz/qg1R/L17MWfKs3AaPq5hgFp+wR429En1 habQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=2CNnrrBOdDiYug1v/Ab4K14yDGzsPcao+k2Qny9DrPY=; b=Iy1eF8eYOtwhhEx310f15r097eQYBme4+A/XIlJraKk+A/evFAvhB4uVkbBOsI6Kip kTcIwdnwnq4qkHESemnnclbLJWoKZ739T2W+Ysp945RDR43EpNUFdnCzn/0c1lOwrBqd dfL/FULlVoyYbM5qPq1t+5sCiNKu+F3taTYYvMunODbYcAT5Qbs//GpD1vMBIJIUkh9f uhRrAEvsC3uLfJMXnIxFJuRat4c+mjFOlerOGe21wDnqtree1p+Kv2hLOiuwDegHA5sd RBnl7kf2ksqO02SeL/zpSK8LRkgsMLROYuTY2UoBI2KNDQI+XfuJTcBlGz4EQvwCGtIi VdRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si3875023eds.590.2020.12.17.00.15.24; Thu, 17 Dec 2020 00:15:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgLQIO7 (ORCPT + 99 others); Thu, 17 Dec 2020 03:14:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726601AbgLQIO7 (ORCPT ); Thu, 17 Dec 2020 03:14:59 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A8EAC061794 for ; Thu, 17 Dec 2020 00:14:19 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kpoQT-00AYWE-Gs; Thu, 17 Dec 2020 09:14:17 +0100 Message-ID: <104d6f30adf16d30a8d85e0d0813a85ad563e09c.camel@sipsolutions.net> Subject: Re: [PATCH] gdb: correct sys.path insertion From: Johannes Berg To: Jan Kiszka , linux-kernel@vger.kernel.org Cc: Kieran Bingham Date: Thu, 17 Dec 2020 09:14:00 +0100 In-Reply-To: References: <20201216143646.82aa53af4af8.I04934c69a9f3abac5ba6d542f823898357fd0e11@changeid> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jan, > > -sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb") > > +sys.path.insert(0, os.path.dirname(__file__)) > > > > try: > > gdb.parse_and_eval("0") > > > > How did you test that, which setup? I just ran "gdb > /build/vmlinux", and "python print(sys.path)" didn't expose this > duplication. So your change would actually break that common case. Oh, seems that was my mistake. I was trying to (explicitly) load the file as "scripts/gdb/vmlinux-gdb.py" rather than using the symlink that gets installed. Never mind. johannes