Skip to content

Commit 1c2ce25

Browse files
committed
Revert changes for objdump
Sadly it doesn't seem to be working.
1 parent 50162dd commit 1c2ce25

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/auditor/instruction_set.jl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using JSON
2-
using Binutils_jll: Binutils_jll
32

43
## We start with definitions of instruction mnemonics, broken down by category:
54
const instruction_categories = JSON.parsefile(joinpath(@__DIR__, "instructions.json");
@@ -37,17 +36,12 @@ function instruction_mnemonics(path::AbstractString, platform::AbstractPlatform)
3736
output = IOBuffer()
3837

3938
# Run objdump to disassemble the input binary
40-
objdump_args = `-d $(basename(path))`
41-
if Binutils_jll.is_available() && (Sys.islinux(platform) || Sys.isfreebsd(platform))
42-
run(pipeline(ignorestatus(`$(Binutils_jll.objdump()) $(objdump_args)`); stdout=output, stderr=devnull))
39+
if Sys.isbsd(platform)
40+
objdump_cmd = "llvm-objdump -d $(basename(path))"
4341
else
44-
if Sys.isbsd(platform)
45-
objdump_cmd = "llvm-objdump $(objdump_args)"
46-
else
47-
objdump_cmd = "\${target}-objdump $(objdump_args)"
48-
end
49-
@lock AUDITOR_SANDBOX_LOCK run_interactive(ur, Cmd(`/bin/bash -c "$(objdump_cmd)"`; ignorestatus=true); stdout=output, stderr=devnull)
42+
objdump_cmd = "\${target}-objdump -d $(basename(path))"
5043
end
44+
@lock AUDITOR_SANDBOX_LOCK run_interactive(ur, Cmd(`/bin/bash -c "$(objdump_cmd)"`; ignorestatus=true); stdout=output, stderr=devnull)
5145
seekstart(output)
5246

5347
for line in eachline(output)

0 commit comments

Comments
 (0)