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

Function drainEvents

scripts/function-stalker.js:233–250  ·  view source on GitHub ↗
(tid, state, events)

Source from the content-addressed store, hash-verified

231}
232
233function drainEvents(tid, state, events) {
234 let parsed;
235 try { parsed = Stalker.parse(events, { annotate: true, stringify: false }); }
236 catch (e) { return; }
237 const lines = [];
238 for (const ev of parsed) {
239 if (state.count >= CONFIG.maxEventsPerCall) break;
240 const line = formatEvent(state, ev);
241 if (line == null) continue;
242 state.count++;
243 if (lines.length < CONFIG.flushBatch) lines.push(line);
244 else state.dropped++;
245 }
246 if (lines.length) {
247 const tag = `${C.dim}#${tid}${C.reset}`;
248 console.log(lines.map((l) => `${tag} ${l}`).join("\n"));
249 }
250}
251
252function sym(addr) { return CONFIG.symbolicate ? resolve(addr).text : addr.toString(); }
253

Callers 1

onReceiveFunction · 0.70

Calls 1

formatEventFunction · 0.70

Tested by

no test coverage detected