Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1500819 > unrolled thread
| Started by | Tobias Waldekranz <tobias@waldekranz.com> |
|---|---|
| First post | 2016-10-14 12:10 +0200 |
| Last post | 2016-10-17 17:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] scripts/gdb: relax requirement on symlink location Tobias Waldekranz <tobias@waldekranz.com> - 2016-10-14 12:10 +0200
Re: [PATCH] scripts/gdb: relax requirement on symlink location Jan Kiszka <jan.kiszka@siemens.com> - 2016-10-17 17:50 +0200
| From | Tobias Waldekranz <tobias@waldekranz.com> |
|---|---|
| Date | 2016-10-14 12:10 +0200 |
| Subject | [PATCH] scripts/gdb: relax requirement on symlink location |
| Message-ID | <ss7B7-8l7-15@gated-at.bofh.it> |
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 <tobias@waldekranz.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..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
[toc] | [next] | [standalone]
| From | Jan Kiszka <jan.kiszka@siemens.com> |
|---|---|
| Date | 2016-10-17 17:50 +0200 |
| Message-ID | <stikO-5jI-41@gated-at.bofh.it> |
| In reply to | #1500819 |
On 2016-10-14 12:07, Tobias Waldekranz wrote:
> 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.
Can you provide a brief word on what this would enable (i.e. why we want
it)?
>
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.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..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")
>
Unfortunately, this breaks with modules that are generated, namely
constants.py. They are located in the build dir. Please suggest a
version that was tested successfully against both the existing and the
new use case.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web