none
In Windbg, How do i avoid getting "Last set context:" message after using .cxr RRS feed

  • Question

  • Hi,

    when analyzing a dump , i had to .cxr to get to the real exception call stack. 

    but almost every command i run has "Last set context:" in the output.

    This is very annoying, especially when running scripts. (getting a lot of these messages between and within the output lines of the script)

    Thank you 

    Monday, May 30, 2016 7:56 AM

All replies

  • Not that sure you can avoid this. It is the same for .cxr as with 
    .frame /c <FrameNumber> 

    Looks like for 'r' cmd "Last set context:" is added with a 'dprintf' in dbgeng!WrapParseRegCmd, whenever 'current local context' differs from default context of current thread.
    A blank '.cxr' or setting the thread explicitly '~<n>s' resets context to the 'default scope' of respective thread.

    With kind regards

    Tuesday, May 31, 2016 11:15 AM
  • Thanx

    It seems that in windbg 6.3.9 (was using 6.12) my problem is partially fixed.

    At least in a manner that i don't have to .cxr when getting a dump from WerpReportFault because unlike 6.12 the callstack does not stop at ntdll!KiUserExceptionDispatcher but continues to my code , so i can just click on the callstack and run my scrips normally.

    In windbg 6.12 i tried a nice trick (following you comment). I attached a new windbg to the working windbg and found the "Last set context:" string in the dbgeng.dll that was loaded. all i did is change the 'L' to 0x00 and now when ever my "dump"windbg wanted to print "Last set.." it would print nothing, so the script output looked normal.

    Tuesday, May 31, 2016 3:38 PM