W3cubDocs

/Haskell 9

System.Win32.DebugApi

Copyright (c) Esa Ilari Vuokko 2006
License BSD-style (see the file LICENSE)
Maintainer Esa Ilari Vuokko <[email protected]>
Stability provisional
Portability portable
Safe Haskell Safe
Language Haskell2010

Description

A collection of FFI declarations for using Windows DebugApi.

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

Instances
Instances details
Show Exception Source
Instance details

Defined in System.Win32.DebugApi

data DebugEventInfo Source

Instances
Instances details
Show DebugEventInfo Source
Instance details

Defined in System.Win32.DebugApi

type DebugEvent = (DebugEventId, DebugEventInfo) Source

debugBreak :: IO () Source

isDebuggerPresent :: IO BOOL Source

Debug events

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

getDebugEvents :: Int -> IO [DebugEvent] Source

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

Debugging another process

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

Thread control

suspendThread :: THANDLE -> IO DWORD Source

resumeThread :: THANDLE -> IO DWORD Source

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

Thread register control

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

rax :: Int Source

rbx :: Int Source

rcx :: Int Source

rdx :: Int Source

rsi :: Int Source

rdi :: Int Source

rbp :: Int Source

rip :: Int Source

rsp :: 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

Sending debug output to another process

outputDebugString :: String -> IO () Source

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.12.1/docs/libraries/Win32-2.14.1.0-d391/System-Win32-DebugApi.html