DukeOfMarmalade
DukeOfMarmalade

Reputation: 2788

Understanding output of WinDBG !clrstack command

Maybe StackOverflow is not the place for this question but if I am in the wrong place then maybe somebody could point me to a better forum. I want to understand the output of some WinDBG commands better, the output of this !clrstack is:

0:008> !clrstack -a

OS Thread Id: 0xe30 (8)

ESP      EIP     
04a4f108 7776f871 [HelperMethodFrame: 04a4f108] 

04a4f1ac 73ee70ec System.Diagnostics.EventLog.get_EntryCount()
    PARAMETERS:
    this = <no data>
    LOCALS:

04a4f1bc 73df24e2 System.Diagnostics.EventLog.CompletionCallback(System.Object)
PARAMETERS:
    this = 0x01207574
    context = <no data>
LOCALS:
    0x04a4f1d8 = 0x001c73b7
    <no data>
    <no data>

Does anybody know what the value under ESP and EIP corresspond to? Also, the values under PARAMETERS and LOCALS, such as this = 0x01207574, is that giving the value of the object that called the method? Or does it mean something else?

Upvotes: 0

Views: 1814

Answers (1)

Alexander Galkin
Alexander Galkin

Reputation: 12534

Here are some answers to your questions:

ESP = Stack Pointer register that points to the head of your stack (growing downwards).

EIP = Instruction Pointer (aka Programm Counter) points to the currently executed instruction in memory (grows upwards).

Parameters shows the location of the parameter of your function call (System.Object) in memory.

Locals gives you the addresses and the values of the local variables in the function.

Upvotes: 4

Related Questions