-
Notifications
You must be signed in to change notification settings - Fork 0
/
symstore.ps1
36 lines (28 loc) · 966 Bytes
/
symstore.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# Store symbols for archived build
#
param(
[string]$SymbolServer = "c:\symbols",
[Parameter(Mandatory = $true)]
[string]$Arch
)
Function Add-Symbols {
param(
[string]$DriverName,
[string]$ArchivePath,
[string]$SymbolServer,
[string]$Arch
)
Write-Host Store symbols from (Resolve-Path $ArchivePath)
$cwd = Get-Location
Set-Location $ArchivePath
$path = Join-Path -Path ([string]::Format("{0}Debuggers", $env:WDKContentRoot)) -ChildPath $Arch
$symstore = Join-Path -Path $path -ChildPath "symstore.exe"
$inffile = [string]::Format("{0}.inf", $DriverName)
$Version = (Get-Content -Path $inffile | Select-String "DriverVer").Line.Split(',')[1]
Get-ChildItem -Path "." -Include "*.pdb" -Name | Write-Host
& $symstore "add" "/s" $SymbolServer "/r" "/f" "*.pdb" "/t" $DriverName "/v" $Version
Set-Location $cwd
}
$archivepath = Join-Path -Path (Resolve-Path "xenvif") -ChildPath $Arch
Add-Symbols "xenvif" $archivepath $SymbolServer $Arch