-
Notifications
You must be signed in to change notification settings - Fork 2
/
ndk-stack.ps1
29 lines (22 loc) · 714 Bytes
/
ndk-stack.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
Param(
[Parameter(Mandatory=$false)]
[String] $logName = "log.log",
[Parameter(Mandatory=$false)]
[Switch] $help
)
if ($help -eq $true) {
Write-Output "`"NDK-Stack`" - Processes a tombstone using the debug .so to find file locations"
Write-Output "`n-- Arguments --`n"
Write-Output "LogName `t`t The file name of the tombstone to process"
exit
}
if (Test-Path "./ndkpath.txt") {
$NDKPath = Get-Content ./ndkpath.txt
} else {
$NDKPath = $ENV:ANDROID_NDK_HOME
}
$stackScript = "$NDKPath/ndk-stack"
if (-not ($PSVersionTable.PSEdition -eq "Core")) {
$stackScript += ".cmd"
}
Get-Content $logName | & $stackScript -sym ./build/debug/ > "$($logName)_processed.log"