aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/vmlinux-gdb.py
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2015-02-17 13:46:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-17 14:34:53 -0800
commitb0fecd8c570310c5041035a94eda7a4610402ace (patch)
tree12b69ee5e9d3aa56d72491a212aff3aa47dd7aa6 /scripts/gdb/vmlinux-gdb.py
parentscripts/gdb: add cache for type objects (diff)
downloadlinux-dev-b0fecd8c570310c5041035a94eda7a4610402ace.tar.xz
linux-dev-b0fecd8c570310c5041035a94eda7a4610402ace.zip
scripts/gdb: add container_of helper and convenience function
Provide an internal helper with container_of semantics. As type lookups are very slow in gdb-python and we need a type "long" for this, cache the reference to this type object. Then export the helper also as a convenience function form use at the gdb command line. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Borislav Petkov <bp@suse.de> 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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/gdb/vmlinux-gdb.py b/scripts/gdb/vmlinux-gdb.py
index c1d90cea5288..649584105a72 100644
--- a/scripts/gdb/vmlinux-gdb.py
+++ b/scripts/gdb/vmlinux-gdb.py
@@ -21,3 +21,5 @@ try:
except:
gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to "
"work.\n")
+else:
+ import linux.utils