Re: [PATCH] scripts/gdb: Add command to check list consistency

From: Jan Kiszka
Date: Thu Apr 23 2015 - 08:20:13 EST


On 2015-04-23 14:10, Jan Kiszka wrote:
> On 2015-04-22 09:32, ThiÃbaud Weksteen wrote:
>> + nb = 0
>> + list_head_ptr_type = list_head.get_type().pointer()
>> + c = head.cast(list_head_ptr_type)
>
> Why casting? Is it a common use case to not have the list head as a
> variable at hand? The user could still do
>
> lx_list_check (struct list_head *)0x...
>
> when needed.

Specifically, this fails in a non-obvious way right now:

(gdb) lx-check-list workqueues

If you look at lx_thread_info, e.g., it accepts both objects and pointers.

Jan

--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/