crashpad/doc/generated/doxygen/classcrashpad_1_1PEImageReader.html
2016-11-08 14:26:59 -05:00

326 lines
19 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::PEImageReader 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.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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_1PEImageReader.html">PEImageReader</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1PEImageReader-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::PEImageReader Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A reader for PE images mapped into another process.
<a href="classcrashpad_1_1PEImageReader.html#details">More...</a></p>
<p><code>#include &quot;snapshot/win/pe_image_reader.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:a4253bf82bb281c7f87f429d2ec8f211e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a4253bf82bb281c7f87f429d2ec8f211e">Initialize</a> (<a class="el" href="classcrashpad_1_1ProcessReaderWin.html">ProcessReaderWin</a> *process_reader, <a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> address, <a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> size, const std::string &amp;module_name)</td></tr>
<tr class="memdesc:a4253bf82bb281c7f87f429d2ec8f211e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the reader. <a href="#a4253bf82bb281c7f87f429d2ec8f211e">More...</a><br /></td></tr>
<tr class="separator:a4253bf82bb281c7f87f429d2ec8f211e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04989ededf7b4ba056d4c6b2bcfe3e15"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a04989ededf7b4ba056d4c6b2bcfe3e15">Address</a> () const</td></tr>
<tr class="memdesc:a04989ededf7b4ba056d4c6b2bcfe3e15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the image's load address. <a href="#a04989ededf7b4ba056d4c6b2bcfe3e15">More...</a><br /></td></tr>
<tr class="separator:a04989ededf7b4ba056d4c6b2bcfe3e15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5278d5065963128bd45873eba489c8c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a5278d5065963128bd45873eba489c8c3">Size</a> () const</td></tr>
<tr class="memdesc:a5278d5065963128bd45873eba489c8c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the image's size. <a href="#a5278d5065963128bd45873eba489c8c3">More...</a><br /></td></tr>
<tr class="separator:a5278d5065963128bd45873eba489c8c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab22be2306900b9674192a85fa9bc8ecf"><td class="memTemplParams" colspan="2">template&lt;class Traits &gt; </td></tr>
<tr class="memitem:ab22be2306900b9674192a85fa9bc8ecf"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#ab22be2306900b9674192a85fa9bc8ecf">GetCrashpadInfo</a> (<a class="el" href="structcrashpad_1_1process__types_1_1CrashpadInfo.html">process_types::CrashpadInfo</a>&lt; Traits &gt; *crashpad_info) const</td></tr>
<tr class="memdesc:ab22be2306900b9674192a85fa9bc8ecf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtains the module's <a class="el" href="structcrashpad_1_1CrashpadInfo.html" title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structure. <a href="#ab22be2306900b9674192a85fa9bc8ecf">More...</a><br /></td></tr>
<tr class="separator:ab22be2306900b9674192a85fa9bc8ecf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c82a9323b9484d7f68343fb1ba55e87"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a9c82a9323b9484d7f68343fb1ba55e87">DebugDirectoryInformation</a> (<a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *uuid, DWORD *age, std::string *pdbname) const</td></tr>
<tr class="memdesc:a9c82a9323b9484d7f68343fb1ba55e87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtains information from the module's debug directory, if any. <a href="#a9c82a9323b9484d7f68343fb1ba55e87">More...</a><br /></td></tr>
<tr class="separator:a9c82a9323b9484d7f68343fb1ba55e87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb49131f8678c646d5d3bce902774e2b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#afb49131f8678c646d5d3bce902774e2b">VSFixedFileInfo</a> (<a class="el" href="structVS__FIXEDFILEINFO.html">VS_FIXEDFILEINFO</a> *vs_fixed_file_info) const</td></tr>
<tr class="memdesc:afb49131f8678c646d5d3bce902774e2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtains the modules <code><a class="el" href="structVS__FIXEDFILEINFO.html" title="Version information for a file. ">VS_FIXEDFILEINFO</a></code>, containing its version and type information. <a href="#afb49131f8678c646d5d3bce902774e2b">More...</a><br /></td></tr>
<tr class="separator:afb49131f8678c646d5d3bce902774e2b"><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 reader for PE images mapped into another process. </p>
<p>This class is capable of reading both 32-bit and 64-bit images based on the bitness of the remote process.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1PEImageAnnotationsReader.html" title="A reader of annotations stored in a PE image mapped into another process. ">PEImageAnnotationsReader</a> </dd>
<dd>
<a class="el" href="classcrashpad_1_1PEImageResourceReader.html" title="A reader for resources stored in PE images mapped into another process. ">PEImageResourceReader</a> </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a04989ededf7b4ba056d4c6b2bcfe3e15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04989ededf7b4ba056d4c6b2bcfe3e15">&sect;&nbsp;</a></span>Address()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> crashpad::PEImageReader::Address </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 the image's load address. </p>
<p>This is the value passed as <em>address</em> to <a class="el" href="classcrashpad_1_1PEImageReader.html#a4253bf82bb281c7f87f429d2ec8f211e" title="Initializes the reader. ">Initialize()</a>. </p>
</div>
</div>
<a id="a9c82a9323b9484d7f68343fb1ba55e87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c82a9323b9484d7f68343fb1ba55e87">&sect;&nbsp;</a></span>DebugDirectoryInformation()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::PEImageReader::DebugDirectoryInformation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *&#160;</td>
<td class="paramname"><em>uuid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">DWORD *&#160;</td>
<td class="paramname"><em>age</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string *&#160;</td>
<td class="paramname"><em>pdbname</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Obtains information from the module's debug directory, if any. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">uuid</td><td>The unique identifier of the executable/PDB. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">age</td><td>The age field for the pdb (the number of times it's been relinked). </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pdbname</td><td>Name of the pdb file.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, with the parameters set appropriately. <code>false</code> on failure. This method may return <code>false</code> without logging anything in the case of a module that does not contain relevant debugging information but is otherwise properly structured. </dd></dl>
</div>
</div>
<a id="ab22be2306900b9674192a85fa9bc8ecf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab22be2306900b9674192a85fa9bc8ecf">&sect;&nbsp;</a></span>GetCrashpadInfo()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Traits &gt; </div>
<table class="memname">
<tr>
<td class="memname">bool crashpad::PEImageReader::GetCrashpadInfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structcrashpad_1_1process__types_1_1CrashpadInfo.html">process_types::CrashpadInfo</a>&lt; Traits &gt; *&#160;</td>
<td class="paramname"><em>crashpad_info</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Obtains the module's <a class="el" href="structcrashpad_1_1CrashpadInfo.html" title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structure. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on failure. If the module does not have a <code>CPADinfo</code> section, this will return <code>false</code> without logging any messages. Other failures will result in messages being logged. </dd></dl>
</div>
</div>
<a id="a4253bf82bb281c7f87f429d2ec8f211e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4253bf82bb281c7f87f429d2ec8f211e">&sect;&nbsp;</a></span>Initialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::PEImageReader::Initialize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1ProcessReaderWin.html">ProcessReaderWin</a> *&#160;</td>
<td class="paramname"><em>process_reader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a>&#160;</td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a>&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>module_name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the reader. </p>
<p>This method must be called only once on an object. This method must be called successfully before any other method in this class may be called.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">process_reader</td><td>The reader for the remote process. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address, in the remote process' address space, where the <code>IMAGE_DOS_HEADER</code> is located. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the image. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">module_name</td><td>The module's name, a string to be used in logged messages. This string is for diagnostic purposes.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the image was read successfully, <code>false</code> otherwise, with an appropriate message logged. </dd></dl>
</div>
</div>
<a id="a5278d5065963128bd45873eba489c8c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5278d5065963128bd45873eba489c8c3">&sect;&nbsp;</a></span>Size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> crashpad::PEImageReader::Size </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 the image's size. </p>
<p>This is the value passed as <em>size</em> to <a class="el" href="classcrashpad_1_1PEImageReader.html#a4253bf82bb281c7f87f429d2ec8f211e" title="Initializes the reader. ">Initialize()</a>. </p>
</div>
</div>
<a id="afb49131f8678c646d5d3bce902774e2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb49131f8678c646d5d3bce902774e2b">&sect;&nbsp;</a></span>VSFixedFileInfo()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::PEImageReader::VSFixedFileInfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structVS__FIXEDFILEINFO.html">VS_FIXEDFILEINFO</a> *&#160;</td>
<td class="paramname"><em>vs_fixed_file_info</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Obtains the modules <code><a class="el" href="structVS__FIXEDFILEINFO.html" title="Version information for a file. ">VS_FIXEDFILEINFO</a></code>, containing its version and type information. </p>
<p>The data obtained from this method should be equivalent to what could be obtained by calling <a class="el" href="namespacecrashpad.html#af5f4414be804bdcd71f57053d7147eff" title="Retrieve the type and version information from a given module (exe, dll, etc.) ">GetModuleVersionAndType()</a>. Avoiding that function ensures that the data in the module loaded into the remote process will be used as-is, without the risks associated with loading the module into the reading process.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">vs_fixed_file_info</td><td>The <a class="el" href="structVS__FIXEDFILEINFO.html" title="Version information for a file. ">VS_FIXEDFILEINFO</a> on success. <a class="el" href="structVS__FIXEDFILEINFO.html#a1ecf0351f90806354f987321c4d1ce0e" title="A bitmask of VS_FF_* values identifying attributes of the file. Only bits present in dwFileFlagsMask ...">VS_FIXEDFILEINFO::dwFileFlags</a> will have been masked with <a class="el" href="structVS__FIXEDFILEINFO.html#a1523cf64b0b010ecf5a8c3b02866041c" title="A bitmask of VS_FF_* values indicating which bits in dwFileFlags are valid. ">VS_FIXEDFILEINFO::dwFileFlagsMask</a> already.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success. <code>false</code> if the module does not contain this information, without logging any messages. <code>false</code> on failure, with a message logged. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>snapshot/win/pe_image_reader.h</li>
<li>snapshot/win/pe_image_reader.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.12
</small></address>
</body>
</html>