Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273027 > unrolled thread

[PATCH] scripts: fix the sys path for gdb scripts

Started byyalin wang <yalin.wang2010@gmail.com>
First post2015-11-19 12:00 +0100
Last post2015-11-27 07:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] scripts: fix the sys path for gdb scripts yalin wang <yalin.wang2010@gmail.com> - 2015-11-19 12:00 +0100
    Re: [PATCH] scripts: fix the sys path for gdb scripts Jan Kiszka <jan.kiszka@siemens.com> - 2015-11-25 08:40 +0100
      Re: [PATCH] scripts: fix the sys path for gdb scripts yalin wang <yalin.wang2010@gmail.com> - 2015-11-27 07:40 +0100

#1273027 — [PATCH] scripts: fix the sys path for gdb scripts

Fromyalin wang <yalin.wang2010@gmail.com>
Date2015-11-19 12:00 +0100
Subject[PATCH] scripts: fix the sys path for gdb scripts
Message-ID<qwv6y-8c4-17@gated-at.bofh.it>
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")
-- 
1.9.1

--
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/

[toc] | [next] | [standalone]


#1277070

FromJan Kiszka <jan.kiszka@siemens.com>
Date2015-11-25 08:40 +0100
Message-ID<qyCQh-33y-5@gated-at.bofh.it>
In reply to#1273027
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
--
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/

[toc] | [prev] | [next] | [standalone]


#1278556

Fromyalin wang <yalin.wang2010@gmail.com>
Date2015-11-27 07:40 +0100
Message-ID<qzkRj-7FY-7@gated-at.bofh.it>
In reply to#1277070
> On Nov 25, 2015, at 15:38, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> 
> 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.
> 
ok, i will send a V2 patch for this .



--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web