blob: d731e6b3fcf8827ec42e13a89691d9bd876a2874 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::internal::MemorySnapshotSanitized 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.18 -->
<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="namespacecrashpad_1_1internal.html">internal</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html">MemorySnapshotSanitized</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::internal::MemorySnapshotSanitized Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>A <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> which wraps and filters sensitive information from another <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a>.
<a href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#details">More...</a></p>
<p><code>#include &quot;snapshot/sanitized/memory_snapshot_sanitized.h&quot;</code></p>
<div class="dynheader">
Inheritance diagram for crashpad::internal::MemorySnapshotSanitized:</div>
<div class="dyncontent">
<div class="center">
<img src="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.png" usemap="#crashpad::internal::MemorySnapshotSanitized_map" alt=""/>
<map id="crashpad::internal::MemorySnapshotSanitized_map" name="crashpad::internal::MemorySnapshotSanitized_map">
<area href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process." alt="crashpad::MemorySnapshot" shape="rect" coords="0,0,268,24"/>
</map>
</div></div>
<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:a629945556b61ec86658ff5cfdaf0925d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a629945556b61ec86658ff5cfdaf0925d">MemorySnapshotSanitized</a> (const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *snapshot, <a class="el" href="classcrashpad_1_1RangeSet.html">RangeSet</a> *ranges, bool is_64_bit)</td></tr>
<tr class="memdesc:a629945556b61ec86658ff5cfdaf0925d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs this object. <a href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a629945556b61ec86658ff5cfdaf0925d">More...</a><br /></td></tr>
<tr class="separator:a629945556b61ec86658ff5cfdaf0925d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12b2db1487cd9ed293bd3e9b97aa31b6"><td class="memItemLeft" align="right" valign="top"><a id="a12b2db1487cd9ed293bd3e9b97aa31b6"></a>
uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a12b2db1487cd9ed293bd3e9b97aa31b6">Address</a> () const override</td></tr>
<tr class="memdesc:a12b2db1487cd9ed293bd3e9b97aa31b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The base address of the memory snapshot in the snapshot process’ address space. <br /></td></tr>
<tr class="separator:a12b2db1487cd9ed293bd3e9b97aa31b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a39cb820fb6b0c5e91c293914b5bfec"><td class="memItemLeft" align="right" valign="top"><a id="a4a39cb820fb6b0c5e91c293914b5bfec"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a4a39cb820fb6b0c5e91c293914b5bfec">Size</a> () const override</td></tr>
<tr class="memdesc:a4a39cb820fb6b0c5e91c293914b5bfec"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the memory snapshot. <br /></td></tr>
<tr class="separator:a4a39cb820fb6b0c5e91c293914b5bfec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d62b4b91128a491173e744b4a52ec3c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a3d62b4b91128a491173e744b4a52ec3c">Read</a> (<a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html">Delegate</a> *delegate) const override</td></tr>
<tr class="memdesc:a3d62b4b91128a491173e744b4a52ec3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls <a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html#a844f77076dc607ce0cd8946aea75f73b" title="Called by MemorySnapshot::Read() to provide data requested by a call to that method.">Delegate::MemorySnapshotDelegateRead()</a>, providing it with the memory snapshot’s data. <a href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a3d62b4b91128a491173e744b4a52ec3c">More...</a><br /></td></tr>
<tr class="separator:a3d62b4b91128a491173e744b4a52ec3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32c81927ea098f228cdfa495aeb1e08e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a32c81927ea098f228cdfa495aeb1e08e">MergeWithOtherSnapshot</a> (const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *other) const override</td></tr>
<tr class="memdesc:a32c81927ea098f228cdfa495aeb1e08e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> based on merging this one with <em>other</em>. <a href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a32c81927ea098f228cdfa495aeb1e08e">More...</a><br /></td></tr>
<tr class="separator:a32c81927ea098f228cdfa495aeb1e08e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a40f9f57a011ba532c928bf0134cdcadf"><td class="memItemLeft" align="right" valign="top"><a id="a40f9f57a011ba532c928bf0134cdcadf"></a>
static constexpr uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a40f9f57a011ba532c928bf0134cdcadf">kDefaced</a> = 0x0defaced0defaced</td></tr>
<tr class="memdesc:a40f9f57a011ba532c928bf0134cdcadf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Redacted data is replaced with this value, casted to the appropriate size for a pointer in the target process. <br /></td></tr>
<tr class="separator:a40f9f57a011ba532c928bf0134cdcadf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9a7f983221ad5783953d5731fa71f7c"><td class="memItemLeft" align="right" valign="top"><a id="ab9a7f983221ad5783953d5731fa71f7c"></a>
static constexpr uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#ab9a7f983221ad5783953d5731fa71f7c">kSmallWordMax</a> = 4096</td></tr>
<tr class="memdesc:ab9a7f983221ad5783953d5731fa71f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer-aligned data smaller than this value is not redacted. <br /></td></tr>
<tr class="separator:ab9a7f983221ad5783953d5731fa71f7c"><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 <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> which wraps and filters sensitive information from another <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a>. </p>
<p>This class redacts all data from the wrapped <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> unless:</p><ol type="1">
<li>The data is pointer aligned and points into a whitelisted address range.</li>
<li>The data is pointer aligned and is a small integer. </li>
</ol>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a629945556b61ec86658ff5cfdaf0925d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a629945556b61ec86658ff5cfdaf0925d">&#9670;&nbsp;</a></span>MemorySnapshotSanitized()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">crashpad::internal::MemorySnapshotSanitized::MemorySnapshotSanitized </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *&#160;</td>
<td class="paramname"><em>snapshot</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1RangeSet.html">RangeSet</a> *&#160;</td>
<td class="paramname"><em>ranges</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_64_bit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs this object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">snapshot</td><td>The <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> to sanitize. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ranges</td><td>A set of whitelisted address ranges. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">is_64_bit</td><td><code>true</code> if this memory is for a 64-bit process. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a32c81927ea098f228cdfa495aeb1e08e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32c81927ea098f228cdfa495aeb1e08e">&#9670;&nbsp;</a></span>MergeWithOtherSnapshot()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a>* crashpad::internal::MemorySnapshotSanitized::MergeWithOtherSnapshot </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> based on merging this one with <em>other</em>. </p>
<p>The ranges described by the two snapshots must either overlap or abut, and must be of the same concrete type.</p>
<dl class="section return"><dt>Returns</dt><dd>A newly allocated <a class="el" href="classcrashpad_1_1MemorySnapshot.html" title="An abstract interface to a snapshot representing a region of memory present in a snapshot process.">MemorySnapshot</a> representing the merged range, or <code>nullptr</code> with an error logged. </dd></dl>
<p>Implements <a class="el" href="classcrashpad_1_1MemorySnapshot.html#ac215c8c515725ac43f2bf5ec5d7a27a4">crashpad::MemorySnapshot</a>.</p>
</div>
</div>
<a id="a3d62b4b91128a491173e744b4a52ec3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d62b4b91128a491173e744b4a52ec3c">&#9670;&nbsp;</a></span>Read()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool crashpad::internal::MemorySnapshotSanitized::Read </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html">Delegate</a> *&#160;</td>
<td class="paramname"><em>delegate</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls <a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html#a844f77076dc607ce0cd8946aea75f73b" title="Called by MemorySnapshot::Read() to provide data requested by a call to that method.">Delegate::MemorySnapshotDelegateRead()</a>, providing it with the memory snapshot’s data. </p>
<p>Implementations do not necessarily read the memory snapshot data prior to this method being called. Memory snapshot data may be loaded lazily and may be discarded after being passed to the delegate. This provides clean memory management without burdening a snapshot implementation with the requirement that it track all memory region data simultaneously.</p>
<dl class="section return"><dt>Returns</dt><dd><code>false</code> on failure, otherwise, the return value of <a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html#a844f77076dc607ce0cd8946aea75f73b" title="Called by MemorySnapshot::Read() to provide data requested by a call to that method.">Delegate::MemorySnapshotDelegateRead()</a>, which should be <code>true</code> on success and <code>false</code> on failure. </dd></dl>
<p>Implements <a class="el" href="classcrashpad_1_1MemorySnapshot.html#ad7bd3e85268e7b8d9d78e03be977ee52">crashpad::MemorySnapshot</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>snapshot/sanitized/memory_snapshot_sanitized.h</li>
<li>snapshot/sanitized/memory_snapshot_sanitized.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.18
</small></address>
</body>
</html>