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

Function getEntryCount

agent/stack.ts:62–73  ·  view source on GitHub ↗
(sp: NativePointer, fp: NativePointer | null, maxEntries: number)

Source from the content-addressed store, hash-verified

60}
61
62function getEntryCount(sp: NativePointer, fp: NativePointer | null, maxEntries: number): number {
63 if (fp === null || fp.compare(sp) <= 0) {
64 return maxEntries;
65 }
66
67 const byteLength = fp.sub(sp).toUInt32();
68 if (byteLength <= 0 || byteLength > MAX_STACK_BYTES) {
69 return maxEntries;
70 }
71
72 return Math.max(1, Math.floor(byteLength / Process.pointerSize) + 1);
73}
74
75function logStackSlot(
76 index: number,

Callers 1

logStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected