@@ -269,7 +269,7 @@ unsafe fn ptrace_other(
269
269
. map ( |_| 0 )
270
270
}
271
271
272
- /// Set options, as with `ptrace(PTRACE_SETOPTIONS,...)`.
272
+ /// Set options, as with `ptrace(PTRACE_SETOPTIONS, ...)`.
273
273
pub fn setoptions ( pid : Pid , options : Options ) -> Result < ( ) > {
274
274
let res = unsafe {
275
275
libc:: ptrace (
@@ -282,17 +282,17 @@ pub fn setoptions(pid: Pid, options: Options) -> Result<()> {
282
282
Errno :: result ( res) . map ( drop)
283
283
}
284
284
285
- /// Gets a ptrace event as described by `ptrace(PTRACE_GETEVENTMSG,...)`
285
+ /// Gets a ptrace event as described by `ptrace(PTRACE_GETEVENTMSG, ...)`
286
286
pub fn getevent ( pid : Pid ) -> Result < c_long > {
287
287
ptrace_get_data :: < c_long > ( Request :: PTRACE_GETEVENTMSG , pid)
288
288
}
289
289
290
- /// Get siginfo as with `ptrace(PTRACE_GETSIGINFO,...)`
290
+ /// Get siginfo as with `ptrace(PTRACE_GETSIGINFO, ...)`
291
291
pub fn getsiginfo ( pid : Pid ) -> Result < siginfo_t > {
292
292
ptrace_get_data :: < siginfo_t > ( Request :: PTRACE_GETSIGINFO , pid)
293
293
}
294
294
295
- /// Set siginfo as with `ptrace(PTRACE_SETSIGINFO,...)`
295
+ /// Set siginfo as with `ptrace(PTRACE_SETSIGINFO, ...)`
296
296
pub fn setsiginfo ( pid : Pid , sig : & siginfo_t ) -> Result < ( ) > {
297
297
let ret = unsafe {
298
298
Errno :: clear ( ) ;
@@ -517,12 +517,14 @@ pub fn sysemu_step<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
517
517
}
518
518
}
519
519
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, ...)
521
522
pub fn read ( pid : Pid , addr : AddressType ) -> Result < c_long > {
522
523
ptrace_peek ( Request :: PTRACE_PEEKDATA , pid, addr, ptr:: null_mut ( ) )
523
524
}
524
525
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, ...)
526
528
///
527
529
/// # Safety
528
530
///
@@ -536,13 +538,13 @@ pub unsafe fn write(
536
538
ptrace_other ( Request :: PTRACE_POKEDATA , pid, addr, data) . map ( drop)
537
539
}
538
540
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, ...) .
540
542
/// The user struct definition can be found in `/usr/include/sys/user.h`.
541
543
pub fn read_user ( pid : Pid , offset : AddressType ) -> Result < c_long > {
542
544
ptrace_peek ( Request :: PTRACE_PEEKUSER , pid, offset, ptr:: null_mut ( ) )
543
545
}
544
546
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, ...) .
546
548
/// The user struct definition can be found in `/usr/include/sys/user.h`.
547
549
///
548
550
/// # Safety
0 commit comments