Is there a way in windbg to print the current thread id and frame id? -
a bit of follow to: is there way itereate through frames in windbg?
~*e .echo thread frames , locals:; !for_each_frame dv
is there way echo like: current thread#{threadid} current frame#{frame number}
i couldn't find variables representing current frame number or thread number.
the .frame command shows current frame number.
as simple example: if do: ~*e .thread
i output like:
implicit thread 000007ff`fffde000 implicit thread 000007ff`fffdc000 implicit thread 000007ff`fffd8000 implicit thread 000007ff`fffd6000 implicit thread 000007ff`ffefa000
but i'd see windbg thread id. similarly, i'd see example goes through threads , frames , prints like:
current thread#00 current frame#01
i don't think can shut off !for_each_frame shows you, can add it. so, example:
~*e .printf "thread is: 0x%x\n", @@c++(@$teb->clientid.uniquethread) ; !for_each_frame .printf "frame is: %d\n", @$frame
gives close, there's still junk in output. you'd have more flexibility if wrote own extension.
Comments
Post a Comment