From b0fecd8c570310c5041035a94eda7a4610402ace Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 17 Feb 2015 13:46:41 -0800 Subject: 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 Cc: Thomas Gleixner Cc: Jason Wessel Cc: Andi Kleen Cc: Ben Widawsky Cc: Borislav Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/gdb/vmlinux-gdb.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/gdb/vmlinux-gdb.py') 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 -- cgit v1.2.3