]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/man/vm_read.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / vm_read.html
old mode 100755 (executable)
new mode 100644 (file)
index 008f43a..ec6bba3
@@ -1 +1,87 @@
-<h2>vm_read</h2>\r<hr>\r<p>\r<strong>Function</strong> - Read the specified range of target task's address space.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t   vm_read</strong>\r                <strong>(vm_task_t</strong>                          <var>target_task</var>,\r                 <strong>vm_address_t</strong>                           <var>address</var>,\r                 <strong>vm_size_t</strong>                                 <var>size</var>,\r                 <strong>size</strong>                                  <var>data_out</var>,\r                 <strong>target_task</strong>                         <var>data_count</var><strong>);</strong>\r</pre>\r\r<h4>Overwrite form:</h4>\r<pre>\r<strong>kern_return_t   vm_read_overwrite</strong>\r                <strong>(vm_task_t</strong>                          <var>target_task</var>,\r                 <strong>vm_address_t</strong>                           <var>address</var>,\r                 <strong>vm_size_t</strong>                                 <var>size</var>,\r                 <strong>pointer_t</strong>                              <var>data_in</var>,\r                 <strong>target_task</strong>                         <var>data_count</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>target_task</var> \r<dd>\r[in task send right]\rThe port for the task whose memory is to be read.\r<p>\r<dt> <var>address</var> \r<dd>\r[in scalar]\rThe address at which to start the read.\r<p>\r<dt> <var>size</var> \r<dd>\r[in scalar]\rThe number of bytes to read.\r<p>\r<dt> <var>data_out</var>\r<dd>\rOut-pointer to dynamic array of bytes returned by the read.\r<p>\r<dt> <var>data_in</var>\r<dd>\rIn-pointer to array of bytes that will be overwritten with the data returned by the read.\r<p>\r<dt> <var>data_count</var> \r<dd>\r[in/out scalar]\rOn input, the maximum size of the buffer; on output, the \rsize returned (in natural-sized units).\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>vm_read</strong> and <strong>vm_read_overwrite</strong>\rfunctions read a portion of a task's virtual\rmemory (they enable tasks to read other tasks' memory).\rThe <strong>vm_read</strong> function returns the data in a dynamically\rallocated array of bytes; the <strong>vm_read_overwrite</strong> function\rplaces the data into a caller-specified buffer (the <var>data_in</var>\rparameter).\r<h3>NOTES</h3>\r<p>\rThis interface is machine word length specific because of the virtual address\rparameter.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_PROTECTION_FAILURE</strong>\r<dd>\rSpecified memory is valid, but does not permit reading.\r<p>\r<dt> <strong>KERN_INVALID_ADDRESS</strong>\r<dd>\rThe address is illegal or specifies a non-allocated region, or there are \rless than <var>size</var> bytes of data following the address, or the region\rspecified by the <var>data_in</var> parameter cannot be written to.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="vm_copy.html"><strong>vm_copy</strong></a>,\r<a href="vm_deallocate.html"><strong>vm_deallocate</strong></a>,\r<a href="vm_write.html"><strong>vm_write</strong></a>.\r
\ No newline at end of file
+<h2>vm_read</h2>
+<hr>
+<p>
+<strong>Function</strong> - Read the specified range of target task's address space.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t   vm_read</strong>
+                <strong>(vm_task_t</strong>                          <var>target_task</var>,
+                 <strong>vm_address_t</strong>                           <var>address</var>,
+                 <strong>vm_size_t</strong>                                 <var>size</var>,
+                 <strong>size</strong>                                  <var>data_out</var>,
+                 <strong>target_task</strong>                         <var>data_count</var><strong>);</strong>
+</pre>
+
+<h4>Overwrite form:</h4>
+<pre>
+<strong>kern_return_t   vm_read_overwrite</strong>
+                <strong>(vm_task_t</strong>                          <var>target_task</var>,
+                 <strong>vm_address_t</strong>                           <var>address</var>,
+                 <strong>vm_size_t</strong>                                 <var>size</var>,
+                 <strong>pointer_t</strong>                              <var>data_in</var>,
+                 <strong>target_task</strong>                         <var>data_count</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>target_task</var> 
+<dd>
+[in task send right]
+The port for the task whose memory is to be read.
+<p>
+<dt> <var>address</var> 
+<dd>
+[in scalar]
+The address at which to start the read.
+<p>
+<dt> <var>size</var> 
+<dd>
+[in scalar]
+The number of bytes to read.
+<p>
+<dt> <var>data_out</var>
+<dd>
+Out-pointer to dynamic array of bytes returned by the read.
+<p>
+<dt> <var>data_in</var>
+<dd>
+In-pointer to array of bytes that will be overwritten with the data returned by the read.
+<p>
+<dt> <var>data_count</var> 
+<dd>
+[in/out scalar]
+On input, the maximum size of the buffer; on output, the 
+size returned (in natural-sized units).
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>vm_read</strong> and <strong>vm_read_overwrite</strong>
+functions read a portion of a task's virtual
+memory (they enable tasks to read other tasks' memory).
+The <strong>vm_read</strong> function returns the data in a dynamically
+allocated array of bytes; the <strong>vm_read_overwrite</strong> function
+places the data into a caller-specified buffer (the <var>data_in</var>
+parameter).
+<h3>NOTES</h3>
+<p>
+This interface is machine word length specific because of the virtual address
+parameter.
+<h3>RETURN VALUES</h3>
+<dl>
+<p>
+<dt> <strong>KERN_PROTECTION_FAILURE</strong>
+<dd>
+Specified memory is valid, but does not permit reading.
+<p>
+<dt> <strong>KERN_INVALID_ADDRESS</strong>
+<dd>
+The address is illegal or specifies a non-allocated region, or there are 
+less than <var>size</var> bytes of data following the address, or the region
+specified by the <var>data_in</var> parameter cannot be written to.
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="vm_copy.html"><strong>vm_copy</strong></a>,
+<a href="vm_deallocate.html"><strong>vm_deallocate</strong></a>,
+<a href="vm_write.html"><strong>vm_write</strong></a>.