blob: 28d3c3bde16f2a3faca4c08ba8c31d4c04861341 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::TaskMemory::MappedMemory Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="crashpad_doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1TaskMemory.html">TaskMemory</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html">MappedMemory</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classcrashpad_1_1TaskMemory_1_1MappedMemory-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::TaskMemory::MappedMemory Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A memory region mapped from another Mach task.
<a href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#details">More...</a></p>
<p><code>#include &quot;util/mach/task_memory.h&quot;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9de3d6dc298219b98770a2e0f40955a6"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9de3d6dc298219b98770a2e0f40955a6">data</a> () const</td></tr>
<tr class="memdesc:a9de3d6dc298219b98770a2e0f40955a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the data requested by the user. <a href="#a9de3d6dc298219b98770a2e0f40955a6">More...</a><br /></td></tr>
<tr class="separator:a9de3d6dc298219b98770a2e0f40955a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a616b5de4e5a66b99e8078cb923f8e1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9a616b5de4e5a66b99e8078cb923f8e1">ReadCString</a> (size_t offset, std::string *string) const</td></tr>
<tr class="memdesc:a9a616b5de4e5a66b99e8078cb923f8e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a <code>NUL</code>-terminated C string from the mapped region. <a href="#a9a616b5de4e5a66b99e8078cb923f8e1">More...</a><br /></td></tr>
<tr class="separator:a9a616b5de4e5a66b99e8078cb923f8e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:af6f0f9c135d813d412e22c22a0ec5ab7"><td class="memItemLeft" align="right" valign="top"><a id="af6f0f9c135d813d412e22c22a0ec5ab7"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TaskMemory</b></td></tr>
<tr class="separator:af6f0f9c135d813d412e22c22a0ec5ab7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A memory region mapped from another Mach task. </p>
<p>The mapping is maintained until this object is destroyed. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a9de3d6dc298219b98770a2e0f40955a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9de3d6dc298219b98770a2e0f40955a6">&#9670;&nbsp;</a></span>data()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const void* crashpad::TaskMemory::MappedMemory::data </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a pointer to the data requested by the user. </p>
<p>This is the value of the <em>vm_address</em> + <em>user_offset</em> parameters passed to the constructor, casted to <code>const void*</code>. </p>
</div>
</div>
<a id="a9a616b5de4e5a66b99e8078cb923f8e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a616b5de4e5a66b99e8078cb923f8e1">&#9670;&nbsp;</a></span>ReadCString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::TaskMemory::MappedMemory::ReadCString </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string *&#160;</td>
<td class="paramname"><em>string</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads a <code>NUL</code>-terminated C string from the mapped region. </p>
<p>This method will read contiguous memory until a <code>NUL</code> terminator is found.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The offset into <a class="el" href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9de3d6dc298219b98770a2e0f40955a6" title="Returns a pointer to the data requested by the user. ">data()</a> of the string to be read. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">string</td><td>The string, whose contents begin at <a class="el" href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9de3d6dc298219b98770a2e0f40955a6" title="Returns a pointer to the data requested by the user. ">data()</a> and continue up to a <code>NUL</code> terminator.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, with <em>string</em> set appropriately. If <em>offset</em> is greater than or equal to the <em>user_size</em> constructor parameter, or if no <code>NUL</code> terminator was found in <a class="el" href="classcrashpad_1_1TaskMemory_1_1MappedMemory.html#a9de3d6dc298219b98770a2e0f40955a6" title="Returns a pointer to the data requested by the user. ">data()</a> after <em>offset</em>, returns <code>false</code> with an appropriate warning logged. </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 -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>