blob: f913cc7f13fbfe9c546cc2334766e8d911c4387e [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::MemorySnapshot 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="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1MemorySnapshot-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::MemorySnapshot Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An abstract interface to a snapshot representing a region of memory present in a snapshot process.
<a href="classcrashpad_1_1MemorySnapshot.html#details">More...</a></p>
<p><code>#include &quot;snapshot/memory_snapshot.h&quot;</code></p>
<div class="dynheader">
Inheritance diagram for crashpad::MemorySnapshot:</div>
<div class="dyncontent">
<div class="center">
<img src="classcrashpad_1_1MemorySnapshot.png" usemap="#crashpad::MemorySnapshot_map" alt=""/>
<map id="crashpad::MemorySnapshot_map" name="crashpad::MemorySnapshot_map">
<area href="classcrashpad_1_1internal_1_1MemorySnapshotGeneric.html" title="A MemorySnapshot of a memory region in a process on the running system. Works on multiple platforms b..." alt="crashpad::internal::MemorySnapshotGeneric" shape="rect" coords="0,56,271,80"/>
<area href="classcrashpad_1_1internal_1_1MemorySnapshotIOS.html" title="A MemorySnapshot of a memory region." alt="crashpad::internal::MemorySnapshotIOS" shape="rect" coords="281,56,552,80"/>
<area href="classcrashpad_1_1internal_1_1MemorySnapshotMinidump.html" alt="crashpad::internal::MemorySnapshotMinidump" shape="rect" coords="562,56,833,80"/>
<area href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html" title="A MemorySnapshot which wraps and filters sensitive information from another MemorySnapshot." alt="crashpad::internal::MemorySnapshotSanitized" shape="rect" coords="843,56,1114,80"/>
<area href="classcrashpad_1_1test_1_1TestMemorySnapshot.html" title="A test MemorySnapshot that can carry arbitrary data for testing purposes." alt="crashpad::test::TestMemorySnapshot" shape="rect" coords="1124,56,1395,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html">Delegate</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An interface that <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> clients must implement in order to receive memory snapshot data. <a href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:adad6b8e7382be5027a324d8dfa8612a0"><td class="memItemLeft" align="right" valign="top"><a id="adad6b8e7382be5027a324d8dfa8612a0"></a>
virtual uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1MemorySnapshot.html#adad6b8e7382be5027a324d8dfa8612a0">Address</a> () const =0</td></tr>
<tr class="memdesc:adad6b8e7382be5027a324d8dfa8612a0"><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:adad6b8e7382be5027a324d8dfa8612a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac94668a2a24a64c3e60efd8c30e09afd"><td class="memItemLeft" align="right" valign="top"><a id="ac94668a2a24a64c3e60efd8c30e09afd"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1MemorySnapshot.html#ac94668a2a24a64c3e60efd8c30e09afd">Size</a> () const =0</td></tr>
<tr class="memdesc:ac94668a2a24a64c3e60efd8c30e09afd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the memory snapshot. <br /></td></tr>
<tr class="separator:ac94668a2a24a64c3e60efd8c30e09afd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7bd3e85268e7b8d9d78e03be977ee52"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1MemorySnapshot.html#ad7bd3e85268e7b8d9d78e03be977ee52">Read</a> (<a class="el" href="classcrashpad_1_1MemorySnapshot_1_1Delegate.html">Delegate</a> *delegate) const =0</td></tr>
<tr class="memdesc:ad7bd3e85268e7b8d9d78e03be977ee52"><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_1MemorySnapshot.html#ad7bd3e85268e7b8d9d78e03be977ee52">More...</a><br /></td></tr>
<tr class="separator:ad7bd3e85268e7b8d9d78e03be977ee52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac215c8c515725ac43f2bf5ec5d7a27a4"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1MemorySnapshot.html#ac215c8c515725ac43f2bf5ec5d7a27a4">MergeWithOtherSnapshot</a> (const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a> *other) const =0</td></tr>
<tr class="memdesc:ac215c8c515725ac43f2bf5ec5d7a27a4"><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_1MemorySnapshot.html#ac215c8c515725ac43f2bf5ec5d7a27a4">More...</a><br /></td></tr>
<tr class="separator:ac215c8c515725ac43f2bf5ec5d7a27a4"><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>An abstract interface to a snapshot representing a region of memory present in a snapshot process. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ac215c8c515725ac43f2bf5ec5d7a27a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac215c8c515725ac43f2bf5ec5d7a27a4">&#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">virtual const <a class="el" href="classcrashpad_1_1MemorySnapshot.html">MemorySnapshot</a>* crashpad::MemorySnapshot::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">pure 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>Implemented in <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotGeneric.html#ad2bfb670cdd7bde7a8df3c1011c66cfd">crashpad::internal::MemorySnapshotGeneric</a>, <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a32c81927ea098f228cdfa495aeb1e08e">crashpad::internal::MemorySnapshotSanitized</a>, <a class="el" href="classcrashpad_1_1test_1_1TestMemorySnapshot.html#aeae5e5eb887e1c1efadcaad2657a60ee">crashpad::test::TestMemorySnapshot</a>, <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotMinidump.html#a5335f28519da45b5865517cd38b6a28e">crashpad::internal::MemorySnapshotMinidump</a>, and <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotIOS.html#ae842f08f33b3880a49f11eb28bb230ca">crashpad::internal::MemorySnapshotIOS</a>.</p>
</div>
</div>
<a id="ad7bd3e85268e7b8d9d78e03be977ee52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7bd3e85268e7b8d9d78e03be977ee52">&#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">virtual bool crashpad::MemorySnapshot::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">pure 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>Implemented in <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotGeneric.html#a02120cc5c0ba7a4ba13b2ae9c682d008">crashpad::internal::MemorySnapshotGeneric</a>, <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotSanitized.html#a3d62b4b91128a491173e744b4a52ec3c">crashpad::internal::MemorySnapshotSanitized</a>, <a class="el" href="classcrashpad_1_1test_1_1TestMemorySnapshot.html#a89b8798372679d4aef3cf823b165d1d3">crashpad::test::TestMemorySnapshot</a>, <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotMinidump.html#a2d3157397de27e71b0d2af67642d4e13">crashpad::internal::MemorySnapshotMinidump</a>, and <a class="el" href="classcrashpad_1_1internal_1_1MemorySnapshotIOS.html#a3eafb123ac678b683e64a595b725e12f">crashpad::internal::MemorySnapshotIOS</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>snapshot/memory_snapshot.h</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>