WinDbg Preview 1.0.1812.12001 and new extensibility interfaces
Hi everyone and happy holidays!
Feel free to leave any questions or comments below or reach out to me on Twitter @aluhrs13. If you have feedback on our samples feel free to open a GitHub issue, or a PR if you want to contribute a fix or change.
Debugger data model C++ header
Last month we released a C++ header, DbgModel.h, as part of the Windows SDK for extending the debugger data model via C++. You can find more information in our official docs - https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/data-model-cpp-overview
New Data Model API Extension
You can find the full docs for these new namespaces and the objects associated with them at:
- Docs - https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/dbgmodel-namespace-code
- Sample - https://github.com/Microsoft/WinDbg-Samples/tree/master/CodeFlow
- Docs - https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/dbgmodel-namespace-file-system
- Sample - https://github.com/Microsoft/WinDbg-Samples/tree/master/FileSystem
0:000> dx Debugger.Utility.FileSystem.FileExists("C:\\Users\\aluhrs\\Desktop\\HelloWorld.txt") Debugger.Utility.FileSystem.FileExists("C:\\Users\\aluhrs\\Desktop\\HelloWorld.txt") : false
0:000> dx Debugger.Utility.FileSystem.TempDirectory.Files.Count(),d Debugger.Utility.FileSystem.TempDirectory.Files.Count(),d : 110
This can be useful when writing scripts to quickly validate what a method might return in a REPL-like fashion. These extensions are also available in WinDbg and our command-line client in the latest Windows Insider SDK Preview - https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK
There are a couple known issues in this release that will be fixed in our next release:
- There can be an incorrect flow graph produced from DisassembleFunction for some functions (overlapping basic blocks with incorrect flow links).
Synthetic types extension
With this new API extension, we have a new sample up on our GitHub repo here - https://github.com/Microsoft/WinDbg-Samples/tree/master/SyntheticTypes.
Other change and bug fixes
- WinDbg Preview will now more intelligently handle bringing source windows or the disassembly window to the foreground when stepping.
- Re-arranged WinDbgNext's window title to have more important information at the start when kernel debugging.
- The alternating background contrast in the command window should be slightly more noticeable.