aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2023-12-23 15:52:13 +0100
committerIngo Molnar <mingo@kernel.org>2023-12-23 15:52:13 +0100
commitd2e9f53ac5dd76dadc0b5f04f6c27640604ce2af (patch)
treebf82d9fbfdc2ce67630fdacc18c2231f3d17876a /scripts/gdb/linux/tasks.py
parent418146e39891ef1fb2284dee4cabbfe616cd21cf (diff)
parentceb6a6f023fd3e8b07761ed900352ef574010bcb (diff)
downloadlinux-d2e9f53ac5dd76dadc0b5f04f6c27640604ce2af.tar.gz
linux-d2e9f53ac5dd76dadc0b5f04f6c27640604ce2af.tar.bz2
linux-d2e9f53ac5dd76dadc0b5f04f6c27640604ce2af.zip
Merge tag 'v6.7-rc6' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r--scripts/gdb/linux/tasks.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
index 17ec19e9b5bf..aa5ab6251f76 100644
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -13,7 +13,7 @@
import gdb
-from linux import utils
+from linux import utils, lists
task_type = utils.CachedType("struct task_struct")
@@ -22,19 +22,15 @@ task_type = utils.CachedType("struct task_struct")
def task_lists():
task_ptr_type = task_type.get_type().pointer()
init_task = gdb.parse_and_eval("init_task").address
- t = g = init_task
+ t = init_task
while True:
- while True:
- yield t
+ thread_head = t['signal']['thread_head']
+ for thread in lists.list_for_each_entry(thread_head, task_ptr_type, 'thread_node'):
+ yield thread
- t = utils.container_of(t['thread_group']['next'],
- task_ptr_type, "thread_group")
- if t == g:
- break
-
- t = g = utils.container_of(g['tasks']['next'],
- task_ptr_type, "tasks")
+ t = utils.container_of(t['tasks']['next'],
+ task_ptr_type, "tasks")
if t == init_task:
return