Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to inpect the registers value on a specific call stack frame in windbg

I'm investigating a Windows dump file in WinDBG. I can switch the call stack frame by command .frame, but I found that the registers always contain the last context. I mean, if it is possible to restore the context which belongs to a specific call stack frame that is not the top one?

like image 889
Fan Yang Avatar asked Apr 06 '12 02:04

Fan Yang


1 Answers

If you're debugging an x64 target, you can use:

.frame /r

To view the registers in the frame. This information is based on the unwind data in the image, so it's pretty reliable. You can also change the context with:

.frame /c

On the x86, there's no unwind information so this trick doesn't work. .frame will still show you something for the registers, but it's not as likely to be correct (it will basically only be correct by luck).

like image 160
snoone Avatar answered Sep 29 '22 16:09

snoone