frida/frida-gum ? reverse-engineered prompt

Reverse engineered prompt

Build me a cross platform C library for runtime instrumentation and introspection, like the Gum project here.

I want the core pieces working so another tool can hook functions, trace execution in a stealthy way, watch memory access, inspect running threads, modules, imports, exports, symbols, do memory scanning, symbol lookup, backtraces, and some basic kernel state support where that makes sense. It should also include the code generation and code relocation helpers for the common CPU families already implied by the repo, plus the small developer helpers for heap tracking and profiling.

Please make it build cleanly on the supported platforms, add a simple way to configure and run the tests, and keep the public API easy to consume from other projects. If anything is unclear, check the current docs online or the existing tests first, then fill in the missing pieces in the most practical way.