MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / objdump

Method objdump

lib/compilers/nvrtc.ts:57–76  ·  view source on GitHub ↗
(outputFilename: string, result: any, maxSize: number)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 3

asSafeVerFunction · 0.85
unwrapFunction · 0.50
execMethod · 0.45

Tested by

no test coverage detected