AED(1) General Commands Manual AED(1)

aedanton's encoder decoder

aed -d [-136S] [-c cpu] [-M disassembler] [-s symbol] [path]

aed -l

The aed utility decodes the x86 instruction set architecture. By default, input is read from standard input. The following file formats are recognized:

The options are as follows:

Disassemble in 16-bit mode.
Disassemble in 32-bit mode.
Disassemble in 64-bit mode. (default)
cpu
Disassemble targeting cpu. See option -l for all available CPU types. Defaults to latest.
Disassemble all executable sections found in the input files.
List all available CPU types.
disassembler
Disassembler options, the following values are recognized:
encoder
Show how to encode each disassembled instruction using the aed_x86_encoder(3) API.
intel
Serialize disassembled instructions using the Intel® syntax. (default)
sdm
Serialize disassembled instructions using the Intel® Software Development Manual (SDM) syntax.
Display source code interleaved with the disassembly, implies -d. Source code lines are prefixed with ‘;’, followed by the source code line number. The line number may be prefixed with a symbol name, indicating that corresponding line originates from an inlined symbol. All instructions following a source code line are associated with the same line, up to the next source code line.

If path includes debug symbols, disassembled instructions may be suffixed with ‘#’ followed by a description of which variables in the source code the register operands represents.

symbol
Only disassemble symbol.
path
Path to input file.

Disassemble an ELF binary:

$ aed -d `which aed`

Disassemble instructions in hexadecimal format:

$ echo 0000 0x90 | aed -d

Disassemble instructions in raw format:

$ printf '\x00\x00\x90' | aed -d

The aed utility exits 0 on success, and >0 if an error occurs.

Anton Lindqvist <anton@basename.se>

OpenBSD 7.8 October 1, 2024 AED(1)