summaryrefslogtreecommitdiffstats
path: root/scripts/gdb
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2015-06-30 14:58:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-30 19:44:58 -0700
commit433296b32b39bd2f8a8717ccb2385b4c8654017d (patch)
tree21dfdb7b2953052ad5198dd3c5f3571f423bf9b7 /scripts/gdb
parent084f6b1ec65170c2f8e38688bc83ff15b9a963e0 (diff)
downloadop-kernel-dev-433296b32b39bd2f8a8717ccb2385b4c8654017d.zip
op-kernel-dev-433296b32b39bd2f8a8717ccb2385b4c8654017d.tar.gz
scripts/gdb: also allow list_head pointer as lx-list-check paramter
This makes the usage more flexible. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: ThiƩbaud Weksteen <thiebaud@weksteen.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gdb')
-rw-r--r--scripts/gdb/linux/lists.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/gdb/linux/lists.py b/scripts/gdb/linux/lists.py
index 2a94b54..71fba6a 100644
--- a/scripts/gdb/linux/lists.py
+++ b/scripts/gdb/linux/lists.py
@@ -20,9 +20,11 @@ list_head = utils.CachedType("struct list_head")
def list_check(head):
nb = 0
+ if (head.type == list_head.get_type().pointer()):
+ head = head.dereference()
+ elif (head.type != list_head.get_type()):
+ raise gdb.GdbError('argument must be of type (struct list_head [*])')
c = head
- if (c.type != list_head.get_type()):
- raise gdb.GdbError('The argument should be of type (struct list_head)')
try:
gdb.write("Starting with: {}\n".format(c))
except gdb.MemoryError:
OpenPOWER on IntegriCloud