@@ -269,7 +269,7 @@ unsafe fn ptrace_other(
269269 . map ( |_| 0 )
270270}
271271
272- /// Set options, as with `ptrace(PTRACE_SETOPTIONS,...)`.
272+ /// Set options, as with `ptrace(PTRACE_SETOPTIONS, ...)`.
273273pub fn setoptions ( pid : Pid , options : Options ) -> Result < ( ) > {
274274 let res = unsafe {
275275 libc:: ptrace (
@@ -282,17 +282,17 @@ pub fn setoptions(pid: Pid, options: Options) -> Result<()> {
282282 Errno :: result ( res) . map ( drop)
283283}
284284
285- /// Gets a ptrace event as described by `ptrace(PTRACE_GETEVENTMSG,...)`
285+ /// Gets a ptrace event as described by `ptrace(PTRACE_GETEVENTMSG, ...)`
286286pub fn getevent ( pid : Pid ) -> Result < c_long > {
287287 ptrace_get_data :: < c_long > ( Request :: PTRACE_GETEVENTMSG , pid)
288288}
289289
290- /// Get siginfo as with `ptrace(PTRACE_GETSIGINFO,...)`
290+ /// Get siginfo as with `ptrace(PTRACE_GETSIGINFO, ...)`
291291pub fn getsiginfo ( pid : Pid ) -> Result < siginfo_t > {
292292 ptrace_get_data :: < siginfo_t > ( Request :: PTRACE_GETSIGINFO , pid)
293293}
294294
295- /// Set siginfo as with `ptrace(PTRACE_SETSIGINFO,...)`
295+ /// Set siginfo as with `ptrace(PTRACE_SETSIGINFO, ...)`
296296pub fn setsiginfo ( pid : Pid , sig : & siginfo_t ) -> Result < ( ) > {
297297 let ret = unsafe {
298298 Errno :: clear ( ) ;
@@ -517,12 +517,14 @@ pub fn sysemu_step<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
517517 }
518518}
519519
520- /// Reads a word from a processes memory at the given address
520+ /// Reads a word from a processes memory at the given address, as with
521+ /// ptrace(PTRACE_PEEKDATA, ...)
521522pub fn read ( pid : Pid , addr : AddressType ) -> Result < c_long > {
522523 ptrace_peek ( Request :: PTRACE_PEEKDATA , pid, addr, ptr:: null_mut ( ) )
523524}
524525
525- /// Writes a word into the processes memory at the given address
526+ /// Writes a word into the processes memory at the given address, as with
527+ /// ptrace(PTRACE_POKEDATA, ...)
526528///
527529/// # Safety
528530///
@@ -536,13 +538,13 @@ pub unsafe fn write(
536538 ptrace_other ( Request :: PTRACE_POKEDATA , pid, addr, data) . map ( drop)
537539}
538540
539- /// Reads a word from a user area at `offset`.
541+ /// Reads a word from a user area at `offset`, as with ptrace(PTRACE_PEEKUSER, ...) .
540542/// The user struct definition can be found in `/usr/include/sys/user.h`.
541543pub fn read_user ( pid : Pid , offset : AddressType ) -> Result < c_long > {
542544 ptrace_peek ( Request :: PTRACE_PEEKUSER , pid, offset, ptr:: null_mut ( ) )
543545}
544546
545- /// Writes a word to a user area at `offset`.
547+ /// Writes a word to a user area at `offset`, as with ptrace(PTRACE_POKEUSER, ...) .
546548/// The user struct definition can be found in `/usr/include/sys/user.h`.
547549///
548550/// # Safety
0 commit comments