Frida Gum
    Preparing search index...

    Class CModule

    Compiles C source code to machine code, straight to memory. May also be constructed from a precompiled shared library.

    Useful for implementing hot callbacks, e.g. for Interceptor and Stalker, but also useful when needing to start new threads in order to call functions in a tight loop, e.g. for fuzzing purposes.

    Global functions are automatically exported as NativePointer properties named exactly like in the C source code. This means you can pass them to Interceptor and Stalker, or call them using NativeFunction.

    In addition to accessing a curated subset of Gum, GLib, and standard C APIs, the code being mapped in can also communicate with JavaScript through the symbols exposed to it. These can be plugged in at creation, e.g. to share memory allocated using Memory.alloc(), or NativeCallback values for receiving callbacks from the C module.

    To perform initialization and cleanup, you may define functions with the following names and signatures:

    `void init (void)`
    `void finalize (void)`
    

    Note that all data is read-only, so writable globals should be declared extern, allocated using e.g. Memory.alloc(), and passed in as symbols through the constructor's second argument.

    Indexable

    • readonly [name: string]: any
    Index
    builtins: CModuleBuiltins