From: Aaron Tomlin <atomlin@redhat.com>
To: jan.kiszka@siemens.com, kbingham@kernel.org
Cc: atomlin@atomlin.com, linux-kernel@vger.kernel.org,
swboyd@chromium.org, dianders@chromium.org,
skhan@linuxfoundation.org
Subject: Re: [PATCH v2] scripts/gdb: Ensure the absolute path is generated on initial source
Date: Thu, 28 Jul 2022 08:22:20 +0100 [thread overview]
Message-ID: <20220728072220.xhyg65izemzcdojr@ava.usersys.com> (raw)
In-Reply-To: <20220712110248.1404125-1-atomlin@redhat.com>
On Tue 2022-07-12 12:02 +0100, Aaron Tomlin wrote:
> Post 'make scripts_gdb' a symbolic link to scripts/gdb/vmlinux-gdb.py
> is created. Currently 'os.path.dirname(__file__)' does not generate
> the absolute path to scripts/gdb resulting in the following:
>
> (gdb) source vmlinux-gdb.py
> Traceback (most recent call last):
> File "scripts/gdb/vmlinux-gdb.py", line 25, in <module>
> import linux.utils
> ModuleNotFoundError: No module named 'linux'
>
> This patch ensures that the absolute path to scripts/gdb in relation to
> the given file is generated so each module can be located accordingly.
>
> Signed-off-by: Aaron Tomlin <atomlin@redhat.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 4136dc2c59df..3e8d3669f0ce 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.abspath(__file__)) + "/scripts/gdb")
>
> try:
> gdb.parse_and_eval("0")
> --
> 2.34.3
Any feedback?
Kind regards,
--
Aaron Tomlin
next prev parent reply other threads:[~2022-07-28 7:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 11:02 Aaron Tomlin
2022-07-28 7:22 ` Aaron Tomlin [this message]
2022-07-28 15:29 ` Doug Anderson
2022-12-14 18:56 ` Nick Desaulniers
2022-12-14 19:39 ` Nick Desaulniers
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=20220728072220.xhyg65izemzcdojr@ava.usersys.com \
--to=atomlin@redhat.com \
--cc=atomlin@atomlin.com \
--cc=dianders@chromium.org \
--cc=jan.kiszka@siemens.com \
--cc=kbingham@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=swboyd@chromium.org \
/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
all inboxes | Powered by JetHome®