foxdec-0.1.0.0: Formally Verified x86-64 Decompilation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Binary.Generic

Synopsis

Documentation

data SectionsInfo Source #

Information on the sections in the binary

Constructors

SectionsInfo 

Fields

Instances

Instances details
Generic SectionsInfo Source # 
Instance details

Defined in Binary.Generic

Associated Types

type Rep SectionsInfo :: Type -> Type #

Show SectionsInfo Source # 
Instance details

Defined in Binary.Generic

Serialize SectionsInfo Source # 
Instance details

Defined in Binary.Generic

Eq SectionsInfo Source # 
Instance details

Defined in Binary.Generic

type Rep SectionsInfo Source # 
Instance details

Defined in Binary.Generic

type Rep SectionsInfo = D1 ('MetaData "SectionsInfo" "Binary.Generic" "foxdec-0.1.0.0-DGuc5MMkhbvOBLAebyTd5" 'False) (C1 ('MetaCons "SectionsInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "si_sections") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(String, String, Word64, Word64, Word64)]) :*: (S1 ('MetaSel ('Just "si_min_address") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "si_max_address") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))))

data SymbolTable Source #

Instances

Instances details
Generic SymbolTable Source # 
Instance details

Defined in Binary.Generic

Associated Types

type Rep SymbolTable :: Type -> Type #

Show SymbolTable Source # 
Instance details

Defined in Binary.Generic

Serialize SymbolTable Source # 
Instance details

Defined in Binary.Generic

Eq SymbolTable Source # 
Instance details

Defined in Binary.Generic

type Rep SymbolTable Source # 
Instance details

Defined in Binary.Generic

type Rep SymbolTable = D1 ('MetaData "SymbolTable" "Binary.Generic" "foxdec-0.1.0.0-DGuc5MMkhbvOBLAebyTd5" 'False) (C1 ('MetaCons "SymbolTable" 'PrefixI 'True) (S1 ('MetaSel ('Just "symboltable_symbols") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IntMap Symbol)) :*: S1 ('MetaSel ('Just "symboltable_exterbals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set String))))

data Relocation Source #

Constructors

Relocation Word64 Word64

8: At address a0, address a1 has been written, i.e., qword ptr[a0] == a1

Instances

Instances details
Generic Relocation Source # 
Instance details

Defined in Binary.Generic

Associated Types

type Rep Relocation :: Type -> Type #

Show Relocation Source # 
Instance details

Defined in Binary.Generic

Serialize Relocation Source # 
Instance details

Defined in Binary.Generic

Eq Relocation Source # 
Instance details

Defined in Binary.Generic

Ord Relocation Source # 
Instance details

Defined in Binary.Generic

type Rep Relocation Source # 
Instance details

Defined in Binary.Generic

type Rep Relocation = D1 ('MetaData "Relocation" "Binary.Generic" "foxdec-0.1.0.0-DGuc5MMkhbvOBLAebyTd5" 'False) (C1 ('MetaCons "Relocation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64)))

class BinaryClass a where Source #

is_roughly_an_address Source #

Arguments

:: BinaryClass bin 
=> bin

The binary

-> Word64

An address

-> Bool 

Is the immediate roughly in range to be an address?

find_section_for_address Source #

Arguments

:: BinaryClass bin 
=> bin

The binary

-> Word64

An address

-> Maybe (String, String, Word64, Word64, Word64) 

Find a section for an address (see SectionsInfo)

read_from_ro_datasection Source #

Arguments

:: BinaryClass bin 
=> bin

The binary

-> Word64

An address

-> Int

Size, i.e., the number of bytes to read

-> Maybe Word64 

Reading from a read-only data section.

Reads maximally up to 8 bytes. Returns Nothing if the given address is out-of-range.

find_section_ending_at Source #

Arguments

:: BinaryClass bin 
=> bin

The binary

-> Word64

An address

-> Maybe (String, String, Word64, Word64, Word64) 

Find a section ending at address (see SectionsInfo)

fetch_instruction Source #

Arguments

:: BinaryClass bin 
=> bin 
-> Word64

An address

-> Maybe Instruction 

Fetching an instruction Returns Nothing if the given address is out-of-range.

address_has_instruction Source #

Arguments

:: BinaryClass bin 
=> bin 
-> Word64

An address

-> Bool 

Returns true iff an instruction can be fetched from the address.