WinDbg App (ex-Preview) versions 1.2402.24001.0+ are unable to load source files from our PDBs
Categories
(Toolkit :: Crash Reporting, defect)
Tracking
()
People
(Reporter: yannis, Unassigned)
References
()
Details
(Keywords: blocked-thirdparty)
Mozilla PDBs embed a srcsrv stream to let debuggers retrieve the source files through HTTP. Unfortunately this feature is broken in the WinDbg app (formerly known as WinDbg Preview). I have written a simple reproducer for the issue (STR are in README.md) and confirmed that this is a regression introduced in WinDbg 1.2402.24001.0. Versions 1.2308.2002.0 and below work fine, as well as Visual Studio and WinDbg Classic (shipped with the Windows SDK/WDK).
I have filed an issue upstream. There were already duplicate issues for this that got closed, so we'll see. In the mean time, I'll also report this to our discussion list with Microsoft, and update our docs to mention workarounds.
| Reporter | ||
Updated•6 months ago
|
| Reporter | ||
Comment 1•6 months ago
|
||
Note that it is possible to navigate between WinDbg versions to get back to the working one from a Powershell window, e.g.:
winget uninstall Microsoft.WinDbg;winget show Microsoft.WinDbg --versions;winget install Microsoft.WinDbg --version 1.2308.2002.0.
Nevertheless, if you need a feature from the latest WinDbg, below is a workaround that will get source loading to work even for the versions affected by the regression. Define C:\ProgramData\Dbg\src\srcsrv.ini with the following contents:
[variables]
; Workaround for Mozilla binaries
SRCSRVTRG=%targ%\mozilla-src\%var2%\%var4%\%fnbksl%(%var3%)
SRCSRVCMD=curl.exe --location --compressed --output %srcsrvtrg% --silent %fnvar%(%var2%)
Basically the variable definitions in srcsrv.ini will override the variable definitions with the same name from our PDB's srcsrv stream (or, rather, any PDB with a srcsrv stream). Here we are using them to force a download through curl.exe instead of relying on WinDbg supporting HTTP downloads on its own. WinDbg will show a window to manually validate each curl.exe command, which you can avoid with the lines below if you understand the security risk:
[trusted commands]
; /!\ Trusting curl.exe here means that a maliciously crafted PDB can overwrite
; arbitrary files on your disk. Enable this line if you can trust all the
; PDBs you'll load into your debugger. Rely on manual validation otherwise.
;curl.exe=c:\Windows\System32\curl.exe
Description
•