views:

100

answers:

1

Example:

InnerException: StackTrace (generated): SP IP Function 003D8E9C 03B21BD7 Something!Blah.Blah.FunctionName(System.String)+0xa8

What does the +0xa8 part indicate?

+3  A: 

It's the offset into the code, so it's not the very first instruction in the method, rather the instruction at offset 0xa8 or 0x10 inside the method, counted from the entry point.

Lasse V. Karlsen
That's what I thought, but reviewing the IL for said function (lets call it X), and moving to offset 0xa8, brings me to an ldarg. The exception actually occurs in a function Y, which X calls from around offset 0xa8. I need to know exactly which one.
Benson
I'm working on it, but I have to install Windbg on this machine. If I'm not mistaken, the offset is for machine code instructions, not IL.
Lasse V. Karlsen
Note that I only know it's an offset, I'm not altogether familiar with Windbg to know how to find the right instruction yet, but I'm good at googling. Perhaps someone with more Windbg knowledge can give you a better answer with the Windbg commands to find the right code. But I'll try to find it as well.
Lasse V. Karlsen
Note that inlining can throw off the offsets, if the Y method you call is small, it might be inlined directly into the machine code for X.
Lasse V. Karlsen
Try running !u on the MethodDesc and see what the starting address + the offset gets you
AaronBa