| 55 | } |
| 56 | |
| 57 | override async objdump(outputFilename: string, result: any, maxSize: number) { |
| 58 | const {nvdisasm, semver} = this.compiler; |
| 59 | |
| 60 | const args = Semver.lt(asSafeVer(semver), '11.0.0', true) |
| 61 | ? [outputFilename, '-c', '-g'] |
| 62 | : [outputFilename, '-c', '-g', '-hex']; |
| 63 | |
| 64 | const {code, execTime, stdout} = await this.exec(unwrap(nvdisasm), args, { |
| 65 | maxOutput: maxSize, |
| 66 | customCwd: result.dirPath, |
| 67 | }); |
| 68 | |
| 69 | if (code === 0) { |
| 70 | result.objdumpTime = execTime; |
| 71 | result.asm = stdout; |
| 72 | } else { |
| 73 | result.asm = `<No output: ${Path.basename(unwrap(nvdisasm))} returned ${code}>`; |
| 74 | } |
| 75 | return result; |
| 76 | } |
| 77 | } |