diff options
Diffstat (limited to 'scripts/gdb')
| -rw-r--r-- | scripts/gdb/linux/lists.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/gdb/linux/lists.py b/scripts/gdb/linux/lists.py index 2a94b5462d06..71fba6afcb55 100644 --- a/scripts/gdb/linux/lists.py +++ b/scripts/gdb/linux/lists.py | |||
| @@ -20,9 +20,11 @@ list_head = utils.CachedType("struct list_head") | |||
| 20 | 20 | ||
| 21 | def list_check(head): | 21 | def list_check(head): |
| 22 | nb = 0 | 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 | c = head | 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 | try: | 28 | try: |
| 27 | gdb.write("Starting with: {}\n".format(c)) | 29 | gdb.write("Starting with: {}\n".format(c)) |
| 28 | except gdb.MemoryError: | 30 | except gdb.MemoryError: |
