Copyright | (c) Adrian Herrera 2016 |
---|---|
License | GPL-2 |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Defines core Keystone components.
This module should not be directly imported; it is only exposed because of the way cabal handles ordering of chs files.
Synopsis
- newtype Engine = Engine (ForeignPtr Engine)
- withEngine :: Engine -> (Ptr Engine -> IO b) -> IO b
- type EnginePtr = Ptr Engine
- mkEngine :: EnginePtr -> IO Engine
- data Error
- = ErrOk
- | ErrNomem
- | ErrArch
- | ErrHandle
- | ErrMode
- | ErrVersion
- | ErrOptInvalid
- | ErrAsmExprToken
- | ErrAsmDirectiveValueRange
- | ErrAsmDirectiveId
- | ErrAsmDirectiveToken
- | ErrAsmDirectiveStr
- | ErrAsmDirectiveComma
- | ErrAsmDirectiveRelocName
- | ErrAsmDirectiveRelocToken
- | ErrAsmDirectiveFpoint
- | ErrAsmDirectiveUnknown
- | ErrAsmDirectiveEqu
- | ErrAsmDirectiveInvalid
- | ErrAsmVariantInvalid
- | ErrAsmExprBracket
- | ErrAsmSymbolModifier
- | ErrAsmSymbolRedefined
- | ErrAsmSymbolMissing
- | ErrAsmRparen
- | ErrAsmStatToken
- | ErrAsmUnsupported
- | ErrAsmMacroToken
- | ErrAsmMacroParen
- | ErrAsmMacroEqu
- | ErrAsmMacroArgs
- | ErrAsmMacroLevelsExceed
- | ErrAsmMacroStr
- | ErrAsmMacroInvalid
- | ErrAsmEscBackslash
- | ErrAsmEscOctal
- | ErrAsmEscSequence
- | ErrAsmEscStr
- | ErrAsmTokenInvalid
- | ErrAsmInsnUnsupported
- | ErrAsmFixupInvalid
- | ErrAsmLabelInvalid
- | ErrAsmFragmentInvalid
- | ErrAsmInvalidoperand
- | ErrAsmMissingfeature
- | ErrAsmMnemonicfail
- type Assembler a = ExceptT Error IO a
- close :: FinalizerPtr Engine
Documentation
mkEngine :: EnginePtr -> IO Engine Source #
Make a new Keystone engine out of an engine pointer. The returned Keystone
engine will automatically call ks_close_wrapper
when it goes out of scope.
Errors encountered by the Keystone API. These values are returned by
errno
.