Dr. Memory
|
Dr. Memory provides a Software Development Kit called the Dr. Memory Framework, or DRMF. The DRMF allows other tools to leverage the powerful features built into Dr. Memory. The DRMF is organized into separate DynamoRIO Extension libraries:
- Dr. Syscall: System Call Monitoring Extension
Detailed system call parameter monitoring - Umbra: Shadow Memory Extension
Shadow memory mapping - Dr. SymCache: Symbol Lookup Cache Extension
Persistent caching of symbol lookup data - Dr. Fuzz: Dynamic Fuzz Testing Extension
Fuzz testing - Dr. Malloc
Memory allocation tracking (coming soon) - Dr. Callstack
Efficient callstack walking and storage (coming soon)
Using DRMF
DRMF is now distributed in a combined package with DynamoRIO for DynamoRIO versions 5.0 and higher. If you are using such a combined package, DRMF will be automatically located and loaded for you when you execute the find_package(DynamoRIO)
command.
If you are using a standalone Dr. Memory package, to use one or more of the components of DRMF, locate the Dr. Memory Framework using the find_package
command right after similarly locating the DynamoRIO package:
All of the components of DRMF share the same versioning scheme. You can pass a required version to find_package:
To point CMake at the framework, set the DrMemoryFramework_DIR variable to point at the drmf
subdirectory of the Dr. Memory package that you are using. For example:
Once the package is located, use the standard method of using an Extension for each component your client uses. The two steps combined will look like this example in your client's CMakeLists.txt
file:
That will automatically set up the include paths and library dependences.
See the documentation for the individual components for information on how to use each one.