summaryrefslogtreecommitdiff
path: root/scripts/gdb/vmlinux-gdb.py
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@linaro.org>2016-05-23 16:25:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-23 17:04:14 -0700
commite127a73d41ac471d7e3ba950cf128f42d6ee3448 (patch)
tree2924b84523d67d46d9d533ac88e011a82054b5e3 /scripts/gdb/vmlinux-gdb.py
parent4bc393dbcf1915224e8947211a0ca906f9de7c56 (diff)
downloadlwn-e127a73d41ac471d7e3ba950cf128f42d6ee3448.tar.gz
lwn-e127a73d41ac471d7e3ba950cf128f42d6ee3448.zip
scripts/gdb: add a Radix Tree Parser
Linux makes use of the Radix Tree data structure to store pointers indexed by integer values. This structure is utilised across many structures in the kernel including the IRQ descriptor tables, and several filesystems. This module provides a method to lookup values from a structure given its head node. Usage: The function lx_radix_tree_lookup, must be given a symbol of type struct radix_tree_root, and an index into that tree. The object returned is a generic integer value, and must be cast correctly to the type based on the storage in the data structure. For example, to print the irq descriptor in the sparse irq_desc_tree at index 18, try the following: (gdb) print (struct irq_desc)$lx_radix_tree_lookup(irq_desc_tree, 18) Link: http://lkml.kernel.org/r/d2028c55e50cf95a9b7f8ca0d11885174b0cc709.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/vmlinux-gdb.py')
-rw-r--r--scripts/gdb/vmlinux-gdb.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/gdb/vmlinux-gdb.py b/scripts/gdb/vmlinux-gdb.py
index 6e0b0afd888a..3a80ad6eecad 100644
--- a/scripts/gdb/vmlinux-gdb.py
+++ b/scripts/gdb/vmlinux-gdb.py
@@ -31,3 +31,4 @@ else:
import linux.lists
import linux.proc
import linux.constants
+ import linux.radixtree