--- title: "Dr. Memory Framework" layout: default permalink: /page_drmf.html ---

Dr. Memory

Dr. Memory Framework

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:

find_package(DynamoRIO)
find_package(DrMemoryFramework)

All of the components of DRMF share the same versioning scheme. You can pass a required version to `find_package:`

find_package(DrMemoryFramework 1.0)

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:

cmake -G"Ninja" -DDynamoRIO_DIR=c:/path/to/DynamoRIO-Windows-4.1.0-8/cmake -DDrMemoryFramework_DIR=c:/path/to/DrMemory-Windows-1.6.0-2/drmf ../mysrcs/

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:

find_package(DrMemoryFramework)
use_DynamoRIO_extension(clientname drsyscall)
use_DynamoRIO_extension(clientname umbra)

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.