hapstone-0.2.0.1: Capstone bindings for Haskell

Copyright(c) Inokentiy Babushkin, 2016
LicenseBSD3
MaintainerInokentiy Babushkin <inokentiy.babushkin@googlemail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Hapstone.Capstone

Description

This module wraps all the complex and unsafe details of the capstone API to provide a simple interface to a disassembler, while retaining a reasonable level of versatility.

TODO: write a proper user guide here.

Synopsis

Documentation

disasmIO :: Disassembler a -> IO (Either CsErr [(CsInsn, a)]) Source #

run a Disassembler, keeping the results of the custom action

disasmSimpleIO :: Disassembler a -> IO (Either CsErr [CsInsn]) Source #

run a disassembler, throwing away the results of the custom action

data Disassembler a Source #

a structure holding settings for a disassembling action

Constructors

Disassembler 

Fields

defaultSkipdataStruct :: CsSkipdataStruct Source #

default setup for skipdata: ".db" string and no callback

defaultAction :: Csh -> CsInsn -> IO () Source #

default action to run on each instruction (does nothing)

mkCallback :: Storable a => (Storable a => ([Word8], [Word8]) -> a -> IO CSize) -> IO CsSkipdataCallback Source #

wrap a relatively safe function to get a callback "safe" in this context means that the buffer remains unmodified