Skip to content

Commit

Permalink
Merge pull request #1118 from Ana06/pdbs
Browse files Browse the repository at this point in the history
[pdbs.pdbresym.vm] Download x32 and driver PDBs
  • Loading branch information
Ana06 authored Aug 20, 2024
2 parents b0d46c4 + 78908ed commit 9dffd97
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/pdbs.pdbresym.vm/pdbs.pdbresym.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>pdbs.pdbresym.vm</id>
<version>0.0.0.20240710</version>
<version>0.0.0.20240813</version>
<authors>Stephen Eckels</authors>
<description>Download PDBs</description>
<dependencies>
Expand Down
20 changes: 14 additions & 6 deletions packages/pdbs.pdbresym.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ Import-Module vm.common -Force -DisableNameChecking

try {
$executablePath = Join-Path ${Env:RAW_TOOLS_DIR} PDBReSym\PDBReSym.exe -Resolve
$symbolsPath = "C:\symbols"

VM-Write-Log "INFO" "Iterating through C:\Windows\System32 downloading PDBs to C:\symbols"
& $executablePath cachesyms
$pdbs = @(
@{ name = "x64"; path = "$env:windir\System32" },
@{ name = ".NET"; path = "$env:windir\Microsoft.NET" },
@{ name = "driver"; path = "$env:windir\System32\drivers" }
)
if (Get-OSArchitectureWidth -Compare 64) {
$pdbs += @{ name = "x32"; path = "$env:windir\SysWOW64" }
}

VM-Write-Log "INFO" "Iterating through C:\Windows\Microsoft.NET downloading .NET PDBs to C:\symbols"
& $executablePath cachesyms --sysdir "C:\Windows\Microsoft.NET"
ForEach ($pdb in $pdbs) {
VM-Write-Log "INFO" "Iterating through $($pdb.path) downloading $($pdb.name) PDBs to $symbolsPath"
& $executablePath cachesyms --sysdir $($pdb.path)
}

# The downloaded symbols are store into C:\symbols
VM-Assert-Path "C:\symbols"
VM-Assert-Path $symbolsPath

# Set _NT_SYMBOL_PATH to include the downloaded symbols
$symbolsPath = "srv*c:\symbols*https://msdl.microsoft.com/download/symbols"
Expand Down

0 comments on commit 9dffd97

Please sign in to comment.