-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.ps1
23 lines (19 loc) · 958 Bytes
/
debug.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function run { param($name, $line, $expression)
$prog = "windbg"
$as = '-c',"`$`$>a< trydebug.txt $($name) $($line) $($expression);g","tmp\$($name).exe"
& $prog $as
}
function runmenu { param($line, $expression)
$name = "RunProcess"
$prog = "windbg"
# $as = '-c',".open $($name).c",'-c',"bp ``$($name).c:$($line)``;g","tmp\$($name).exe", '--namedCommand', 'ld:dir', '--loadCommand', 'ld'
$as = '-c',"`$`$>a< trydebug.txt $($name) $($line) $($expression);g","tmp\$($name).exe","--namedCommand","ld:dir","--loadCommand","ld"
& $prog $as
}
function runmenuex { param($line, $expression)
$name = "RunProcess"
$prog = "windbg"
$as = '-c',".open $($name).c",'-c',"bp ``$($name).c:$($line)`` `"`"`"$($expression);gc`"`"`";g","tmp\$($name).exe", '--namedCommand', 'ld:dir', '--loadCommand', 'ld'
& $prog $as
}
# windbg -c "$$>a< trydebug.txt RunProcess 1497 argv[i];g" tmp\RunProcess.exe --namedCommand ld:dir --loadCommand ld