提交 433296b3 编写于 作者: J Jan Kiszka 提交者: Linus Torvalds

scripts/gdb: also allow list_head pointer as lx-list-check paramter

This makes the usage more flexible.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Cc: Thiébaud Weksteen <thiebaud@weksteen.fr>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 084f6b1e
无相关合并请求
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部