Say, I have a full kernel memory dump (.dmp file.) After I open it in WinDbg, and run the k command to get the callstack:
I can click on some of the links that WinDbg provides on the left (00, 01, etc.) or just run:
to retrieve stack frame 00.
We usually get something like this for that specific function call:
I'm trying to understand the workings of the `.frame` feature. Thus my questions (if anyone knows):
1. Where is that information about input parameters for each function stored? Or, in other words, how does WinDbg retrieve it?
2. And why are we sometimes getting "value unavailable" for some parameters?
I guess my overall intent here is an attempt to understand how are those parameters retrieved and whether or not the results of such retrieval can be trusted.
9: kd> k
# Child-SP RetAddr Call Site
00 ffff820c`a3755270 fffff803`0eb8d104 nt!KeBugCheck2+0x1fc
01 ffff820c`a3755890 fffff803`0f373680 nt!KeBugCheckEx+0x14
02 ffff820c`a37558a0 fffff803`0f200ed8 nt!MmDeleteProcessAddressSpace+0x99dd0
03 ffff820c`a37558e0 fffff803`0f1ac000 nt!PspProcessDelete+0x278
04 ffff820c`a3755970 fffff803`0ebe6000 nt!ObpRemoveObjectRoutine+0xd0
05 ffff820c`a37559c0 fffff803`0f201cd0 nt!ObfDereferenceObjectWithTag+0x140
06 ffff820c`a37559f0 fffff803`0f1ac000 nt!PspThreadDelete+0x310
07 ffff820c`a3755a50 fffff803`0ec1c248 nt!ObpRemoveObjectRoutine+0xd0
08 (Inline Function) --------`-------- nt!ObfDereferenceObjectWithTag+0xc0
09 (Inline Function) --------`-------- nt!ObfDereferenceObject+0xc0
0a ffff820c`a3755aa0 fffff803`0ec990a8 nt!PspReaper+0x1a8
0b ffff820c`a3755ba0 fffff803`0ec1a684 nt!ExpWorkerThread+0x158
0c ffff820c`a3755d30 fffff803`0ef32a8c nt!PspSystemThreadStartup+0x64
0d ffff820c`a3755d90 00000000`00000000 nt!KiStartSystemThread+0x24
9: kd>
I can click on some of the links that WinDbg provides on the left (00, 01, etc.) or just run:
9: kd> .frame 0n0;dv /t /v
to retrieve stack frame 00.
We usually get something like this for that specific function call:
9: kd> .frame 0n0;dv /t /v
00 ffff820c`a3755270 fffff803`0eb8d104 nt!KeBugCheck2+0x1fc
ffff820c`a3755298 unsigned long BugCheckCode = 0x76
<unavailable> unsigned int64 BugCheckParameter1 = <value unavailable>
ffff820c`a37552c8 unsigned int64 BugCheckParameter2 = 0xffffaf05`5d1d8200
ffff820c`a37552c0 unsigned int64 BugCheckParameter3 = 5
<unavailable> unsigned int64 BugCheckParameter4 = <value unavailable>
I'm trying to understand the workings of the `.frame` feature. Thus my questions (if anyone knows):
1. Where is that information about input parameters for each function stored? Or, in other words, how does WinDbg retrieve it?
2. And why are we sometimes getting "value unavailable" for some parameters?
I guess my overall intent here is an attempt to understand how are those parameters retrieved and whether or not the results of such retrieval can be trusted.