_module_data_t Struct Reference

#include <dr_modules.h>

Data Fields

app_pc end
app_pc entry_point
uint flags
module_names_t names
char * full_path
version_number_t file_version
version_number_t product_version
uint checksum
uint timestamp
size_t module_internal_size
app_pc preferred_base
app_pc start
module_handle_t handle

Detailed Description

Holds information about a loaded module.

On Linux the start address can be cast to an Elf32_Ehdr or Elf64_Ehdr.
On Windows the start address can be cast to an IMAGE_DOS_HEADER for use in finding the IMAGE_NT_HEADER and its OptionalHeader. The OptionalHeader can be used to walk the module sections (among other things). See WINNT.H.
On MacOS the start address can be cast to mach_header or mach_header_64.
When accessing any memory inside the module (including header fields) user is responsible for guarding against corruption and the possibility of the module being unmapped.

Field Documentation

◆ checksum

uint _module_data_t::checksum

module checksum from the PE headers

◆ end

app_pc _module_data_t::end

Ending address of this module. If the module is not contiguous (which is common on MacOS, and can happen on Linux), this is the highest address of the module, but there can be gaps in between start and end that are either unmapped or that contain other mappings or libraries. Use the segments array to examine each mapped region, and use dr_module_contains_addr() as a convenience routine, rather than checking against [start..end).

◆ entry_point

app_pc _module_data_t::entry_point

entry point for this module as specified in the headers

◆ file_version

version_number_t _module_data_t::file_version

file version number from .rsrc section

◆ flags

uint _module_data_t::flags

Reserved, set to 0

◆ full_path

char* _module_data_t::full_path

full path to the file backing this module

◆ handle

module_handle_t _module_data_t::handle

module_handle for use with dr_get_proc_address()

◆ module_internal_size

size_t _module_data_t::module_internal_size

Module internal size (from PE headers SizeOfImage).

◆ names

module_names_t _module_data_t::names

struct containing name(s) for this module; use dr_module_preferred_name() to get the preferred name for this module

◆ preferred_base

app_pc _module_data_t::preferred_base

The preferred base address of the module.

◆ product_version

version_number_t _module_data_t::product_version

product version number from .rsrc section

◆ start

app_pc _module_data_t::start

starting address of this module

◆ timestamp

uint _module_data_t::timestamp

module timestamp from the PE headers

The documentation for this struct was generated from the following file:
  • /home/runner/work/dynamorio/dynamorio/build_release-64/include/dr_modules.h