Hello Dave,
When investigating list command, I found the "-h" is involved but not
discussed in help page. And then I tried to use, but I find some
problems with it.
The first, I made patch to show it. The "ld->start" should be the
pointer to the structure list_head.
And the second one, I am not sure about the reason why you don't
display the node related to the address user input. I will take the
tasks of task_struct as an example.
crash> task_struct.tasks ffff8800371a0ac0
tasks = {
next = 0xffffffff81a8d468,
prev = 0xffff88004a9e0f88
}
crash> list task_struct.tasks -s task_struct.tasks -h ffff8800371a0ac0
ffffffff81a8d020
tasks = {
next = 0xffff88004eaf1908,
prev = 0xffff8800371a0f08
}
ffff88004eaf14c0
tasks = {
next = 0xffff88004eaf0ec8,
prev = 0xffffffff81a8d468
}
...
As the command shows, the command neglect the task_struct at
ffff8800371a0ac0. I don't know why it is omitted. And if only one node
is in the list, why prints "(empty)"?
readmem(ld->start, KVADDR, &ld->start, sizeof(void *),
"LIST_HEAD contents", FAULT_ON_ERROR);
if (ld->start == ld->end) {
fprintf(fp, "(empty)\n");
return;
}
--
--
Regards
Qiao Nuohan