Skip to content

Commit

Permalink
scripts/gdb: add ps command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tweksteen authored and torvalds committed Jul 1, 2015
1 parent 6ad18b7 commit a930850
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/gdb/linux/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,22 @@ def invoke(self, pid):
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
Expand Down

0 comments on commit a930850

Please sign in to comment.