On 31.07.19 17:44, Doug Anderson wrote:
> Hi,
>
> On Wed, Jul 31, 2019 at 7:24 AM Jan Kiszka wrote:
>>
>> On 31.07.19 01:40, Douglas Anderson wrote:
>>> Some systems (like Chrome OS) may use "split debug" for kernel
>>> modules. That means that t
On 31.07.19 01:40, Douglas Anderson wrote:
> Some systems (like Chrome OS) may use "split debug" for kernel
> modules. That means that the debug symbols are in a different file
> than the main elf file. Let's handle that by also searching for debug
> symbols that end in ".ko.debug".
Is this
Yet another code simplification.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py| 71
scripts/gdb/linux/modules.py | 2 +-
2 files changed, 33 insertions(+), 40 deletions(-)
diff --git a/scripts/gdb/linux/cpus.py b
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 13 +
1 file changed, 13 insertions(+)
diff --git a/scripts/gdb/linux/utils.py b
Analogously to the task list, convert the module list to a generator
function. It noticeably simplifies the code.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 33 +++--
scripts/gdb/linux/symbols.py | 2 +-
2 files changed, 12
/symbols.py
new file mode 100644
index 000..bd21a96
--- /dev/null
+++ b/scripts/gdb/linux/symbols.py
@@ -0,0 +1,127 @@
+#
+# gdb helper commands and functions for Linux kernel debugging
+#
+# load kernel and module symbols
+#
+# Copyright (c) Siemens AG, 2011-2013
+#
+# Authors:
+# Jan Kiszka
Will be used first to count module references. It is optimized to read
the mask only once per stop.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 54 +++
1 file changed, 54 insertions(+)
diff --git a/scripts/gdb
Python's generator.
Signed-off-by: Daniel Wagner daniel.wag...@bmw-carit.de
Cc: Jan Kiszka jan.kis...@siemens.com
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 50 +++---
1 file changed, 20 insertions(+), 30 deletions
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 21 +
1 file changed, 21 insertions
Will soon be used for loading symbols, printing global variables or
listing modules.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 39 +++
1 file changed, 39 insertions(+)
create mode 100644 scripts/gdb/linux/modules.py
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 jan.kis
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 jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 17 +
1 file changed, 17 insertions(+)
diff --git
This provides a reliable breakpoint target, required for automatic
symbol loading via the gdb helper command 'lx-symbols'.
CC: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
kernel/module.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions
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 k...@vrfy.org
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/dmesg.py | 64
Add the internal helper get_module_by_name to obtain the module
structure corresponding to the given name. Also export this service as a
convenience function.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 28
scripts/gdb/vmlinux
Type lookups are very slow in gdb-python which is often noticeable when
iterating over a number of objects. Introduce the helper class
CachedType that keeps a reference to a gdb.Type object but also
refreshes it after an object file has been loaded.
Signed-off-by: Jan Kiszka jan.kis
This adds a lsmod-like command to list all currently loaded modules of
the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 46 +++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/scripts/gdb/linux
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 35
I'm proposing myself for keeping an eye on these scripts and integrating
contributions.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
MAINTAINERS | 5 +
1 file changed, 5 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 2ebb056..3570313 100644
--- a/MAINTAINERS
+++ b
(re-)loading a module.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/symbols.py | 39 +++
1 file changed, 39 insertions(+)
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index bd21a96..139841f 100644
This adds a lsmod-like command to list all currently loaded modules of
the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 46 +++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/scripts/gdb/linux
Yet another code simplification.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py| 71
scripts/gdb/linux/modules.py | 2 +-
2 files changed, 33 insertions(+), 40 deletions(-)
diff --git a/scripts/gdb/linux/cpus.py b
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 35
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 18
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 jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 17 +
1 file changed, 17 insertions(+)
diff --git
Analogously to the task list, convert the module list to a generator
function. It noticeably simplifies the code.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 33 +++--
scripts/gdb/linux/symbols.py | 2 +-
2 files changed, 12
(re-)loading a module.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/symbols.py | 39 +++
1 file changed, 39 insertions(+)
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index bd21a96..139841f 100644
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 jan.kis
Add the internal helper get_module_by_name to obtain the module
structure corresponding to the given name. Also export this service as a
convenience function.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 28
scripts/gdb/vmlinux
gdb.
Resolve this by disabling pagination during automatic symbol updates. We
restore the user's configuration once done.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/symbols.py | 11 +++
1 file changed, 11 insertions(+)
diff --git a/scripts/gdb/linux
I'm proposing myself for keeping an eye on these scripts and integrating
contributions.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
MAINTAINERS | 5 +
1 file changed, 5 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 2ebb056..3570313 100644
--- a/MAINTAINERS
+++ b
Will soon be used for loading symbols, printing global variables or
listing modules.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 39 +++
1 file changed, 39 insertions(+)
create mode 100644 scripts/gdb/linux/modules.py
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 jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 27 +++
scripts/gdb/vmlinux-gdb.py | 1 +
2 files changed, 28 insertions(+)
diff
Type lookups are very slow in gdb-python which is often noticeable when
iterating over a number of objects. Introduce the helper class
CachedType that keeps a reference to a gdb.Type object but also
refreshes it after an object file has been loaded.
Signed-off-by: Jan Kiszka jan.kis
This class allows to iterate over all tasks of the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 46 ++
1 file changed, 46 insertions(+)
create mode 100644 scripts/gdb/linux/tasks.py
diff --git a/scripts
Will be used first to count module references. It is optimized to read
the mask only once per stop.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 54 +++
1 file changed, 54 insertions(+)
diff --git a/scripts/gdb
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 13 +
1 file changed, 13 insertions(+)
diff --git a/scripts/gdb/linux/utils.py b
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 35
Will be used first to count module references. It is optimized to read
the mask only once per stop.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 54 +++
1 file changed, 54 insertions(+)
diff --git a/scripts/gdb
This class allows to iterate over all tasks of the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 46 ++
1 file changed, 46 insertions(+)
create mode 100644 scripts/gdb/linux/tasks.py
diff --git a/scripts
Type lookups are very slow in gdb-python which is often noticeable when
iterating over a number of objects. Introduce the helper class
CachedType that keeps a reference to a gdb.Type object but also
refreshes it after an object file has been loaded.
Signed-off-by: Jan Kiszka jan.kis
Add the internal helper get_module_by_name to obtain the module
structure corresponding to the given name. Also export this service as a
convenience function.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 28
scripts/gdb/vmlinux
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 jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 27 +++
scripts/gdb/vmlinux-gdb.py | 1 +
2 files changed, 28 insertions(+)
diff
(re-)loading a module.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/symbols.py | 39 +++
1 file changed, 39 insertions(+)
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index bd21a96..139841f 100644
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 13 +
1 file changed, 13 insertions(+)
diff --git a/scripts/gdb/linux/utils.py b
/symbols.py
new file mode 100644
index 000..bd21a96
--- /dev/null
+++ b/scripts/gdb/linux/symbols.py
@@ -0,0 +1,127 @@
+#
+# gdb helper commands and functions for Linux kernel debugging
+#
+# load kernel and module symbols
+#
+# Copyright (c) Siemens AG, 2011-2013
+#
+# Authors:
+# Jan Kiszka
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 jan.kis
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 18
Will soon be used for loading symbols, printing global variables or
listing modules.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 39 +++
1 file changed, 39 insertions(+)
create mode 100644 scripts/gdb/linux/modules.py
Type lookups are very slow in gdb-python which is often noticeable when
iterating over a number of objects. Introduce the helper class
CachedType that keeps a reference to a gdb.Type object but also
refreshes it after an object file has been loaded.
Signed-off-by: Jan Kiszka jan.kis
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 jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 17 +
1 file changed, 17 insertions(+)
diff --git
(re-)loading a module.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/symbols.py | 39 +++
1 file changed, 39 insertions(+)
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index bd21a96..139841f 100644
/symbols.py
new file mode 100644
index 000..bd21a96
--- /dev/null
+++ b/scripts/gdb/linux/symbols.py
@@ -0,0 +1,127 @@
+#
+# gdb helper commands and functions for Linux kernel debugging
+#
+# load kernel and module symbols
+#
+# Copyright (c) Siemens AG, 2011-2013
+#
+# Authors:
+# Jan Kiszka
Will soon be used for loading symbols, printing global variables or
listing modules.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 39 +++
1 file changed, 39 insertions(+)
create mode 100644 scripts/gdb/linux/modules.py
This adds a lsmod-like command to list all currently loaded modules of
the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 46 +++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/scripts/gdb/linux
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 35
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 jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 27 +++
scripts/gdb/vmlinux-gdb.py | 1 +
2 files changed, 28 insertions(+)
diff
Add the internal helper get_module_by_name to obtain the module
structure corresponding to the given name. Also export this service as a
convenience function.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/modules.py | 28
scripts/gdb/vmlinux
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 jan.kis
Will be used first to count module references. It is optimized to read
the mask only once per stop.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/cpus.py | 54 +++
1 file changed, 54 insertions(+)
diff --git a/scripts/gdb
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 18
This class allows to iterate over all tasks of the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/tasks.py | 46 ++
1 file changed, 46 insertions(+)
create mode 100644 scripts/gdb/linux/tasks.py
diff --git a/scripts
This provides a reliable breakpoint target, required for automatic
symbol loading via the gdb helper command 'lx-symbols'.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
kernel/module.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/module.c b/kernel
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 jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 21 +
1 file changed, 21 insertions
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/linux/utils.py | 13 +
1 file changed, 13 insertions(+)
diff --git a/scripts/gdb/linux/utils.py b
On 2013-02-14 16:40, Tom Tromey wrote:
Jan == Jan Kiszka jan.kis...@siemens.com writes:
Jan In addition, the command installs a silent breakpoint in the load_module
Jan function at the point where the module was loaded but not yet
Jan initialized. The breakpoint handler will try to load
-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/module.py | 48
scripts/gdb/utils.py |7 +++
2 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/module.py b/scripts/gdb/module.py
index e309c0a..333729a 100644
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 17
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 jan.kis
files found during lx-symbols execution. This way, breakpoints
can be set to module initialization functions, and there is usually no
need to explicitly call lx-symbols after (re-)loading a module.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/symbols.py | 147
Type lookups are very slow in gdb-python which is often noticeable when
iterating over a number of objects. Introduce the helper class
CachedType that keeps a reference to a gdb.Type object but also
refreshes it after an object file has been loaded.
Signed-off-by: Jan Kiszka jan.kis
The internal helper for_each_task iterates over all tasks of the target,
calling the provided function on each.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/task.py | 35 +++
1 files changed, 35 insertions(+), 0 deletions(-)
create mode
Add the internal helper get_module_by_name to obtain the module
structure corresponding to the given name. Also export this service as a
convenience function.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/module.py | 30 ++
scripts/gdb
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 18 ++
1 files changed, 18 insertions(+), 0
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 jan.kis...@siemens.com
---
scripts/gdb/task.py| 29 +
scripts/gdb/vmlinux-gdb.py |1 +
2 files changed, 30 insertions(+), 0
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/utils.py |9 +
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/utils.py b
This adds a lsmod-like command to list all currently loaded modules of
the target.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/module.py | 43 +++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/module.py
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 jan.kis...@siemens.com
---
scripts/gdb/percpu.py | 16
1 files changed, 16 insertions(+), 0 deletions
Will soon be used for loading symbols, printing global variables or
listing modules.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/module.py | 28
1 files changed, 28 insertions(+), 0 deletions(-)
create mode 100644 scripts/gdb/module.py
diff
Will be used first to count module references. It is optimized to read
the mask only once per stop and to minimize the loop lengths.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/percpu.py | 33 +
1 files changed, 33 insertions(+), 0 deletions
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 35 +++
1
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 k...@vrfy.org
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/dmesg.py | 63
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 17
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 jan.kis
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 jan.kis...@siemens.com
---
scripts/gdb/percpu.py | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 18 ++
1 files changed, 18 insertions(+), 0
files found during lx-symbols execution. This way, breakpoints
can be set to module initialization functions, and there is usually no
need to explicitly call lx-symbols after (re-)loading a module.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/symbols.py | 153
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 jan.kis...@siemens.com
---
scripts/gdb/task.py| 29 +
scripts/gdb/vmlinux-gdb.py |1 +
2 files changed, 30 insertions(+), 0
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 k...@vrfy.org
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/dmesg.py | 63
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/utils.py |9 +
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/utils.py b
to
pre-process the version string returned by gdb as some distros tend to
prefix it with their name.
This feature depends on CONFIG_DEBUG_INFO.
CC: Michal Marek mma...@suse.cz
CC: linux-kbu...@vger.kernel.org
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
Makefile |5
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 jan.kis...@siemens.com
---
scripts/gdb/percpu.py | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 18 ++
1 files changed, 18 insertions(+), 0
This helper caches to result of show architecture and matches the
provided arch (sub-)string against that output.
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/utils.py |9 +
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/utils.py b
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 17
-by: Jan Kiszka jan.kis...@siemens.com
---
scripts/gdb/task.py | 39 +++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/scripts/gdb/task.py b/scripts/gdb/task.py
index 41d85cc..523e495 100644
--- a/scripts/gdb/task.py
+++ b/scripts/gdb/task.py
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 jan.kis...@siemens.com
---
scripts/gdb/utils.py | 18 ++
1 files changed, 18 insertions(+), 0
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 jan.kis...@siemens.com
---
scripts/gdb/percpu.py | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff
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 jan.kis...@siemens.com
---
scripts/gdb/task.py | 40
.
This feature depends on CONFIG_DEBUG_INFO.
CC: Michal Marek mma...@suse.cz
CC: linux-kbu...@vger.kernel.org
Signed-off-by: Jan Kiszka jan.kis...@siemens.com
---
Makefile |5 -
scripts/Makefile |3 ++-
scripts/gdb/Makefile |9 +
scripts/gdb/vmlinux
1 - 100 of 138 matches
Mail list logo