(session: StalkerSession, current: NativePointer, count: number)
| 556 | } |
| 557 | |
| 558 | private getCapturedWindow(session: StalkerSession, current: NativePointer, count: number): DisassembledInstruction[] { |
| 559 | const instructions = session.breakpoint.originalDisassembly; |
| 560 | const currentIndex = instructions.findIndex((instruction) => instruction.address.equals(current)); |
| 561 | if (currentIndex === -1) { |
| 562 | return []; |
| 563 | } |
| 564 | |
| 565 | const before = 2; |
| 566 | const start = Math.max(0, currentIndex - before); |
| 567 | return instructions.slice(start, start + count); |
| 568 | } |
| 569 | |
| 570 | private getSession(threadId: ThreadId | null): StalkerSession | null { |
| 571 | if (threadId === null) { |
no outgoing calls
no test coverage detected