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

Function executeObjdump

lib/objdumper/base.ts:63–82  ·  view source on GitHub ↗
(
        objdumperPath: string,
        args: string[],
        execOptions: ExecutionOptions,
        exec: (filepath: string, args: string[], options: ExecutionOptions) => Promise<UnprocessedExecResult>,
    )

Source from the content-addressed store, hash-verified

61 }
62
63 async executeObjdump(
64 objdumperPath: string,
65 args: string[],
66 execOptions: ExecutionOptions,
67 exec: (filepath: string, args: string[], options: ExecutionOptions) => Promise<UnprocessedExecResult>,
68 ): Promise<ObjdumpResult> {
69 const objResult = await exec(objdumperPath, args, execOptions);
70
71 if (objResult.code === 0) {
72 return {
73 code: 0,
74 objdumpTime: objResult.execTime.toString(),
75 asm: objResult.stdout,
76 };
77 }
78 return {
79 code: objResult.code,
80 stderr: objResult.stderr,
81 };
82 }
83
84 // There's no way in TS to do an abstract static members and interfaces don't allow "static" at all.
85 // There's apparently a hack with InstanceType but I couldn't get it working. I think this is the best solution.

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected