Add the internal helper get_thread_info that calculated the thread_info
from a given task variable. Also export this service as a convenience
function.
Note: ia64 version is untested.
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
Signed-off-by: Jan Kiszka
---
scripts/gdb/task.py
The internal helper for_each_task iterates over all tasks of the target,
calling the provided function on each. For performance reasons, we cache
a reference to the gdb type object of a task.
Signed-off-by: Jan Kiszka
---
scripts/gdb/task.py | 40
1 fil
Parse the target endianness from the output of "show endian" and cache
the result to return it via the new helper get_target_endiannes. We will
need it for reading integers from buffers that contain target memory.
Signed-off-by: Jan Kiszka
---
scripts/gdb/utils.py | 17 +
1 fil
Provide an internal helper with container_of semantics. As type lookups
are very slow in gdb-python and we need a type "long" for this, cache
the reference to this type object. Then export the helper also as a
convenience function form use at the gdb command line.
Signed-off-by: Jan Kiszka
---
s
This is probably the most useful helper when debugging kernel modules:
lx-symbols will first reload vmlinux. Then it searches recursively for
*.ko files in the specified paths and the current directory. Finally it
walks the kernel's module list, issuing the necessary add-symbol-file
command for eac
This helper probes the type of the gdb server. Supported are QEMU and
KGDB so far. Knowledge about the gdb server is required e.g. to retrieve
the current CPU or current task.
Signed-off-by: Jan Kiszka
---
scripts/gdb/utils.py | 35 +++
1 files changed, 35 inser
Add the helper task_by_pid that can look up a task by its PID. Also
export it as a convenience function.
Signed-off-by: Jan Kiszka
---
scripts/gdb/task.py| 29 +
scripts/gdb/vmlinux-gdb.py |1 +
2 files changed, 30 insertions(+), 0 deletions(-)
diff --g
This function allows to obtain a per-cpu variable, either of the current
or an explicitly specified CPU.
Note: sparc64 version is untested.
CC: "David S. Miller"
CC: sparcli...@vger.kernel.org
Signed-off-by: Jan Kiszka
---
scripts/gdb/percpu.py | 61 +
This pokes into the log buffer of the debugged kernel, dumping it to the
gdb console. Helping in case the target should or can no longer execute
dmesg itself.
CC: Kay Sievers
Signed-off-by: Jan Kiszka
---
scripts/gdb/dmesg.py | 63
scripts/gd
Add helpers for reading integers from target memory buffers. Required
when caching the memory access is more efficient than reading individual
values via gdb.
Signed-off-by: Jan Kiszka
---
scripts/gdb/utils.py | 18 ++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --g
This helper caches to result of "show architecture" and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka
---
scripts/gdb/utils.py |9 +
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/utils.py b/scripts/gdb/utils.py
inde
This is a shorthand for *$lx_per_cpu("current_task"), i.e. a convenience
function to retrieve the currently running task of the active context.
Signed-off-by: Jan Kiszka
---
scripts/gdb/percpu.py | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/
This provides the basic infrastructure to load kernel-specific python
helper scripts when debugging the kernel in gdb.
The loading mechanism is based on gdb loading for -gdb.py when
opening . Therefore, this places a corresponding link to the
main helper script into the output directory that conta
13 matches
Mail list logo