windbg initialization script

Each time windbg starts, I will run some commands, I suddenly realized that maybe it's time to these commands into a script, let windbg automatically execute it.

First, create a file that contains all the commands you want to run.

For this example, I create a file named "dbg-prep.wds" of

C:\Users\ilhoye\Desktop\WinDbg> type dbg-prep.cmd
.symfix
.reload
.load mex
.load kdexts
aS !pr !process

Once we have this, we can use '-c' option to start windbg. '-c' is the command to be executed when windbg start, but our case, we want to execute several commands, which is why I started by creating a script.
To this end, we still use '-c' option, but now we want to provide the following file path.

windbg.exe -c "$$><F\脚本\dbg-prep.wds“

Please note that the '-c' option requires that reference as above.

Of course, all of these inputs are very troublesome, it is best to do this to create a shortcut. In the script you can add anything you want to do and command.

Guess you like

Origin www.cnblogs.com/yilang/p/12165779.html