blob: 7efe6db056ac9f15b29da524cc7089702a64aad4 [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::ElfImageReader::NoteReader 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_1ElfImageReader.html">ElfImageReader</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html">NoteReader</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1ElfImageReader_1_1NoteReader-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::ElfImageReader::NoteReader Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class enables reading note segments from an ELF image.
<a href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#details">More...</a></p>
<p><code>#include &quot;snapshot/elf/elf_image_reader.h&quot;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad33e8286bc8522ccce3eef2acfa19d68"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68">Result</a> </td></tr>
<tr class="memdesc:ad33e8286bc8522ccce3eef2acfa19d68"><td class="mdescLeft">&#160;</td><td class="mdescRight">The return value for <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a16f401420df41de21300e5ea89ec3ad4" title="Searches for the next note in the image. ">NextNote()</a>. <a href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68">More...</a><br /></td></tr>
<tr class="separator:ad33e8286bc8522ccce3eef2acfa19d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f423d29933acb001d750a09d8b4cbd2"><td class="memItemLeft" align="right" valign="top"><a id="a7f423d29933acb001d750a09d8b4cbd2"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a7f423d29933acb001d750a09d8b4cbd2">NoteType</a> = decltype(Elf64_Nhdr::n_type)</td></tr>
<tr class="memdesc:a7f423d29933acb001d750a09d8b4cbd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">A type large enough to hold a note type, potentially across bitness. <br /></td></tr>
<tr class="separator:a7f423d29933acb001d750a09d8b4cbd2"><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:a16f401420df41de21300e5ea89ec3ad4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a16f401420df41de21300e5ea89ec3ad4">NextNote</a> (std::string *name, <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a7f423d29933acb001d750a09d8b4cbd2">NoteType</a> *type, std::string *desc)</td></tr>
<tr class="memdesc:a16f401420df41de21300e5ea89ec3ad4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Searches for the next note in the image. <a href="#a16f401420df41de21300e5ea89ec3ad4">More...</a><br /></td></tr>
<tr class="separator:a16f401420df41de21300e5ea89ec3ad4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f8b300ed10e611f03fe19cf9670f07a"><td class="memItemLeft" align="right" valign="top"><a id="a5f8b300ed10e611f03fe19cf9670f07a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>NoteReader</b> (const <a class="el" href="classcrashpad_1_1ElfImageReader.html">ElfImageReader</a> *elf_reader_, const <a class="el" href="classcrashpad_1_1ProcessMemoryRange.html">ProcessMemoryRange</a> *range, const <a class="el" href="classcrashpad_1_1ElfImageReader_1_1ProgramHeaderTable.html">ProgramHeaderTable</a> *phdr_table, ssize_t max_note_size, const std::string &amp;name_filter=std::string(), <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a7f423d29933acb001d750a09d8b4cbd2">NoteType</a> type_filter=0, bool use_filter=false)</td></tr>
<tr class="separator:a5f8b300ed10e611f03fe19cf9670f07a"><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>This class enables reading note segments from an ELF image. </p>
<p>Objects of this class should be created by calling <a class="el" href="classcrashpad_1_1ElfImageReader.html#a809de4755bc10bd8e4abc1d1be65607d" title="Return a NoteReader for this image, which scans all PT_NOTE segments in the image. ">ElfImageReader::Notes()</a> or <a class="el" href="classcrashpad_1_1ElfImageReader.html#a8341551fd2841c3f7fe423df7e96cb1f" title="Return a NoteReader for this image, which scans all PT_NOTE segments in the image, filtering by name and type. ">ElfImageReader::NotesWithNameAndType()</a>. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="ad33e8286bc8522ccce3eef2acfa19d68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad33e8286bc8522ccce3eef2acfa19d68">&#9670;&nbsp;</a></span>Result</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68">crashpad::ElfImageReader::NoteReader::Result</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The return value for <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a16f401420df41de21300e5ea89ec3ad4" title="Searches for the next note in the image. ">NextNote()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ad33e8286bc8522ccce3eef2acfa19d68ae3587c730cc1aa530fa4ddc9c4204e97"></a>kError&#160;</td><td class="fielddoc"><p>An error occurred. The <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html" title="This class enables reading note segments from an ELF image. ">NoteReader</a> is invalidated and message is logged. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad33e8286bc8522ccce3eef2acfa19d68a8c632159fa131f09d04f94e3cbcd8782"></a>kSuccess&#160;</td><td class="fielddoc"><p>A note was found. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad33e8286bc8522ccce3eef2acfa19d68a9b95317bc851d00990ca230694deedbe"></a>kNoMoreNotes&#160;</td><td class="fielddoc"><p>No more notes were found. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a16f401420df41de21300e5ea89ec3ad4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16f401420df41de21300e5ea89ec3ad4">&#9670;&nbsp;</a></span>NextNote()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68">ElfImageReader::NoteReader::Result</a> crashpad::ElfImageReader::NoteReader::NextNote </td>
<td>(</td>
<td class="paramtype">std::string *&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#a7f423d29933acb001d750a09d8b4cbd2">NoteType</a> *&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string *&#160;</td>
<td class="paramname"><em>desc</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Searches for the next note in the image. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>The name of the note owner, if not <code>nullptr</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">type</td><td>A type for the note, if not <code>nullptr</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">desc</td><td>The note descriptor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68" title="The return value for NextNote(). ">Result</a> value. <em>name</em>, <em>type</em>, and <em>desc</em> are only valid if this method returns <a class="el" href="classcrashpad_1_1ElfImageReader_1_1NoteReader.html#ad33e8286bc8522ccce3eef2acfa19d68a8c632159fa131f09d04f94e3cbcd8782" title="A note was found. ">Result::kSuccess</a>. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>snapshot/elf/elf_image_reader.h</li>
<li>snapshot/elf/elf_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.14
</small></address>
</body>
</html>