droption DynamoRIO Extension provides easy-to-use option declaration and parsing for both clients and standalone programs.
droption with your client simply include this line in your client's
That will automatically set up the include path. Then include the header file:
droption with a non-client, for example with a tool frontend or other standalone application, simply include the droption.h header file.
Simply declare a global instance of
droption_t of the desired option value type for each option you wish to support. Typical value types are
bool, integers, or
std::string. For example:
A standalone application should pass
DROPTION_SCOPE_FRONTEND rather than
In a client using the legacy
dr_init(), use the
droption provides some custom value types for options:
To produced automated documentation with the long-format descriptions, we recommend building a small program that looks something like this:
This program can be built and run at documentation generation time to produce HTML that can then be embedded into Doxygen or other documentation.