[PATCH 2/3] scripts/gdb: timerlist: fix rb_node access
From: Amjad Ouled-Ameur
Date: Wed Jul 27 2022 - 10:15:00 EST
"strcut timerqueue_head" no longer has "next" member since v5.4-rc1:
commit 511885d7061e ("lib/timerqueue: Rely on rbtree semantics for next
timer")
Therefore, access "rb_node" through active->rb_root->rb_root->rb_node.
Moreoever, remove curr.address.cast() on rb_node as this breaks the code
and is not necessary.
Signed-off-by: Amjad Ouled-Ameur <aouledameur@xxxxxxxxxxxx>
---
scripts/gdb/linux/timerlist.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index fac951236dc4..d16909f8df35 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -43,8 +43,7 @@ def print_timer(rb_node, idx):
def print_active_timers(base):
- curr = base['active']['next']['node']
- curr = curr.address.cast(rbtree.rb_node_type.get_type().pointer())
+ curr = base['active']['rb_root']['rb_root']['rb_node']
idx = 0
while curr:
yield print_timer(curr, idx)
--
2.37.1