Interface

GumModule

Description [src]

interface Gum.Module : GObject.Object

Represents a loaded shared library, exposing its metadata and symbols.

A module provides its name, version, path and address range, and lets you enumerate its imports, exports, symbols, sections, ranges and dependencies, as well as resolve individual exports and symbols by name. Obtain modules through the Process API — for example gum_process_find_module_by_name() or gum_process_enumerate_modules() — or load one explicitly with gum_module_load().

Prerequisite

In order to implement Module, your type must inherit fromGObject.

Functions

gum_module_find_global_export_by_name

Resolves an exported symbol across all loaded modules, following the platform’s global symbol resolution order. Convenient when you do not already have the owning module in hand.

gum_module_load

Loads the specified module.

Instance methods

gum_module_ensure_initialized

Ensures the module’s initializers have run, loading it fully if it was only partially loaded, so that calling into its APIs is safe.

gum_module_enumerate_dependencies

Enumerates dependencies of the specified module.

gum_module_enumerate_exports

Enumerates the module’s exports, calling func for each one. Enumeration stops if func returns FALSE.

gum_module_enumerate_imports

Enumerates the module’s imports, calling func for each one. Enumeration stops if func returns FALSE.

gum_module_enumerate_ranges

Enumerates the module’s memory ranges whose protection includes prot, calling func for each one. Enumeration stops if func returns FALSE.

gum_module_enumerate_sections

Enumerates sections of the specified module.

gum_module_enumerate_symbols

Enumerates the module’s symbols, calling func for each one. Enumeration stops if func returns FALSE. Unlike exports, this includes local and debug symbols where the platform exposes them.

gum_module_find_export_by_name

Resolves an exported symbol in this module.

gum_module_find_symbol_by_name

Resolves a symbol in this module by name. Where the backend offers no direct lookup, the module’s symbols are enumerated once and cached for subsequent queries.

gum_module_get_name

Gets the module’s short name, e.g. libc.so.6.

gum_module_get_path

Gets the module’s full filesystem path.

gum_module_get_range

Gets the module’s base address and size in memory.

gum_module_get_version

Gets the module’s version string, where the platform provides one.

Interface structure

struct GumModuleInterface {
  GTypeInterface parent;
  const gchar* (* get_name) (
    GumModule* self
  );
  const gchar* (* get_version) (
    GumModule* self
  );
  const gchar* (* get_path) (
    GumModule* self
  );
  const GumMemoryRange* (* get_range) (
    GumModule* self
  );
  void (* ensure_initialized) (
    GumModule* self
  );
  void (* enumerate_imports) (
    GumModule* self,
    GumFoundImportFunc func,
    gpointer user_data
  );
  void (* enumerate_exports) (
    GumModule* self,
    GumFoundExportFunc func,
    gpointer user_data
  );
  void (* enumerate_symbols) (
    GumModule* self,
    GumFoundSymbolFunc func,
    gpointer user_data
  );
  void (* enumerate_ranges) (
    GumModule* self,
    GumPageProtection prot,
    GumFoundRangeFunc func,
    gpointer user_data
  );
  void (* enumerate_sections) (
    GumModule* self,
    GumFoundSectionFunc func,
    gpointer user_data
  );
  void (* enumerate_dependencies) (
    GumModule* self,
    GumFoundDependencyFunc func,
    gpointer user_data
  );
  GumAddress (* find_export_by_name) (
    GumModule* self,
    const gchar* symbol_name
  );
  GumAddress (* find_symbol_by_name) (
    GumModule* self,
    const gchar* symbol_name
  );
  
}

No description available.

Interface members
parent
GTypeInterface
 

No description available.

get_name
const gchar* (* get_name) (
    GumModule* self
  )
 

No description available.

get_version
const gchar* (* get_version) (
    GumModule* self
  )
 

No description available.

get_path
const gchar* (* get_path) (
    GumModule* self
  )
 

No description available.

get_range
const GumMemoryRange* (* get_range) (
    GumModule* self
  )
 

No description available.

ensure_initialized
void (* ensure_initialized) (
    GumModule* self
  )
 

No description available.

enumerate_imports
void (* enumerate_imports) (
    GumModule* self,
    GumFoundImportFunc func,
    gpointer user_data
  )
 

No description available.

enumerate_exports
void (* enumerate_exports) (
    GumModule* self,
    GumFoundExportFunc func,
    gpointer user_data
  )
 

No description available.

enumerate_symbols
void (* enumerate_symbols) (
    GumModule* self,
    GumFoundSymbolFunc func,
    gpointer user_data
  )
 

No description available.

enumerate_ranges
void (* enumerate_ranges) (
    GumModule* self,
    GumPageProtection prot,
    GumFoundRangeFunc func,
    gpointer user_data
  )
 

No description available.

enumerate_sections
void (* enumerate_sections) (
    GumModule* self,
    GumFoundSectionFunc func,
    gpointer user_data
  )
 

No description available.

enumerate_dependencies
void (* enumerate_dependencies) (
    GumModule* self,
    GumFoundDependencyFunc func,
    gpointer user_data
  )
 

No description available.

find_export_by_name
GumAddress (* find_export_by_name) (
    GumModule* self,
    const gchar* symbol_name
  )
 

No description available.

find_symbol_by_name
GumAddress (* find_symbol_by_name) (
    GumModule* self,
    const gchar* symbol_name
  )
 

No description available.

Virtual methods

Gum.Module.ensure_initialized

Ensures the module’s initializers have run, loading it fully if it was only partially loaded, so that calling into its APIs is safe.

Gum.Module.enumerate_dependencies

Enumerates dependencies of the specified module.

Gum.Module.enumerate_exports

Enumerates the module’s exports, calling func for each one. Enumeration stops if func returns FALSE.

Gum.Module.enumerate_imports

Enumerates the module’s imports, calling func for each one. Enumeration stops if func returns FALSE.

Gum.Module.enumerate_ranges

Enumerates the module’s memory ranges whose protection includes prot, calling func for each one. Enumeration stops if func returns FALSE.

Gum.Module.enumerate_sections

Enumerates sections of the specified module.

Gum.Module.enumerate_symbols

Enumerates the module’s symbols, calling func for each one. Enumeration stops if func returns FALSE. Unlike exports, this includes local and debug symbols where the platform exposes them.

Gum.Module.find_export_by_name

Resolves an exported symbol in this module.

Gum.Module.find_symbol_by_name

Resolves a symbol in this module by name. Where the backend offers no direct lookup, the module’s symbols are enumerated once and cached for subsequent queries.

Gum.Module.get_name

Gets the module’s short name, e.g. libc.so.6.

Gum.Module.get_path

Gets the module’s full filesystem path.

Gum.Module.get_range

Gets the module’s base address and size in memory.

Gum.Module.get_version

Gets the module’s version string, where the platform provides one.