diff options
author | Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> | 2023-05-17 14:30:04 -0400 |
---|---|---|
committer | Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> | 2023-05-17 14:30:04 -0400 |
commit | 4fa8958d6c5642ac90f47d313bfb09f04cc2c72c (patch) | |
tree | 31049471332e6a0f579be7b8473d996ff16fd247 | |
parent | 3dec060b4cb2be00dc2598d9f2f39ac5a0d0e71f (diff) | |
download | compiler-explorer-gh-7412.tar.gz compiler-explorer-gh-7412.zip |
Add readelf to c/c++.defaults.properties and clarify an error message for readelf and paholegh-7412
-rw-r--r-- | etc/config/c++.defaults.properties | 9 | ||||
-rw-r--r-- | etc/config/c.defaults.properties | 9 | ||||
-rw-r--r-- | lib/tooling/pahole-tool.ts | 4 | ||||
-rw-r--r-- | lib/tooling/readelf-tool.ts | 4 |
4 files changed, 22 insertions, 4 deletions
diff --git a/etc/config/c++.defaults.properties b/etc/config/c++.defaults.properties index b06851816..14b6c0695 100644 --- a/etc/config/c++.defaults.properties +++ b/etc/config/c++.defaults.properties @@ -50,7 +50,7 @@ compiler.clang12.name=clang 12 compiler.clangdefault.exe=/usr/bin/clang++ compiler.clangdefault.name=clang default -tools=clangquerydefault:clangtidydefault:clangquery7:clangquery8:clangquery9:clangquery10:clangquery11:clangquery12:strings:ldd +tools=clangquerydefault:clangtidydefault:clangquery7:clangquery8:clangquery9:clangquery10:clangquery11:clangquery12:strings:ldd:readelf tools.clangquerydefault.exe=/usr/bin/clang-query tools.clangquerydefault.name=clang-query (default) @@ -108,6 +108,13 @@ tools.ldd.class=readelf-tool tools.ldd.exclude=djggp tools.ldd.stdinHint=disabled +tools.readelf.name=readelf (default) +tools.readelf.exe=/usr/bin/readelf +tools.readelf.type=postcompilation +tools.readelf.class=readelf-tool +tools.readelf.exclude=djggp +tools.readelf.stdinHint=disabled + tools.strings.exe=/usr/bin/strings tools.strings.name=strings tools.strings.type=postcompilation diff --git a/etc/config/c.defaults.properties b/etc/config/c.defaults.properties index 8014adbf4..839860b23 100644 --- a/etc/config/c.defaults.properties +++ b/etc/config/c.defaults.properties @@ -59,7 +59,7 @@ compiler.cclangdefault.name=clang default compiler.cclangccdefault.exe=/usr/bin/clangcc compiler.cclangccdefault.name=clang default -tools=clangquerydefault:clangtidydefault +tools=clangquerydefault:clangtidydefault:readelf tools.clangquerydefault.exe=/usr/bin/clang-query tools.clangquerydefault.name=clang-query (default) @@ -73,3 +73,10 @@ tools.clangtidydefault.name=clang-tidy (default) tools.clangtidydefault.type=independent tools.clangtidydefault.class=clang-tidy-tool tools.clangtidydefault.stdinHint=disabled + +tools.readelf.name=readelf (default) +tools.readelf.exe=/usr/bin/readelf +tools.readelf.type=postcompilation +tools.readelf.class=readelf-tool +tools.readelf.exclude=djggp +tools.readelf.stdinHint=disabled diff --git a/lib/tooling/pahole-tool.ts b/lib/tooling/pahole-tool.ts index 84c5caaf0..c5d931816 100644 --- a/lib/tooling/pahole-tool.ts +++ b/lib/tooling/pahole-tool.ts @@ -33,7 +33,9 @@ export class PaholeTool extends BaseTool { override async runTool(compilationInfo: Record<any, any>, inputFilepath?: string, args?: string[]) { if (!compilationInfo.filters.binary && !compilationInfo.filters.binaryObject) { - return this.createErrorResponse(`${this.tool.name ? this.tool.name : 'Pahole'} requires an executable`); + return this.createErrorResponse( + `${this.tool.name ? this.tool.name : 'Pahole'} requires an executable or binary object`, + ); } if (await fs.pathExists(compilationInfo.executableFilename)) { diff --git a/lib/tooling/readelf-tool.ts b/lib/tooling/readelf-tool.ts index 6899c2a2d..28b301a4a 100644 --- a/lib/tooling/readelf-tool.ts +++ b/lib/tooling/readelf-tool.ts @@ -33,7 +33,9 @@ export class ReadElfTool extends BaseTool { override async runTool(compilationInfo: Record<any, any>, inputFilepath?: string, args?: string[]) { if (!compilationInfo.filters.binary && !compilationInfo.filters.binaryObject) { - return this.createErrorResponse(`${this.tool.name ? this.tool.name : 'readelf'} requires an executable`); + return this.createErrorResponse( + `${this.tool.name ? this.tool.name : 'readelf'} requires an executable or binary object`, + ); } if (await fileExists(compilationInfo.executableFilename)) { |