aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <thiebaud@weksteen.fr>2015-06-30 17:58:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-30 22:44:58 -0400
commita930850b628497601309513dc894ea23218a19fa (patch)
tree8cebf8fbab2ef0e56e49b20cbd22cb156de3220b /scripts/gdb/linux
parent6ad18b73317714e7d0fad08ee78365ecc817e923 (diff)
scripts/gdb: add ps command
Signed-off-by: ThiƩbaud Weksteen <thiebaud@weksteen.fr> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/linux')
-rw-r--r--scripts/gdb/linux/tasks.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
index 89d38e1580e3..3191f4792398 100644
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -67,6 +67,22 @@ return that task_struct variable which PID matches."""
67LxTaskByPidFunc() 67LxTaskByPidFunc()
68 68
69 69
70class LxPs(gdb.Command):
71 """Dump Linux tasks."""
72
73 def __init__(self):
74 super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA)
75
76 def invoke(self, arg, from_tty):
77 for task in task_lists():
78 gdb.write("{address} {pid} {comm}\n".format(
79 address=task,
80 pid=task["pid"],
81 comm=task["comm"].string()))
82
83LxPs()
84
85
70thread_info_type = utils.CachedType("struct thread_info") 86thread_info_type = utils.CachedType("struct thread_info")
71 87
72ia64_task_size = None 88ia64_task_size = None