Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964937AbcJQPpT (ORCPT ); Mon, 17 Oct 2016 11:45:19 -0400 Received: from thoth.sbs.de ([192.35.17.2]:44559 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964911AbcJQPpI (ORCPT ); Mon, 17 Oct 2016 11:45:08 -0400 Subject: Re: [PATCH] scripts/gdb: relax requirement on symlink location To: Tobias Waldekranz , linux-kernel@vger.kernel.org References: <20161014100700.GA9188@gmail.com> From: Jan Kiszka Message-ID: Date: Mon, 17 Oct 2016 17:45:04 +0200 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: <20161014100700.GA9188@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 43 On 2016-10-14 12:07, Tobias Waldekranz wrote: > The current construct for inserting the `scripts/gdb/` directory into > the python path requires `vmlinux-gdb.py` to be symlinked in the root of > the kernel build tree. > > By first resolving the symlink and inserting that path, the symlink can > be placed in an arbitrary directory. Can you provide a brief word on what this would enable (i.e. why we want it)? > > Signed-off-by: Tobias Waldekranz > --- > 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..a9029f4 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(os.path.realpath(__file__))) > > try: > gdb.parse_and_eval("0") > Unfortunately, this breaks with modules that are generated, namely constants.py. They are located in the build dir. Please suggest a version that was tested successfully against both the existing and the new use case. Thanks, Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux