| Win32-2.1.1.1: A binding to part of the Win32 library | Source code | Contents | Index

System.Win32.DebugApi

Portability | portable
Stability | provisional
Maintainer | Esa Ilari Vuokko <ei@vuokko.info>

Description
A collection of FFI declarations for using Windows DebugApi.
Documentation

type PID = DWORD | Source

type TID = DWORD | Source

type DebugEventId = (PID, TID) | Source

type ForeignAddress = Word32 | Source

type PHANDLE = Ptr () | Source

type THANDLE = Ptr () | Source

type ThreadInfo = (THANDLE, ForeignAddress, ForeignAddress) | Source

type ImageInfo = (HANDLE, ForeignAddress, DWORD, DWORD, ForeignAddress) | Source

type ExceptionInfo = (Bool, Bool, ForeignAddress) | Source

data Exception | Source

Constructors

UnknownException |
AccessViolation Bool ForeignAddress |
ArrayBoundsExceeded |
Breakpoint |
DataTypeMisalignment |
FltDenormalOperand |
FltDivideByZero |
FltInexactResult |
FltInvalidOperation |
FltOverflow |
FltStackCheck |
FltUnderflow |
IllegalInstruction |
InPageError |
IntDivideByZero |
IntOverflow |
InvalidDisposition |
NonContinuable |
PrivilegedInstruction |
SingleStep |
StackOverflow |

Instances

Show Exception

data DebugEventInfo | Source

Constructors

UnknownDebugEvent |
Exception ExceptionInfo Exception |
CreateThread ThreadInfo |
CreateProcess PHANDLE ImageInfo ThreadInfo |
ExitThread TID |
ExitProcess PID |
LoadDll ImageInfo |
UnloadDll TID |
DebugString ForeignAddress Bool WORD |

Instances

Show DebugEventInfo

type DebugEvent = (DebugEventId, DebugEventInfo) | Source

peekDebugEvent :: Ptr a -> IO DebugEvent | Source

waitForDebugEvent :: Maybe Int -> IO (Maybe DebugEvent) | Source

getDebugEvents :: Int -> IO [DebugEvent] | Source

continueDebugEvent :: DebugEventId -> Bool -> IO () | Source

debugActiveProcess :: PID -> IO () | Source

peekProcessMemory :: PHANDLE -> ForeignAddress -> Int -> Ptr a -> IO () | Source

readProcessMemory :: PHANDLE -> ForeignAddress -> Int -> IO (ForeignPtr a) | Source

pokeProcessMemory :: PHANDLE -> ForeignAddress -> Int -> Ptr a -> IO () | Source

withProcessMemory :: PHANDLE -> ForeignAddress -> Int -> (Ptr a -> IO b) -> IO b | Source

peekP :: Storable a => PHANDLE -> ForeignAddress -> IO a | Source

pokeP :: Storable a => PHANDLE -> ForeignAddress -> a -> IO () | Source

suspendThread :: THANDLE -> IO DWORD | Source

resumeThread :: THANDLE -> IO DWORD | Source

withSuspendedThread :: THANDLE -> IO a -> IO a | Source

getThreadContext :: THANDLE -> Ptr a -> IO () | Source

setThreadContext :: THANDLE -> Ptr a -> IO () | Source

useAllRegs :: Ptr a -> IO () | Source

withThreadContext :: THANDLE -> (Ptr a -> IO b) -> IO b | Source

eax :: Int | Source

ebx :: Int | Source

ecx :: Int | Source

edx :: Int | Source

esi :: Int | Source

edi :: Int | Source

ebp :: Int | Source

eip :: Int | Source

esp :: Int | Source

segCs :: Int | Source

segDs :: Int | Source

segEs :: Int | Source

segFs :: Int | Source

segGs :: Int | Source

eFlags :: Int | Source

dr :: Int -> Int | Source

setReg :: Ptr a -> Int -> DWORD -> IO () | Source

getReg :: Ptr a -> Int -> IO DWORD | Source

modReg :: Ptr a -> Int -> (DWORD -> DWORD) -> IO DWORD | Source

makeModThreadContext :: [(Int, DWORD -> DWORD)] -> Ptr a -> IO [DWORD] | Source

modifyThreadContext :: THANDLE -> [(Int, DWORD -> DWORD)] -> IO [DWORD] | Source

outputDebugString :: String -> IO () | Source

c_SuspendThread :: THANDLE -> IO DWORD | Source

c_ResumeThread :: THANDLE -> IO DWORD | Source

c_WaitForDebugEvent :: Ptr () -> DWORD -> IO BOOL | Source

c_ContinueDebugEvent :: DWORD -> DWORD -> DWORD -> IO BOOL | Source

c_DebugActiveProcess :: DWORD -> IO Bool | Source

c_ReadProcessMemory :: PHANDLE -> Ptr () -> Ptr Word8 -> DWORD -> Ptr DWORD -> IO BOOL | Source

c_WriteProcessMemory :: PHANDLE -> Ptr () -> Ptr Word8 -> DWORD -> Ptr DWORD -> IO BOOL | Source

c_GetThreadContext :: THANDLE -> Ptr () -> IO BOOL | Source

c_SetThreadContext :: THANDLE -> Ptr () -> IO BOOL | Source

c_OutputDebugString :: LPTSTR -> IO () | Source

isDebuggerPresent :: IO BOOL | Source

debugBreak :: IO () | Source

Produced by Haddock version 0.8