public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: yalin wang <yalin.wang2010@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] scripts: fix the sys path for gdb scripts
Date: Wed, 25 Nov 2015 08:38:58 +0100	[thread overview]
Message-ID: <56556592.3050008@siemens.com> (raw)
In-Reply-To: <1447930457-30865-1-git-send-email-yalin.wang2010@gmail.com>

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 <yalin.wang2010@gmail.com>
> ---
>  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

  reply	other threads:[~2015-11-25  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 10:54 [PATCH] scripts: fix the sys path for gdb scripts yalin wang
2015-11-25  7:38 ` Jan Kiszka [this message]
2015-11-27  6:37   ` yalin wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56556592.3050008@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yalin.wang2010@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox