https://github.com/frida/frida-itrace
Instruction tracer powered by Frida
https://github.com/frida/frida-itrace
Last synced: 11 months ago
JSON representation
Instruction tracer powered by Frida
- Host: GitHub
- URL: https://github.com/frida/frida-itrace
- Owner: frida
- License: mit
- Created: 2023-07-17T12:57:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-09T13:29:24.000Z (12 months ago)
- Last Synced: 2025-06-19T05:58:39.578Z (12 months ago)
- Language: TypeScript
- Size: 52.7 KB
- Stars: 140
- Watchers: 13
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# frida-itrace
Instruction tracer powered by Frida.
## Example
```js
import {
TraceBuffer,
TraceBufferReader,
TraceSession,
TraceStrategy,
} from "frida-itrace";
const strategy: TraceStrategy = {
type: "thread",
threadId: Process.enumerateThreads()[0].id
};
const buffer = TraceBuffer.create();
const session = new TraceSession(strategy, buffer);
session.events.on("start", (regSpecs, regValues) => {
send({ type: "itrace:start", payload: regSpecs }, regValues);
});
session.events.on("end", () => {
send({ type: "itrace:end" });
});
session.events.on("compile", (block) => {
send({ type: "itrace:compile", payload: block });
});
session.events.on("panic", (message) => {
console.error(message);
});
session.open();
const reader = new TraceBufferReader(buffer);
setInterval(() => {
const chunk: ArrayBuffer = reader.read();
if (chunk.byteLength === 0) {
return;
}
send({ type: "itrace:chunk" }, chunk);
}, 10);
```