mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 07:30:16 +00:00
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>
This commit is contained in:
parent
6ad18b7331
commit
a930850b62
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user