MCPcopy Create free account
hub / github.com/axhlzy/FridaDebugger / routineModuleOffset

Function routineModuleOffset

scripts/thread-stalker.js:134–141  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

132
133// routineModuleOffset(addr) -> { module, offset } using the module table.
134function routineModuleOffset(addr) {
135 if (!addr || addr.isNull()) return null;
136 let m = null;
137 try { m = Process.findModuleByAddress(addr); } catch (e) {}
138 if (!m) return null;
139 // NativePointer has no toNumber(); go via hex string.
140 return { module: m.name, offset: parseInt(addr.sub(m.base).toString(), 16) };
141}
142
143// --- target parsing & matching ---------------------------------------------
144// parseTarget("libfk.so+0x950bb8") -> {module:"libfk.so", offset:0x950bb8}

Callers 1

matchThreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected