Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934249AbbDWMUI (ORCPT ); Thu, 23 Apr 2015 08:20:08 -0400 Received: from thoth.sbs.de ([192.35.17.2]:53196 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933916AbbDWMUG (ORCPT ); Thu, 23 Apr 2015 08:20:06 -0400 Message-ID: <5538E373.5070009@siemens.com> Date: Thu, 23 Apr 2015 14:20:03 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: =?UTF-8?B?VGhpw6liYXVkIFdla3N0ZWVu?= , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scripts/gdb: Add command to check list consistency References: <55374E8B.1040408@weksteen.fr> <5538E142.2090507@siemens.com> In-Reply-To: <5538E142.2090507@siemens.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 901 Lines: 29 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/