diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-06-03 09:05:51 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-06-03 09:05:51 -0400 |
commit | 2eec3707a33fbf1c2e0a88ffc9fc0e465c2a59fd (patch) | |
tree | 9e47763ecd38f0ddd29f07e1ce199680304449fa /scripts/gdb/linux/lists.py | |
parent | 59fa5860204ffc95128d60cba9f54f9740a42c7d (diff) | |
parent | 0de6b9979e2e10c79e5702d2d902cd7284d17689 (diff) |
Merge tag 'irqchip-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Merge irqchip updates from Marc Zyngier:
- A number of embarassing buglets (GICv3, PIC32)
- A more substential errata workaround for Cavium's GICv3 ITS
(kept for post-rc1 due to its dependency on NUMA)
Diffstat (limited to 'scripts/gdb/linux/lists.py')
-rw-r--r-- | scripts/gdb/linux/lists.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/gdb/linux/lists.py b/scripts/gdb/linux/lists.py index 3a3775bc162b..2f335fbd86fd 100644 --- a/scripts/gdb/linux/lists.py +++ b/scripts/gdb/linux/lists.py | |||
@@ -18,6 +18,27 @@ from linux import utils | |||
18 | list_head = utils.CachedType("struct list_head") | 18 | list_head = utils.CachedType("struct list_head") |
19 | 19 | ||
20 | 20 | ||
21 | def list_for_each(head): | ||
22 | if head.type == list_head.get_type().pointer(): | ||
23 | head = head.dereference() | ||
24 | elif head.type != list_head.get_type(): | ||
25 | raise gdb.GdbError("Must be struct list_head not {}" | ||
26 | .format(head.type)) | ||
27 | |||
28 | node = head['next'].dereference() | ||
29 | while node.address != head.address: | ||
30 | yield node.address | ||
31 | node = node['next'].dereference() | ||
32 | |||
33 | |||
34 | def list_for_each_entry(head, gdbtype, member): | ||
35 | for node in list_for_each(head): | ||
36 | if node.type != list_head.get_type().pointer(): | ||
37 | raise TypeError("Type {} found. Expected struct list_head *." | ||
38 | .format(node.type)) | ||
39 | yield utils.container_of(node, gdbtype, member) | ||
40 | |||
41 | |||
21 | def list_check(head): | 42 | def list_check(head): |
22 | nb = 0 | 43 | nb = 0 |
23 | if (head.type == list_head.get_type().pointer()): | 44 | if (head.type == list_head.get_type().pointer()): |