1 (* Copyright (C
) 1999-2006 Henry Cejtin
, Matthew Fluet
, Suresh
2 * Jagannathan
, and Stephen Weeks
.
3 * Copyright (C
) 1997-2000 NEC Research Institute
.
5 * MLton is released under a BSD
-style license
.
6 * See the file MLton
-LICENSE for details
.
9 structure MLtonPtrace
: MLTON_PTRACE
=
16 fun make request pid
= PosixError
.checkResult(ptrace2(request
, pid
))
18 val attach
= make ATTACH
20 val detach
= make DETACH
22 val singleStep
= make SINGLESTEP
23 val sysCall
= make SYSCALL
28 fun peekText(pid
, addr
) =
29 let val data
: word ref
= ref
0w0
30 in PosixError
.checkResult(ptrace4(PEEKTEXT
, pid
, addr
, data
))