Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754173AbcJNKHN (ORCPT ); Fri, 14 Oct 2016 06:07:13 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35045 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbcJNKHF (ORCPT ); Fri, 14 Oct 2016 06:07:05 -0400 Date: Fri, 14 Oct 2016 12:07:00 +0200 From: Tobias Waldekranz To: linux-kernel@vger.kernel.org Cc: jan.kiszka@siemens.com Subject: [PATCH] scripts/gdb: relax requirement on symlink location Message-ID: <20161014100700.GA9188@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Westermo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 27 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. 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") -- 1.8.4.357.g8d83871.dirty