Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753678AbbKYHjF (ORCPT ); Wed, 25 Nov 2015 02:39:05 -0500 Received: from thoth.sbs.de ([192.35.17.2]:45433 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752284AbbKYHjD (ORCPT ); Wed, 25 Nov 2015 02:39:03 -0500 Subject: Re: [PATCH] scripts: fix the sys path for gdb scripts To: yalin wang , linux-kernel@vger.kernel.org, Andrew Morton References: <1447930457-30865-1-git-send-email-yalin.wang2010@gmail.com> From: Jan Kiszka Message-ID: <56556592.3050008@siemens.com> Date: Wed, 25 Nov 2015 08:38:58 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <1447930457-30865-1-git-send-email-yalin.wang2010@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1463 Lines: 45 On 2015-11-19 11:54, yalin wang wrote: > The sys.path should be scripts/gdb, > so that we can import linux lib correctly. > > Signed-off-by: yalin wang > --- > scripts/gdb/vmlinux-gdb.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/gdb/vmlinux-gdb.py b/scripts/gdb/vmlinux-gdb.py > index ce82bf5..5a45d1a 100644 > --- a/scripts/gdb/vmlinux-gdb.py > +++ b/scripts/gdb/vmlinux-gdb.py > @@ -13,7 +13,7 @@ > > import os > > -sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb") > +sys.path.insert(0, os.path.dirname(__file__)) > > try: > gdb.parse_and_eval("0") > NACK. This patch is assuming that vmlinux-gdb.py is (only) started from the scripts/gdb folder. But CONFIG_GDB_SCRIPTS places a link to vmlinux-gdb.py aside the vmlinux binary in the top-level folder. That way, the script is auto-loaded by gdb. If you have a compelling use case for loading the script manually from its original folder, we can discuss augmenting the path. But removing the existing one is wrong. Andrew, please drop the patch from your queue. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/