Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jan Kiszka and committed by
Linus Torvalds
433296b3 084f6b1e

+4 -2
+4 -2
scripts/gdb/linux/lists.py
··· 20 20 21 21 def list_check(head): 22 22 nb = 0 23 + if (head.type == list_head.get_type().pointer()): 24 + head = head.dereference() 25 + elif (head.type != list_head.get_type()): 26 + raise gdb.GdbError('argument must be of type (struct list_head [*])') 23 27 c = head 24 - if (c.type != list_head.get_type()): 25 - raise gdb.GdbError('The argument should be of type (struct list_head)') 26 28 try: 27 29 gdb.write("Starting with: {}\n".format(c)) 28 30 except gdb.MemoryError: