I'm writing a script for an array of LIST_ENTRY. Each LIST_ENTRY is a header of linkedlist.
From reference, I can use !list
to perform the same operation for each element in the linkedlist.
0:000> !list -t MYTYPE.links.Flink -x "dd" -a "L2" 0x6bc00
However, this command only serves one header. How to do it with the whole array. The start value stores at rcx
$$ bp kernel!Func_name "$><d:\\script\\Func_name_x64.txt"
.catch
{
}
To be more specific, I can execute a list of LIST_ENTRY like @blabb did but what I have right now is a table of them and I want to do it repeatedly by script. The data structure looks like this. There is an array of LIST_ENTRY and each one of them is the header of its own list. The element in the list is a structure(file!typename) that contains LIST_ENTRY.
file!typename
__________
____ | ____ | ____ ____
|_0_|--|->|__|--|->|__|->|__|
| |________|
____ ___
|_1_|->|__|
I want to print one of the elements(A) in the structure and output in external file. Like this
____
|_0_|->A1-->A2
|
____
|_1_|->A3
This operation is complicated so I think it can't be realized in one command. But I haven't used windbg script before. The windbg script resource I found doesn't have something like 'specify which element in the struct,output them to external file, and walk through the whole array'