* [PATCH] scripts/gdb: Add ps command
@ 2015-05-14 5:25 Thiébaud Weksteen
2015-05-15 11:45 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Thiébaud Weksteen @ 2015-05-14 5:25 UTC (permalink / raw)
To: linux-kernel; +Cc: Thiébaud Weksteen, jan.kiszka
Signed-off-by: Thiébaud Weksteen <thiebaud@weksteen.fr>
---
scripts/gdb/linux/tasks.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
index 0fa33b0..862a4ae 100644
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -66,6 +66,22 @@ return that task_struct variable which PID matches."""
LxTaskByPidFunc()
+class LxPs(gdb.Command):
+ """Dump Linux tasks."""
+
+ def __init__(self):
+ super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA)
+
+ def invoke(self, arg, from_tty):
+ for task in task_lists():
+ gdb.write("{address} {pid} {comm}\n".format(
+ address=task,
+ pid=task["pid"],
+ comm=task["comm"].string()))
+
+LxPs()
+
+
thread_info_type = utils.CachedType("struct thread_info")
ia64_task_size = None
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts/gdb: Add ps command
2015-05-14 5:25 [PATCH] scripts/gdb: Add ps command Thiébaud Weksteen
@ 2015-05-15 11:45 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2015-05-15 11:45 UTC (permalink / raw)
To: Thiébaud Weksteen, linux-kernel
On 2015-05-14 07:25, Thiébaud Weksteen wrote:
> Signed-off-by: Thiébaud Weksteen <thiebaud@weksteen.fr>
> ---
> scripts/gdb/linux/tasks.py | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
> index 0fa33b0..862a4ae 100644
> --- a/scripts/gdb/linux/tasks.py
> +++ b/scripts/gdb/linux/tasks.py
> @@ -66,6 +66,22 @@ return that task_struct variable which PID matches."""
> LxTaskByPidFunc()
>
>
> +class LxPs(gdb.Command):
> + """Dump Linux tasks."""
> +
> + def __init__(self):
> + super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA)
> +
> + def invoke(self, arg, from_tty):
> + for task in task_lists():
> + gdb.write("{address} {pid} {comm}\n".format(
> + address=task,
> + pid=task["pid"],
> + comm=task["comm"].string()))
> +
> +LxPs()
> +
> +
> thread_info_type = utils.CachedType("struct thread_info")
>
> ia64_task_size = None
>
Nice! Applied.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-15 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 5:25 [PATCH] scripts/gdb: Add ps command Thiébaud Weksteen
2015-05-15 11:45 ` Jan Kiszka
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.