diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-27 17:41:04 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-27 17:41:04 +0300 |
commit | 4ccdaba5ab560862f89d1d971fbcc2ef424e1867 (patch) | |
tree | a7931e13df9cc887017eaa143b4dac66de959d90 /scripts/gdb/linux/tasks.py | |
parent | 1cdc605c7d70a390ff75a814a26c6f45d75778be (diff) | |
parent | 861deac3b092f37b2c5e6871732f3e11486f7082 (diff) | |
download | linux-4ccdaba5ab560862f89d1d971fbcc2ef424e1867.tar.xz |
Merge tag 'v6.7-rc7' into gpio/for-next
Linux 6.7-rc7
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r-- | scripts/gdb/linux/tasks.py | 18 |
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 |