foxdec-0.1.0.0: Formally Verified x86-64 Decompilation
Safe HaskellNone
LanguageHaskell2010

Generic.Binary

Synopsis

Documentation

data SectionsInfo Source #

Information on the sections in the binary

Constructors

SectionsInfo 

Fields

Instances

Instances details
Eq SectionsInfo Source # 
Instance details

Defined in Generic.Binary

Show SectionsInfo Source # 
Instance details

Defined in Generic.Binary

Generic SectionsInfo Source # 
Instance details

Defined in Generic.Binary

Associated Types

type Rep SectionsInfo :: Type -> Type #

Serialize SectionsInfo Source # 
Instance details

Defined in Analysis.Context

NFData SectionsInfo Source # 
Instance details

Defined in Analysis.Context

Methods

rnf :: SectionsInfo -> () #

type Rep SectionsInfo Source # 
Instance details

Defined in Generic.Binary

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

data Symbol Source #

An address a0 can have a symbol.

Relocated_Function: E.g: 0xcfe0 --> malloc Means that reading 8 bytes from address 0xcfe0 procudes a pointer to malloc. Thus an instruction: "CALL qword ptr [0xcfe0]" can be seen as "CALL malloc".

Relocated_Object: E.g.: 0xd0a8 --> stdout Means that "mov rdi,QWORD PTR [0xd0a8]" can be seen as "mov rdi, QWORD PTR [stdout]"

Relocated_Address: E.g.: 0xaaa -> 0xbbbb Means that reading 8 bytes from address 0xaaaa produces the value 0xbbbb

Constructors

Relocated_Function String

Address a0 is a pointer to memory storing the entry of an external function

Relocated_Label String

Address a0 can be replaced by the string, e.g., "stdout" or "optind"

Internal_Label String

Address a0 can be replaced by the string.

Instances

Instances details
Eq Symbol Source # 
Instance details

Defined in Generic.Binary

Methods

(==) :: Symbol -> Symbol -> Bool #

(/=) :: Symbol -> Symbol -> Bool #

Show Symbol Source # 
Instance details

Defined in Generic.Binary

Generic Symbol Source # 
Instance details

Defined in Generic.Binary

Associated Types

type Rep Symbol :: Type -> Type #

Methods

from :: Symbol -> Rep Symbol x #

to :: Rep Symbol x -> Symbol #

Serialize Symbol Source # 
Instance details

Defined in Analysis.Context

NFData Symbol Source # 
Instance details

Defined in Analysis.Context

Methods

rnf :: Symbol -> () #

type Rep Symbol Source # 
Instance details

Defined in Generic.Binary

type Rep Symbol = D1 ('MetaData "Symbol" "Generic.Binary" "foxdec-0.1.0.0-F8J4QQ8bsQELJyhc4kJb0m" 'False) (C1 ('MetaCons "Relocated_Function" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "Relocated_Label" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Internal_Label" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String))))

data SymbolTable Source #

Constructors

SymbolTable (IntMap Symbol) 

Instances

Instances details
Eq SymbolTable Source # 
Instance details

Defined in Generic.Binary

Show SymbolTable Source # 
Instance details

Defined in Generic.Binary

Generic SymbolTable Source # 
Instance details

Defined in Generic.Binary

Associated Types

type Rep SymbolTable :: Type -> Type #

Serialize SymbolTable Source # 
Instance details

Defined in Analysis.Context

NFData SymbolTable Source # 
Instance details

Defined in Analysis.Context

Methods

rnf :: SymbolTable -> () #

type Rep SymbolTable Source # 
Instance details

Defined in Generic.Binary

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

is_internal_symbol :: Symbol -> Bool Source #

Is the symbol an internal label?

is_external_symbol :: Symbol -> Bool Source #

Is the symbol an external label?

symbol_to_name :: Symbol -> Maybe String Source #

Returns the name from the symbol

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
Eq Relocation Source # 
Instance details

Defined in Generic.Binary

Ord Relocation Source # 
Instance details

Defined in Generic.Binary

Show Relocation Source # 
Instance details

Defined in Generic.Binary

Generic Relocation Source # 
Instance details

Defined in Generic.Binary

Associated Types

type Rep Relocation :: Type -> Type #

Serialize Relocation Source # 
Instance details

Defined in Analysis.Context

NFData Relocation Source # 
Instance details

Defined in Analysis.Context

Methods

rnf :: Relocation -> () #

type Rep Relocation Source # 
Instance details

Defined in Generic.Binary

type Rep Relocation = D1 ('MetaData "Relocation" "Generic.Binary" "foxdec-0.1.0.0-F8J4QQ8bsQELJyhc4kJb0m" '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)))