MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / PaholeTool

Class PaholeTool

lib/tooling/pahole-tool.ts:29–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27import {BaseTool} from './base-tool.js';
28
29export class PaholeTool extends BaseTool {
30 static get key() {
31 return 'pahole-tool';
32 }
33
34 override async runTool(compilationInfo: CompilationInfo, inputFilepath?: string, args?: string[]) {
35 if (!compilationInfo.filters.binary && !compilationInfo.filters.binaryObject) {
36 return this.createErrorResponse(`${this.tool.name ?? 'Pahole'} requires an executable or binary object`);
37 }
38
39 if (await utils.fileExists(compilationInfo.executableFilename)) {
40 return super.runTool(compilationInfo, compilationInfo.executableFilename, args);
41 }
42 return super.runTool(compilationInfo, compilationInfo.outputFilename, args);
43 }
44}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected