hdis86-0.2: Interface to the udis86 disassembler for x86 and x86-64 / AMD64

Hdis86.Pure

Contents

Description

Interface to the udis86 disassembler.

This is the simplest, most high-level interface.

See Hdis86.IO if you need more control or performance.

Synopsis

Simple disassembly

disassemble :: Config -> ByteString -> [Instruction]Source

Disassemble machine code.

Common values for Config such as intel32 or amd64 are provided in Hdis86.Types.

The output is produced lazily.

Disassembly with full metadata

disassembleMetadata :: Config -> ByteString -> [Metadata]Source

Disassemble machine code, with full metadata.

The output is produced lazily.

data Metadata Source

An instruction with full metadata.

Constructors

Metadata 

Fields

mdOffset :: Word64

Offset of the start of this instruction

mdLength :: Word

Length of this instruction in bytes

mdHex :: String

Hexadecimal representation of this instruction

mdBytes :: ByteString

Bytes that make up this instruction

mdAssembly :: String

Assembly code for this instruction

mdInst :: Instruction

The instruction itself