* [PATCH] scripts: fix the sys path for gdb scripts
@ 2015-11-19 10:54 yalin wang
2015-11-25 7:38 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: yalin wang @ 2015-11-19 10:54 UTC (permalink / raw)
To: jan.kiszka, linux-kernel; +Cc: yalin wang
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts: fix the sys path for gdb scripts
2015-11-19 10:54 [PATCH] scripts: fix the sys path for gdb scripts yalin wang
@ 2015-11-25 7:38 ` Jan Kiszka
2015-11-27 6:37 ` yalin wang
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2015-11-25 7:38 UTC (permalink / raw)
To: yalin wang, linux-kernel, Andrew Morton
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts: fix the sys path for gdb scripts
2015-11-25 7:38 ` Jan Kiszka
@ 2015-11-27 6:37 ` yalin wang
0 siblings, 0 replies; 3+ messages in thread
From: yalin wang @ 2015-11-27 6:37 UTC (permalink / raw)
To: Jan Kiszka; +Cc: linux-kernel, Andrew Morton
> 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 .
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-27 6:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19 10:54 [PATCH] scripts: fix the sys path for gdb scripts yalin wang
2015-11-25 7:38 ` Jan Kiszka
2015-11-27 6:37 ` yalin wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.