(params: Dap.ReadMemoryParams)
| 471 | } |
| 472 | |
| 473 | async _onReadMemory(params: Dap.ReadMemoryParams): Promise<Dap.ReadMemoryResult> { |
| 474 | const ref = params.memoryReference; |
| 475 | const memory = await this.findVariableStore(v => v.hasMemory(ref))?.readMemory( |
| 476 | ref, |
| 477 | params.offset ?? 0, |
| 478 | params.count, |
| 479 | ); |
| 480 | if (!memory) { |
| 481 | return { address: '0', unreadableBytes: params.count }; |
| 482 | } |
| 483 | |
| 484 | return { |
| 485 | address: '0', |
| 486 | data: memory.toString('base64'), |
| 487 | unreadableBytes: params.count - memory.length, |
| 488 | }; |
| 489 | } |
| 490 | |
| 491 | async _onWriteMemory(params: Dap.WriteMemoryParams): Promise<Dap.WriteMemoryResult> { |
| 492 | const ref = params.memoryReference; |
no test coverage detected