blob: 9aa5c2ebec9a41c28aea12b02d2e4180dbcdd508 [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: FakeProcessMemory 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classFakeProcessMemory-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">FakeProcessMemory Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for FakeProcessMemory:</div>
<div class="dyncontent">
<div class="center">
<img src="classFakeProcessMemory.png" usemap="#FakeProcessMemory_map" alt=""/>
<map id="FakeProcessMemory_map" name="FakeProcessMemory_map">
<area href="classcrashpad_1_1ProcessMemory.html" title="Abstract base class for accessing the memory of another process." alt="crashpad::ProcessMemory" shape="rect" coords="0,0,163,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:a9fb608cc17cb9315f2d7dcca855b0b72"><td class="memItemLeft" align="right" valign="top"><a id="a9fb608cc17cb9315f2d7dcca855b0b72"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>FakeProcessMemory</b> (const uint8_t *data, size_t size, <a class="el" href="namespacecrashpad.html#af2d003bfc8632755c60ab27bd6d1c8ae">VMAddress</a> fake_base)</td></tr>
<tr class="separator:a9fb608cc17cb9315f2d7dcca855b0b72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a838a9b7bb2f5a1d9e97c4652efbfe82b"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFakeProcessMemory.html#a838a9b7bb2f5a1d9e97c4652efbfe82b">ReadUpTo</a> (<a class="el" href="namespacecrashpad.html#af2d003bfc8632755c60ab27bd6d1c8ae">VMAddress</a> address, size_t size, void *buffer) const override</td></tr>
<tr class="memdesc:a838a9b7bb2f5a1d9e97c4652efbfe82b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies memory from the target process into a caller-provided buffer in the current process, up to a maximum number of bytes. <a href="classFakeProcessMemory.html#a838a9b7bb2f5a1d9e97c4652efbfe82b">More...</a><br /></td></tr>
<tr class="separator:a838a9b7bb2f5a1d9e97c4652efbfe82b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcrashpad_1_1ProcessMemory"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcrashpad_1_1ProcessMemory')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classcrashpad_1_1ProcessMemory.html">crashpad::ProcessMemory</a></td></tr>
<tr class="memitem:a728bc3afe29c3d5bf999c614d7fbf774 inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ProcessMemory.html#a728bc3afe29c3d5bf999c614d7fbf774">Read</a> (<a class="el" href="namespacecrashpad.html#af2d003bfc8632755c60ab27bd6d1c8ae">VMAddress</a> address, <a class="el" href="namespacecrashpad.html#a103690edebf604dcd23d5c03b78fe0be">VMSize</a> size, void *buffer) const</td></tr>
<tr class="memdesc:a728bc3afe29c3d5bf999c614d7fbf774 inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies memory from the target process into a caller-provided buffer in the current process. <a href="classcrashpad_1_1ProcessMemory.html#a728bc3afe29c3d5bf999c614d7fbf774">More...</a><br /></td></tr>
<tr class="separator:a728bc3afe29c3d5bf999c614d7fbf774 inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f31b6f891e7a363b4d1c30d9d7fef2b inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ProcessMemory.html#a9f31b6f891e7a363b4d1c30d9d7fef2b">ReadCString</a> (<a class="el" href="namespacecrashpad.html#af2d003bfc8632755c60ab27bd6d1c8ae">VMAddress</a> address, std::string *string) const</td></tr>
<tr class="memdesc:a9f31b6f891e7a363b4d1c30d9d7fef2b inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a <code>NUL</code>-terminated C string from the target process into a string in the current process. <a href="classcrashpad_1_1ProcessMemory.html#a9f31b6f891e7a363b4d1c30d9d7fef2b">More...</a><br /></td></tr>
<tr class="separator:a9f31b6f891e7a363b4d1c30d9d7fef2b inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f7450b1e02bed80a9573338cd32d260 inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ProcessMemory.html#a3f7450b1e02bed80a9573338cd32d260">ReadCStringSizeLimited</a> (<a class="el" href="namespacecrashpad.html#af2d003bfc8632755c60ab27bd6d1c8ae">VMAddress</a> address, <a class="el" href="namespacecrashpad.html#a103690edebf604dcd23d5c03b78fe0be">VMSize</a> size, std::string *string) const</td></tr>
<tr class="memdesc:a3f7450b1e02bed80a9573338cd32d260 inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a <code>NUL</code>-terminated C string from the target process into a string in the current process. <a href="classcrashpad_1_1ProcessMemory.html#a3f7450b1e02bed80a9573338cd32d260">More...</a><br /></td></tr>
<tr class="separator:a3f7450b1e02bed80a9573338cd32d260 inherit pub_methods_classcrashpad_1_1ProcessMemory"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a838a9b7bb2f5a1d9e97c4652efbfe82b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a838a9b7bb2f5a1d9e97c4652efbfe82b">&#9670;&nbsp;</a></span>ReadUpTo()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ssize_t FakeProcessMemory::ReadUpTo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacecrashpad.html#af2d003bfc8632755c60ab27bd6d1c8ae">VMAddress</a>&#160;</td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>buffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Copies memory from the target process into a caller-provided buffer in the current process, up to a maximum number of bytes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address, in the target process' address space, of the memory region to copy. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The maximum size, in bytes, of the memory region to copy. <em>buffer</em> must be at least this size. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>The buffer into which the contents of the other process' memory will be copied.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes copied, 0 if there is no more data to read, or -1 on failure with a message logged. </dd></dl>
<p>Implements <a class="el" href="classcrashpad_1_1ProcessMemory.html">crashpad::ProcessMemory</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>snapshot/elf/elf_image_reader_fuzzer.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>