goldshtn / msos

Command-line environment a-la WinDbg for executing SOS commands without having SOS available.
Other
96 stars 21 forks source link

Skip managed frames #47

Closed alobmaier closed 8 years ago

alobmaier commented 8 years ago

Encountered a problem when using the mixed stack command on a mixed thread stack. Why the else if (managedFrame > 0) condition in msos/MixedStack.cs ?

In my scenario I stepped the stack with the built-in ClrMd ClrRuntime.Threads property and one time with msos. In msos I missed the last frame on top of the stack, due to the check, if there was a managed frame already. So if there was a frame without a native one associated with, the managed frame will get skipped.

goldshtn commented 8 years ago

Looks like a good catch. If we are at the top of the stack, managedFrame == 0 and we might throw the frame away if there is no matching native frame. Would you like to fix this and submit a PR?

alobmaier commented 8 years ago

Sure, I am on it.