FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-16-2012, 11:49 AM
Petr Tesarik
 
Default What should "list -h" be doing?

Hi,

I think the behaviour of the (undocumented) "list -h" command is hardly
useful. I believe the intention was to cover cases like struct anon_vma, which
is linked through a list_head (not at the beginning of the structure) and does
not have an external struct list_head. However, it doesn't work for that case:

crash> struct -o anon_vma
struct anon_vma {
[0x0] struct anon_vma *root;
[0x4] spinlock_t lock;
[0x8] atomic_t external_refcount;
[0xc] struct list_head head;
}

Now, let's have an anon_vma at 0xf0749d38
crash> anon_vma 0xf0749d38
struct anon_vma {
root = 0xf0749d38,
/* left out for brevity */
head = {
next = 0xf6c34708,
prev = 0xf6c34d80
}
}

I would assume that I can walk all linked anon_vma's with

list -o anon_vma.head -h 0xf0749d38

But that still expects a pointer to struct list_head. I would have to do

list -o anon_vma.head -h 0xf0749d38+0xc

That's awkward. But maybe it's how it should work, because it's not clear what
the "-h" should be doing.

Anyway, I think the "list" command could help with walking the anon_vma list.
I can surely add another option letter for that purpose, but before doing
that, I'd like to ask if this is merely missing documentation and a bug in the
implemenatation of the existing "-h" option.

Thanks for your patience,
Petr Tesarik

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Mon Apr 16 15:30:02 2012
Return-path: <devel-bounces@lists.fedoraproject.org>
Envelope-to: tom@linux-archive.org
Delivery-date: Mon, 16 Apr 2012 14:54:26 +0300
Received: from bastion01.fedoraproject.org ([209.132.181.2]:59552 helo=bastion.fedoraproject.org)
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <devel-bounces@lists.fedoraproject.org>)
id 1SJkVk-0002El-Vt
for tom@linux-archive.org; Mon, 16 Apr 2012 14:54:25 +0300
Received: from lists.fedoraproject.org (collab03.vpn.fedoraproject.org [192.168.1.70])
by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 75534212E5;
Mon, 16 Apr 2012 11:54:27 +0000 (UTC)
Received: from collab03.fedoraproject.org (localhost [127.0.0.1])
by lists.fedoraproject.org (Postfix) with ESMTP id AD78C40A72;
Mon, 16 Apr 2012 11:54:25 +0000 (UTC)
X-Original-To: devel@lists.fedoraproject.org
Delivered-To: devel@lists.fedoraproject.org
Received: from smtp-mm02.fedoraproject.org (smtp-mm02.fedoraproject.org
[66.35.62.164])
by lists.fedoraproject.org (Postfix) with ESMTP id 860DF401C2
for <devel@lists.fedoraproject.org>;
Mon, 16 Apr 2012 11:54:23 +0000 (UTC)
Received: from mail-bk0-f45.google.com (mail-bk0-f45.google.com
[209.85.214.45])
by smtp-mm02.fedoraproject.org (Postfix) with ESMTP id 776FD41A11
for <devel@lists.fedoraproject.org>;
Mon, 16 Apr 2012 11:54:24 +0000 (UTC)
Received: by bkcjg9 with SMTP id jg9so4530817bkc.32
for <devel@lists.fedoraproject.org>;
Mon, 16 Apr 2012 04:54:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=message-id:date:from:user-agent:mime-version:to:subject:references
:in-reply-to:content-type:content-transfer-encoding;
bh=kIngV1tXV5DnwiBiioeLl1jtMUI6f7zcC8ygN31Ovu0=;
b=O2yn019ydSkUdmr5Brq6/qzuBd4/d2AHFiO5kfFdh99rIaExu2weM3kcDTf8kXFsvi
OrBqOakrBJBk2ZuORZk8UYG0I5h2juZ52QeinWgkMGOPySPFTd IRSNgT1nsqtOoOT3LM
FRtfeVIhiqtpt1iytWnU+KcHosXqvRct+ZbIj1xi+Qj1xa+78m RB0OuozH0ExWXsk0V1
wsZZNAgUgOwPKrpLZ1gjgF4OXATL0FdWS9JYwiuSWZIZjQ+s70 Lgawejkz8xhw6B/eSg
z9N4Nm8gkzkI5jHD8jsUe0bj5igaUSzm2GWqK5aRVVBgnvxjiT tvnhFC6bUqZHqM9Q+z
YCCg==
Received: by 10.204.154.194 with SMTP id p2mr3355827bkw.80.1334577263618;
Mon, 16 Apr 2012 04:54:23 -0700 (PDT)
Received: from localhost.localdomain (rtr1.mobilitus.sip.is. [178.19.50.26])
by mx.google.com with ESMTPS id
zx16sm31008748bkb.13.2012.04.16.04.54.22
(version=SSLv3 cipher=OTHER); Mon, 16 Apr 2012 04:54:22 -0700 (PDT)
Message-ID: <4F8C0800.2080701@gmail.com>
Date: Mon, 16 Apr 2012 11:52:32 +0000
From: =?UTF-8?B?IkrDs2hhbm4gQi4gR3XDsG11bmRzc29uIg==?=
<johannbg@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:11.0) Gecko/20120329 Thunderbird/11.0.1
MIME-Version: 1.0
To: devel@lists.fedoraproject.org
Subject: Re: Where document service which is disabled after F16->F17 upgrade
via yum
References: <20120416104439.GA2799@redhat.com>
In-Reply-To: <20120416104439.GA2799@redhat.com>
X-BeenThere: devel@lists.fedoraproject.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: Development discussions related to Fedora
<devel@lists.fedoraproject.org>
List-Id: Development discussions related to Fedora
<devel.lists.fedoraproject.org>
List-Unsubscribe: <https://admin.fedoraproject.org/mailman/options/devel>,
<mailto:devel-request@lists.fedoraproject.org?subject=unsubscrib e>
List-Archive: <http://lists.fedoraproject.org/pipermail/devel/>
List-Post: <mailto:devel@lists.fedoraproject.org>
List-Help: <mailto:devel-request@lists.fedoraproject.org?subject=help>
List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/devel>,
<mailto:devel-request@lists.fedoraproject.org?subject=subscribe>
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Sender: devel-bounces@lists.fedoraproject.org
Errors-To: devel-bounces@lists.fedoraproject.org

T24gMDQvMTYvMjAxMiAxMDo0NCBBTSwgQWRhbSBUa2FjIHdyb3 RlOgo+IEhlbGxvIGFsbCwKPgo+
IG5hbWVkIHNlcnZpY2UgaXMgZGlzYWJsZWQgYWZ0ZXIgRjE2LT 5GMTcgdXBkYXRlIHZpYSB5dW0g
ZHVlIHRvCj4gaW5pdHNjcmlwdHMtPnN5c3RlbWQgY29udmVyc2 lvbi4gSXQgd2Fzbid0IHBvc3Np
YmxlIHRvIGtlZXAgaXQgZW5hYmxlZCB3aGVuIHdhcwo+IGR1ZS B0byB0b28gbWFueSBkaWZmZXJl
bmNlcyBiZXR3ZWVuIGluaXRzY3JpcHRzIGFuZCBzeXN0ZW1kIH VuaXQgZmlsZXMuCj4KPiBBcyB3
cml0dGVuIGluIGh0dHBzOi8vYnVnemlsbGEucmVkaGF0LmNvbS 9zaG93X2J1Zy5jZ2k/aWQ9ODA4
ODg5LCB0aGlzCj4gYmFja3dhcmQgaW5jb21wYXRpYmlsaXR5IH Nob3VsZCBiZSBkb2N1bWVudGVk
IHNvbWV3aGVyZSBidXQgSSdtIG5vdCBzdXJlIHdoZXJlLgo+IE NhbiB5b3UgcGxlYXNlIHBvaW50
IG1lIHdoZXJlIHNob3VsZCBJIGRvY3VtZW50IGl0PyBUaGFuay B5b3UgaW4gYWR2YW5jZS4KCkht
bSB3YXMgdGhpcyBub3QgZ2VuZXJhbGx5IGRvY3VtZW50ZWQgaW 4gdGhlIHJlbGVhc2Ugbm90ZXMg
Zm9yIEYxNS9GMTYgCnNpbmNlIHRoaXMgYWZmZWN0cyAqYWxsKi BzZXJ2aWNlIHRoYXQgZ2V0IG1p
Z3JhdGVkIGJldHdlZW4gcmVsZWFzZXMuCgpKQkcKLS0gCmRldm VsIG1haWxpbmcgbGlzdApkZXZl
bEBsaXN0cy5mZWRvcmFwcm9qZWN0Lm9yZwpodHRwczovL2FkbW luLmZlZG9yYXByb2plY3Qub3Jn
L21haWxtYW4vbGlzdGluZm8vZGV2ZWw=
 
Old 04-16-2012, 03:40 PM
Dave Anderson
 
Default What should "list -h" be doing?

----- Original Message -----
> Hi,
>
> I think the behaviour of the (undocumented) "list -h" command is hardly
> useful. I believe the intention was to cover cases like struct anon_vma, which
> is linked through a list_head (not at the beginning of the structure) and does
> not have an external struct list_head. However, it doesn't work for that case:
>
> crash> struct -o anon_vma
> struct anon_vma {
> [0x0] struct anon_vma *root;
> [0x4] spinlock_t lock;
> [0x8] atomic_t external_refcount;
> [0xc] struct list_head head;
> }
>
> Now, let's have an anon_vma at 0xf0749d38
> crash> anon_vma 0xf0749d38
> struct anon_vma {
> root = 0xf0749d38,
> /* left out for brevity */
> head = {
> next = 0xf6c34708,
> prev = 0xf6c34d80
> }
> }
>
> I would assume that I can walk all linked anon_vma's with
>
> list -o anon_vma.head -h 0xf0749d38
>
> But that still expects a pointer to struct list_head. I would have to do
>
> list -o anon_vma.head -h 0xf0749d38+0xc
>
> That's awkward. But maybe it's how it should work, because it's not clear what
> the "-h" should be doing.
>
> Anyway, I think the "list" command could help with walking the anon_vma list.
> I can surely add another option letter for that purpose, but before doing
> that, I'd like to ask if this is merely missing documentation and a bug in the
> implemenatation of the existing "-h" option.
>
> Thanks for your patience,
> Petr Tesarik

To be honest with you, I don't recall what I had in mind, nor what I was
working on when I added it, but given that it was never advertised, it
wasn't meant for prime time.

So by all means, you can try to coerce -h into working as you expected.

Thanks,
Dave




--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 01:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org