-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathloadAlais.dbg
More file actions
81 lines (64 loc) · 4.64 KB
/
loadAlais.dbg
File metadata and controls
81 lines (64 loc) · 4.64 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.echo +++++++ loading ${$arg0}
.echo
.echo recongnize path alias
$$>a<${myWinScriptPath}\windbg\script\loadSetting\setPathAlias.dbg ;
.echo
.echo set alias ...
aS ${/v:.al} $$>a<${$arg0} ;
aS ${/v:.cmdline} vercommand;
aS ${/v:.av} !analyze -v ;
aS ${/v:.hang} !analyze -v -hang ;
aS ${/v:.ver} vertarget;
aS ${/v:.le} .lastevent;
aS ${/v:.el} .eventlog;
aS ${/v:.fs} .shell -ci "~*kc;" find /i
aS ${/v:.v} !for_each_local .printf /D "check <link cmd=\"dv /a /V /i @#Local \"> @#Local </link>\r\n";
aS ${/v:pp} ga @$ra ;
aS ${/v:.?} $$>a<${myWinScriptPath}\windbg\script\cmds\searchCmd.dbg ;
aS ${/v:.?.} .frame_ebpfix ;
aS ${/v:.dv} dv /t /i /A /V ;
aS ${/v:.k} kPL ;
aS ${/v:.f} .frame /c ;
aS ${/v:.bl} bl /L ;
aS ${/v:.x} ".echo use x /s 0x10 to specify size, use /f to show function, use /d to show data ; x /v /A /d" ;
aS ${/v:.lm} !lmi ;
aS ${/v:.on} $$>a<${myWinScriptPath}\windbg\script\loadSetting\loadOptions_noisyOn.dbg ;
aS ${/v:.off} $$>a<${myWinScriptPath}\windbg\script\loadSetting\loadOptions_noisyOff.dbg ;
aS ${/v:.cmds} .foreach /ps 3 (var { .shell -ci "*" echo %myWinScriptPath:\=\\%} ) {.printf /D "<exec cmd=\".cmdtree ${var}\\Windbg\\script\\loadSetting\\cmdTree.dbg\">open cmd panel</exec>\r\n"} ;
aS ${/v:.cur} .foreach /ps 3 (var { .shell -ci "*" echo %myWinScriptPath:\=\\%} ) {.printf /D "<exec cmd=\".cmdtree ${var}\\Windbg\\script\\loadSetting\\cmdTree_cur.dbg\">open currently panel</exec>\r\n"} ;
aS ${/v:.pver} .foreach /pS 2 /ps 3 (var {.shell -ci "lmvm ${exeModuleName}" find /i "File version"}) { .echo ${var} } ;
aS ${/v:.pan} $$>a<${myWinScriptPath}\windbg\script\cmds\openCmdPanel.dbg ;
aS ${/v:.ddump} .block {.dump /o /mapwd "${targetFolderPath}\${exeModuleName}_1.dmp"};
aS ${/v:.stack} .printf "top[@$teb->NtTib.StackBase] : 0x%p\r\ncur[@$teb->NtTib.StackLimit] : 0x%p\r\nbuttom[@$teb->DeallocationStack] : 0x%p\r\n\r\nStack : [0x%p - 0x%p] , max size : 0x%x\r\nused stack : [0x%p - 0x%p] , used size : 0x%x\r\n" , @@C++(@$teb->NtTib.StackBase) ,@@C++(@$teb->NtTib.StackLimit) , @@C++(@$teb->DeallocationStack) ,@@C++(@$teb->DeallocationStack) , @@C++(@$teb->NtTib.StackBase) , @@C++(@$teb->NtTib.StackBase) - @@C++(@$teb->DeallocationStack) ,@@C++(@$teb->NtTib.StackLimit) , @@C++(@$teb->NtTib.StackBase) , @@C++(@$teb->NtTib.StackBase) - @@C++(@$teb->NtTib.StackLimit) ;
aS ${/v:.ddstack} dds @@C++(@$teb->NtTib.StackLimit) @@C++(@$teb->NtTib.StackBase) ;
aS ${/v:.log} .block { .shell -ci "*" cmd.exe /c start ${myWinScriptPath}\common\tools_txtFile.bat openTxtFile "${logFullPath}" } ;
aS ${/v:.new} .foreach /s ( val "once" ) { .shell -ci "vercommand" clip & cmd.exe /c ${myWinScriptPath}\windbg\script\cmds\common.bat "debugNewSession" };
aS ${/v:.info} $$>a<${myWinScriptPath}\windbg\script\loadSetting\loadInfo.dbg ;
aS ${/v:.reglist} $$>a<${myWinScriptPath}\windbg\script\cmds\listAllPseudoRegisters.dbg ;
aS ${/v:.gdi} $$>a<${myWinScriptPath}\windbg\script\cmds\dump\DumpGDI.dbg ;
aS ${/v:.mods} $$>a<${myWinScriptPath}\windbg\script\cmds\enumModEntry.dbg ;
aS ${/v:.goto} .block { .shell -ci "*" explorer.exe /select, "${targetFullPath}" };
aS ${/v:..tlist} .shell -ci "*" cmd.exe /c "${windbgFolderPath}\tlist.exe" ;
.if(${/d:dbgLive})
{
aS ${/v:.bpstr} $$>a<${myWinScriptPath}\windbg\script\cmds\breakpoint\bp_whenStrMatch.dbg ;
$$ below statement will cause script exit exception when failing to access @$peb -- it needs ntdll.dll symbol.
$$ setPathAlias.dbg will do the necessary path parse work. here needn't again.
$$ aS /c ${/v:targetFullPath} .printf "%mu", @@c++(@$peb->ProcessParameters->ImagePathName.Buffer);
$$ aS ${/v:.dir} .block { .shell -ci "*" explorer.exe /select,"${targetFullPath}" };
}
.if(${/d:dbgDmp})
{
aS ${/v:.2File} $$>a<${myWinScriptPath}\windbg\script\cmds\saveInfo2File.dbg
aS ${/v:.eid} ~#s;
aS ${/v:.exp} $$>a<${myWinScriptPath}\windbg\script\cmds\checkException.dbg ;
aS ${/v:.eer} .foreach /pS 3 /ps 10 ( val { .shell -ci "~*kbL" find /i "UnhandledExceptionFilter" } ) { .cxr poi(${val}+4) };
$$ aS ${/v:targetFullPath} ${$CurrentDumpFile}
$$ aS ${/v:.dir} .shell -ci "*" explorer.exe /select,"${$CurrentDumpFile}"
}
aS ${/v:.his} .write_cmd_hist ${targetFolderPath}\historyCmds.log;
aS ${/v:.dir} .block { .shell -ci "*" explorer.exe /select,"${targetFullPath}"};
aS ${/v:.test} $$>a<${myWinScriptPath}\windbg\script\test\test.dbg ;
.echo below alias is predefined
al
.echo ------- exiting ${$arg0}