summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/lists.py
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-03-25 11:46:10 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-03-25 11:46:10 -0700
commit5acac83bf2e42f51ab9fd315d657798754bf0bb8 (patch)
tree564be60664226649f00798cc3afb72d72d0ed24d /scripts/gdb/linux/lists.py
parent84c36ab7a6ddeab213c979d22b6372f71d738862 (diff)
parent0d02ec6b3136c73c09e7859f0d0e4e2c4c07b49b (diff)
Merge tag 'v5.12-rc4' into next
Sync up with the mainline to bring in newest APIs.
Diffstat (limited to 'scripts/gdb/linux/lists.py')
-rw-r--r--scripts/gdb/linux/lists.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/gdb/linux/lists.py b/scripts/gdb/linux/lists.py
index c487ddf09d38..bae4d70b7eae 100644
--- a/scripts/gdb/linux/lists.py
+++ b/scripts/gdb/linux/lists.py
@@ -27,6 +27,11 @@ def list_for_each(head):
raise TypeError("Must be struct list_head not {}"
.format(head.type))
+ if head['next'] == 0:
+ gdb.write("list_for_each: Uninitialized list '{}' treated as empty\n"
+ .format(head.address))
+ return
+
node = head['next'].dereference()
while node.address != head.address:
yield node.address