Parameterized WinDbg Scripts

I was looking for a way to pass arguments to scripts and the new WinDbg 6.7.5 documentation contains the description of $$>a< command:

$$>a< Filename arg1 arg2 arg3 … argn


Specifies an argument that the debugger passes to the script. These parameters can be quoted strings or space-delimited strings. All arguments are optional.

This promises a lot of possibilities to write cool scripts and use structured programming. Couldn’t quickly find in the help who gets the passed parameter, a pseudu-register or a fixed-name alias. Certainly some experimentation is needed here.

- Dmitry Vostokov -

2 Responses to “Parameterized WinDbg Scripts”

  1. Roberto Farah Says:

    Hi Dmitry,

    I was browsing debugging blogs and found your blog. I must say, it’s a very cool blog!
    A few days ago I learned how to use parameters when running a script and I’m glad to know the documentation for the new Windbg version added it. I wished to know this feature before. :)
    As an example of usage I have a script using it:


  2. Dmitry Vostokov Says:

    Hi Roberto,

    Cool! Thanks a lot for this information! It looks like scripting is the simplest and quickest way to automate many repetitive debugging and crash dump analysis operations.

    Originally I needed arguments for a script that would save a memory range in a file and then convert it to a .wav by launching Dump2Wave tool :-)


Leave a Reply

You must be logged in to post a comment.