RE: How do I traverse double/single linked-list and pri nt few desired fields of the structure that

They come back with put “##000” in the subject. Who knows and I’m caring
less now.


From: Doron Holan [mailto:xxxxx@microsoft.com]
Sent: Thursday, June 28, 2007 3:35 PM
To: Kernel Debugging Interest List
Subject: RE: [windbg] How do I traverse double/single linked-list and print
few desired fields of the structure that is part of linked list using
windbg?

That should work, what happened when you tried it?

d

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Praveen Kumar
Amritaluru
Sent: Thursday, June 28, 2007 11:09 AM
To: Kernel Debugging Interest List
Subject: Re:[windbg] How do I traverse double/single linked-list and print
few desired fields of the structure that is part of linked list using
windbg?

Hi,

I took a look at your article. I find it very useful. Now I am changing my
code to use LIST_ENTRY.

typedef struct _MY_DATA {
LIST_ENTRY ListEntry;
ULONG Data;
ULONG Data2;
LIST_ENTRY ListEntry;
} MY_DATA, *PMY_DATA;

I have a question:

0:000> !list “-t _LIST_ENTRY.Flink -x "? @@(#CONTAINING_RECORD(@$extret,
_MY_DATA, ListEntry));dt _MY_DATA @@(#CONTAINING_RECORD(@$extret, _MY_DATA,
ListEntry))" @@(head.Flink)”

Now if I want to print only a few elements in MY_DATA structure and not
entire structure , say want to print just Data, Data2 members,

will modifying the above as:

0:000> !list “-t _LIST_ENTRY.Flink -x "? @@(#CONTAINING_RECORD(@$extret,
_MY_DATA, ListEntry));dt _MY_DATA @@(#CONTAINING_RECORD(@$extret, _MY_DATA,
ListEntry)) Data Data2" @@(head.Flink)”

work?

Note Data and Data2 added towards the end of the command.

Regards,

-Praveen

“Doron Holan” < mailto:xxxxx
xxxxx@microsoft.com> wrote in message news:xxxxx
news:xxxxx@windbg…

I took the time to try and break down the parameters to !list and wrote
about it last year. Read
http:
http://blogs.msdn.com/doronh/archive/2006/08/10/693769.aspx if you want
to see what I did.

d

-----Original Message-----
From: mailto:xxxxx
xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Wednesday, June 27, 2007 9:58 AM
To: Kernel Debugging Interest List
Subject: Re: [windbg] How do I traverse double/single linked-list and
print few desired fields of the structure that is part of linked list
using windbg?

Praveen Kumar Amritaluru wrote:
> Probably this question has been asked before couple of times and
replied.
> But I dont know/remember the answer.
> I dont want to use LIST_ENTRY as of now.
>
> IS there any extension in windbg to do this currently?
>
> Or the only option is to write a windbg extension? If so, does anyone
know
> of existing windbg extension to do that?

The answer to this seems pretty obvious. If you write your own custom
data structure, then you will surely need your own custom windbg
extension to traverse it.

That’s one darned good reason to use LIST_ENTRY instead of rolling your
own.

One of my favorite features of the GNU gdb debugger is that you can call
named routines in the module under test. I often include debug
functions that are never called in the code, specifically for use within
gdb. It’s a lot easier than writing a formal debugger extension.


Tim Roberts, mailto:xxxxx xxxxx@probo.com
Providenza & Boekelheide, Inc.


You are currently subscribed to windbg as:
mailto:xxxxx xxxxx@microsoft.com
To unsubscribe send a blank email to
mailto:xxxxx xxxxx@lists.osr.com


You are currently subscribed to windbg as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></http:></news:xxxxx></mailto:xxxxx>