none
WinDbg v.10.0.10240.9 stops parsing DML in .printf at first < character RRS feed

  • Question

  • Since upgrading to WinDbg v.10.0.10240.9 I see a problem with handling of DML in .printf.

    Here is a simple example:

    .printf /D "<exec cmd = \"$$>a<c:\\test.wds\">Run script</exec>\n";

    In previous versions like 6.3.9600.17336, the above code results in a clickable link that runs the script command $$>a<c:\test.wds

    In 10.0.10240.9 the command is truncated at the first < character, and the link runs the command $$>a

    This renders the link unusable.

    Anyone else seeing this or have any ideas?

    Thursday, December 10, 2015 5:08 PM

Answers

  • Ah I see the problem, there were two bugs in this area. One was fixed before 10.0.10240, the other was fixed in the 10.0.10586 timeframe. The command I gave will work on the latest release SDK/WDK/Stand-alone release, 10.0.10586.
    • Marked as answer by JGSaunders Thursday, December 17, 2015 8:37 PM
    Friday, December 11, 2015 9:22 PM
  • The example you listed only worked previously due to a bug that was fixed. The '<', '>', and '&' characters now are required to be escaped properly in all cases.

    For your example: .printf /D "<exec cmd = \"$$&gt;a&lt;c:\\test.wds\">Run script</exec>\n";

    Would work properly. Note that this only is fixed in Windows 10 and newer versions, so anyone running an old debugger wouldn't get the link.
    Thursday, December 10, 2015 10:31 PM

All replies

  • The example you listed only worked previously due to a bug that was fixed. The '<', '>', and '&' characters now are required to be escaped properly in all cases.

    For your example: .printf /D "<exec cmd = \"$$&gt;a&lt;c:\\test.wds\">Run script</exec>\n";

    Would work properly. Note that this only is fixed in Windows 10 and newer versions, so anyone running an old debugger wouldn't get the link.
    Thursday, December 10, 2015 10:31 PM
  • Thanks for your reply!

    Unfortunately that doesn't work, I had already dinked with the escaping after I saw it in the DML doc.

    The code you provided:

     .printf /D "<exec cmd = \"$$&gt;a&lt;c:\\test.wds\">Run script</exec>\n";

    gets evaluated to this:

    .printf /D "Run script\n";

    and does not result in a clickable DML link.

    I can escape the entire thing:

     .printf /D "&lt;exec cmd = \"$$&gt;a&lt;c:\\test.wds\"&gt;Run script&lt;/exec&gt;\n";

    This gives me a DML link but the link is truncated at the <, i.e. it comes through as

    $$>a

    as before

    Any other ideas? I have a ctree file and script library with many of these types of calls, they are all broken.


    • Edited by JGSaunders Thursday, December 10, 2015 11:36 PM
    Thursday, December 10, 2015 11:34 PM
  • Ah I see the problem, there were two bugs in this area. One was fixed before 10.0.10240, the other was fixed in the 10.0.10586 timeframe. The command I gave will work on the latest release SDK/WDK/Stand-alone release, 10.0.10586.
    • Marked as answer by JGSaunders Thursday, December 17, 2015 8:37 PM
    Friday, December 11, 2015 9:22 PM
  • This is now working for me. I have users on old and new versions so I need to version test, but the escaping the < and > is working now in the latest v10.

    Thanks!

    Tuesday, December 15, 2015 3:14 PM