aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r--scripts/gdb/linux/tasks.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
index e2037d9bb7eb..89d38e1580e3 100644
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -18,6 +18,7 @@ from linux import utils
18 18
19task_type = utils.CachedType("struct task_struct") 19task_type = utils.CachedType("struct task_struct")
20 20
21
21def task_lists(): 22def task_lists():
22 global task_type 23 global task_type
23 task_ptr_type = task_type.get_type().pointer() 24 task_ptr_type = task_type.get_type().pointer()
@@ -38,6 +39,7 @@ def task_lists():
38 if t == init_task: 39 if t == init_task:
39 return 40 return
40 41
42
41def get_task_by_pid(pid): 43def get_task_by_pid(pid):
42 for task in task_lists(): 44 for task in task_lists():
43 if int(task['pid']) == pid: 45 if int(task['pid']) == pid: