projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ad18b7
)
scripts/gdb: add ps command
author
Thiébaud Weksteen
<
[email protected]
>
Tue, 30 Jun 2015 21:58:21 +0000
(14:58 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 1 Jul 2015 02:44:58 +0000
(19:44 -0700)
Signed-off-by: Thiébaud Weksteen <
[email protected]
>
Signed-off-by: Jan Kiszka <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
scripts/gdb/linux/tasks.py
patch
|
blob
|
history
diff --git
a/scripts/gdb/linux/tasks.py
b/scripts/gdb/linux/tasks.py
index 89d38e1580e34224ba7b100f2a85544d5c3bcb65..3191f4792398b1a2ca5df6c20c79b00ce921ef27 100644
(file)
--- a/
scripts/gdb/linux/tasks.py
+++ b/
scripts/gdb/linux/tasks.py
@@
-67,6
+67,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