| Copyright | (c) Adrian Herrera 2016 |
|---|---|
| License | GPL-2 |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Heystone.Internal.Keystone
Contents
Description
Low-level bindings for the Keystone assembler engine.
This module should not be directly imported; it is only exposed because of the way cabal handles ordering of chs files.
Synopsis
- data Architecture
- data Mode
- data OptionType
- data OptionValue
- ksOpen :: Architecture -> [Mode] -> IO (Error, EnginePtr)
- ksOption :: Engine -> OptionType -> OptionValue -> IO Error
- ksFree :: Ptr CUChar -> IO ()
- ksAsm :: Engine -> String -> Word64 -> IO (Int, Ptr CUChar, Int, Int)
- ksVersion :: Ptr CUInt -> Ptr CUInt -> Int
- ksErrno :: Engine -> IO Error
- ksStrerror :: Error -> String
Types
data Architecture Source #
CPU architecture.
Constructors
| ArchArm | |
| ArchArm64 | |
| ArchMips | |
| ArchX86 | |
| ArchPpc | |
| ArchSparc | |
| ArchSystemz | |
| ArchHexagon | |
| ArchEvm | |
| ArchMax |
Instances
| Bounded Architecture Source # | |
Defined in Heystone.Internal.Keystone | |
| Enum Architecture Source # | |
Defined in Heystone.Internal.Keystone Methods succ :: Architecture -> Architecture # pred :: Architecture -> Architecture # toEnum :: Int -> Architecture # fromEnum :: Architecture -> Int # enumFrom :: Architecture -> [Architecture] # enumFromThen :: Architecture -> Architecture -> [Architecture] # enumFromTo :: Architecture -> Architecture -> [Architecture] # enumFromThenTo :: Architecture -> Architecture -> Architecture -> [Architecture] # | |
| Show Architecture Source # | |
Defined in Heystone.Internal.Keystone Methods showsPrec :: Int -> Architecture -> ShowS # show :: Architecture -> String # showList :: [Architecture] -> ShowS # | |
| Eq Architecture Source # | |
Defined in Heystone.Internal.Keystone | |
CPU hardware mode.
Constructors
| ModeLittleEndian | |
| ModeArm | |
| Mode16 | |
| ModeMips32 | |
| Mode32 | |
| ModePpc32 | |
| ModeSparc32 | |
| ModeMips64 | |
| Mode64 | |
| ModePpc64 | |
| ModeSparc64 | |
| ModeThumb | |
| ModeMicro | |
| ModeQpx | |
| ModeV9 | |
| ModeMips3 | |
| ModeV8 | |
| ModeMips32r6 | |
| ModeBigEndian |
data OptionType Source #
Runtime option types.
Constructors
| OptSyntax | |
| OptSymResolver |
Instances
| Bounded OptionType Source # | |
Defined in Heystone.Internal.Keystone | |
| Enum OptionType Source # | |
Defined in Heystone.Internal.Keystone Methods succ :: OptionType -> OptionType # pred :: OptionType -> OptionType # toEnum :: Int -> OptionType # fromEnum :: OptionType -> Int # enumFrom :: OptionType -> [OptionType] # enumFromThen :: OptionType -> OptionType -> [OptionType] # enumFromTo :: OptionType -> OptionType -> [OptionType] # enumFromThenTo :: OptionType -> OptionType -> OptionType -> [OptionType] # | |
| Show OptionType Source # | |
Defined in Heystone.Internal.Keystone Methods showsPrec :: Int -> OptionType -> ShowS # show :: OptionType -> String # showList :: [OptionType] -> ShowS # | |
| Eq OptionType Source # | |
Defined in Heystone.Internal.Keystone | |
data OptionValue Source #
Runtime option values.
Constructors
| SyntaxIntel | |
| SyntaxAtt | |
| SyntaxNasm | |
| SyntaxMasm | |
| SyntaxGas | |
| SyntaxRadix16 |
Instances
| Bounded OptionValue Source # | |
Defined in Heystone.Internal.Keystone | |
| Enum OptionValue Source # | |
Defined in Heystone.Internal.Keystone Methods succ :: OptionValue -> OptionValue # pred :: OptionValue -> OptionValue # toEnum :: Int -> OptionValue # fromEnum :: OptionValue -> Int # enumFrom :: OptionValue -> [OptionValue] # enumFromThen :: OptionValue -> OptionValue -> [OptionValue] # enumFromTo :: OptionValue -> OptionValue -> [OptionValue] # enumFromThenTo :: OptionValue -> OptionValue -> OptionValue -> [OptionValue] # | |
| Show OptionValue Source # | |
Defined in Heystone.Internal.Keystone Methods showsPrec :: Int -> OptionValue -> ShowS # show :: OptionValue -> String # showList :: [OptionValue] -> ShowS # | |
| Eq OptionValue Source # | |
Defined in Heystone.Internal.Keystone | |
Function bindings
ksOption :: Engine -> OptionType -> OptionValue -> IO Error Source #
ksStrerror :: Error -> String Source #