<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A memory region mapped from another Mach task. <ahref="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#details">More...</a><br/></td></tr>
<trclass="memdesc:a323d157824f62eb286e4c39f8d99e3a9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Copies memory from the target task into a caller-provided buffer in the current task. <ahref="#a323d157824f62eb286e4c39f8d99e3a9">More...</a><br/></td></tr>
<trclass="memdesc:ae4a62001732f11829cca98aecb02d693"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Maps memory from the target task into the current task. <ahref="#ae4a62001732f11829cca98aecb02d693">More...</a><br/></td></tr>
<trclass="memdesc:a9365a798d8140094cda73606ec132e87"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reads a <code>NUL</code>-terminated C string from the target task into a string in the current task. <ahref="#a9365a798d8140094cda73606ec132e87">More...</a><br/></td></tr>
<trclass="memdesc:a51092ce134b41d605a9a4ae470826eb6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reads a <code>NUL</code>-terminated C string from the target task into a string in the current task. <ahref="#a51092ce134b41d605a9a4ae470826eb6">More...</a><br/></td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">task</td><td>A send right to the target task’s task port. This object does not take ownership of the send right. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2class="groupheader">Member Function Documentation</h2>
<p>Copies memory from the target task into a caller-provided buffer in the current task. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">address</td><td>The address, in the target task’s address space, of the memory region to copy. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">size</td><td>The size, in bytes, of the memory region to copy. <em>buffer</em> must be at least this size. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">buffer</td><td>The buffer into which the contents of the other task’s memory will be copied.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> on success, with <em>buffer</em> filled appropriately. <code>false</code> on failure, with a warning logged. Failures can occur, for example, when encountering unmapped or unreadable pages.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classcrashpad_1_1TaskMemory.html#ae4a62001732f11829cca98aecb02d693"title="Maps memory from the target task into the current task. ">ReadMapped()</a></dd></dl>
<p>Reads a <code>NUL</code>-terminated C string from the target task into a string in the current task. </p>
<p>The length of the string need not be known ahead of time. This method will read contiguous memory until a <code>NUL</code> terminator is found.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">address</td><td>The address, in the target task’s address space, of the string to copy. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">string</td><td>The string read from the other task.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> on success, with <em>string</em> set appropriately. <code>false</code> on failure, with a warning logged. Failures can occur, for example, when encountering unmapped or unreadable pages.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9a616b5de4e5a66b99e8078cb923f8e1"title="Reads a NUL-terminated C string from the mapped region. ">MappedMemory::ReadCString()</a></dd></dl>
<p>Reads a <code>NUL</code>-terminated C string from the target task into a string in the current task. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">address</td><td>The address, in the target task’s address space, of the string to copy. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">size</td><td>The maximum number of bytes to read. The string is required to be <code>NUL</code>-terminated within this many bytes. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">string</td><td>The string read from the other task.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> on success, with <em>string</em> set appropriately. <code>false</code> on failure, with a warning logged. Failures can occur, for example, when a <code>NUL</code> terminator is not found within <em>size</em> bytes, or when encountering unmapped or unreadable pages.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9a616b5de4e5a66b99e8078cb923f8e1"title="Reads a NUL-terminated C string from the mapped region. ">MappedMemory::ReadCString()</a></dd></dl>
<p>Maps memory from the target task into the current task. </p>
<p>This interface is an alternative to <aclass="el"href="classcrashpad_1_1TaskMemory.html#a323d157824f62eb286e4c39f8d99e3a9"title="Copies memory from the target task into a caller-provided buffer in the current task. ">Read()</a> that does not require the caller to provide a buffer to fill. This avoids copying memory, which can offer a performance improvement.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">address</td><td>The address, in the target task’s address space, of the memory region to map. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">size</td><td>The size, in bytes, of the memory region to map.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, a <aclass="el"href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html"title="A memory region mapped from another Mach task. ">MappedMemory</a> object that provides access to the data requested. On faliure, <code>nullptr</code>, with a warning logged. Failures can occur, for example, when encountering unmapped or unreadable pages. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>util/mach/task_memory.h</li>
<li>util/mach/task_memory.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hrclass="footer"/><addressclass="footer"><small>
Generated by  <ahref="http://www.doxygen.org/index.html">