(startAddress: number, length: number)
| 990 | } |
| 991 | |
| 992 | private async getDisassemblyForAddresses(startAddress: number, length: number): Promise<DisassemblyInstruction[]> { |
| 993 | const endAddress = startAddress + length; |
| 994 | |
| 995 | // tslint:disable-next-line:max-line-length |
| 996 | const result = await this.miDebugger.sendCommand(`data-disassemble -s ${hexFormat(startAddress)} -e ${hexFormat(endAddress)} -- 2`); |
| 997 | const rawInstructions = result.result('asm_insns'); |
| 998 | const instructions: DisassemblyInstruction[] = rawInstructions.map((ri) => { |
| 999 | const address = MINode.valueOf(ri, 'address'); |
| 1000 | const functionName = MINode.valueOf(ri, 'func-name'); |
| 1001 | const offset = parseInt(MINode.valueOf(ri, 'offset')); |
| 1002 | const inst = MINode.valueOf(ri, 'inst'); |
| 1003 | const opcodes = MINode.valueOf(ri, 'opcodes'); |
| 1004 | |
| 1005 | return { |
| 1006 | address: address, |
| 1007 | functionName: functionName, |
| 1008 | offset: offset, |
| 1009 | instruction: inst, |
| 1010 | opcodes: opcodes |
| 1011 | }; |
| 1012 | }); |
| 1013 | |
| 1014 | return instructions; |
| 1015 | } |
| 1016 | } |
no test coverage detected