diff options
author | ThiƩbaud Weksteen <thiebaud@weksteen.fr> | 2015-06-19 09:02:11 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-06-19 09:02:11 +1000 |
commit | 3d234dc5b7f896ba50aae8622800d24398e27a5f (patch) | |
tree | 437aede6e7a89e813d7959f2865354ae08164e5e /scripts | |
parent | e56d69d1022f1760e4f32c96e1a4a0f0cfc22a32 (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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gdb/linux/tasks.py | 16 |
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.""" 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 |