You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
387 lines
26 KiB
387 lines
26 KiB
<!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=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.3"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Theodosius: theo::recomp::symbol_table_t 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" />
|
|
</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 id="projectrow">
|
|
<td id="projectlogo"><img alt="Logo" src="../../icon.png"/></td>
|
|
<td id="projectalign">
|
|
<div id="projectname">Theodosius<span id="projectnumber"> v3.0</span>
|
|
</div>
|
|
<div id="projectbrief">Jit linker, symbol mapper, and obfuscator</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.3 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
|
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(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="../../da/de6/namespacetheo.html">theo</a></li><li class="navelem"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html">recomp</a></li><li class="navelem"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">symbol_table_t</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> </div>
|
|
<div class="headertitle"><div class="title">theo::recomp::symbol_table_t Class Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>this class is a high level wrapper for a hashmap that contains <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a> values. the symbol values are references by a hashcode.
|
|
<a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#details">More...</a></p>
|
|
|
|
<p><code>#include "<a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">symbol_table.hpp</a>"</code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:ad06d4004c0cb454b1ffe7e2ae2ccedf5"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ad06d4004c0cb454b1ffe7e2ae2ccedf5">symbol_table_t</a> ()</td></tr>
|
|
<tr class="memdesc:ad06d4004c0cb454b1ffe7e2ae2ccedf5"><td class="mdescLeft"> </td><td class="mdescRight">default constructor. does nothing. <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ad06d4004c0cb454b1ffe7e2ae2ccedf5">More...</a><br /></td></tr>
|
|
<tr class="separator:ad06d4004c0cb454b1ffe7e2ae2ccedf5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab7dfbb8369463ce3d74ad656115cf4d5"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ab7dfbb8369463ce3d74ad656115cf4d5">symbol_table_t</a> (const std::vector< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> > &&syms)</td></tr>
|
|
<tr class="memdesc:ab7dfbb8369463ce3d74ad656115cf4d5"><td class="mdescLeft"> </td><td class="mdescRight">this constructor will populate the m_table private field with symbols. <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ab7dfbb8369463ce3d74ad656115cf4d5">More...</a><br /></td></tr>
|
|
<tr class="separator:ab7dfbb8369463ce3d74ad656115cf4d5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af9caf2d4d97b2498aa624c3750a7a601"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af9caf2d4d97b2498aa624c3750a7a601">put_symbol</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> &sym)</td></tr>
|
|
<tr class="memdesc:af9caf2d4d97b2498aa624c3750a7a601"><td class="mdescLeft"> </td><td class="mdescRight">add symbol to m_table <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af9caf2d4d97b2498aa624c3750a7a601">More...</a><br /></td></tr>
|
|
<tr class="separator:af9caf2d4d97b2498aa624c3750a7a601"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae7c35d9336f67d3175910c028e0b9b3e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ae7c35d9336f67d3175910c028e0b9b3e">put_symbols</a> (std::vector< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> > &syms)</td></tr>
|
|
<tr class="memdesc:ae7c35d9336f67d3175910c028e0b9b3e"><td class="mdescLeft"> </td><td class="mdescRight">add a vector of symbol to m_table <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ae7c35d9336f67d3175910c028e0b9b3e">More...</a><br /></td></tr>
|
|
<tr class="separator:ae7c35d9336f67d3175910c028e0b9b3e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a308c0dbcc4d569467e0986b32ef30db5"><td class="memItemLeft" align="right" valign="top">std::optional< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5">sym_from_hash</a> (std::size_t hash)</td></tr>
|
|
<tr class="memdesc:a308c0dbcc4d569467e0986b32ef30db5"><td class="mdescLeft"> </td><td class="mdescRight">returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its name) the hash is produced by <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">theo::decomp::symbol_t::hash</a> <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5">More...</a><br /></td></tr>
|
|
<tr class="separator:a308c0dbcc4d569467e0986b32ef30db5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abaea9fd899d87b09d60c2b815624e2d2"><td class="memItemLeft" align="right" valign="top">std::optional< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#abaea9fd899d87b09d60c2b815624e2d2">sym_from_alloc</a> (std::uintptr_t allocated_at)</td></tr>
|
|
<tr class="memdesc:abaea9fd899d87b09d60c2b815624e2d2"><td class="mdescLeft"> </td><td class="mdescRight">returns an optional pointer to a symbol given its allocation location. <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#abaea9fd899d87b09d60c2b815624e2d2">More...</a><br /></td></tr>
|
|
<tr class="separator:abaea9fd899d87b09d60c2b815624e2d2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a35008ba37814a94209cf979302e13e6d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d">for_each</a> (std::function< void(<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> &sym)> fn)</td></tr>
|
|
<tr class="memdesc:a35008ba37814a94209cf979302e13e6d"><td class="mdescLeft"> </td><td class="mdescRight">this function is a wrapper function that allows you to get at each entry in the symbol table by reference. <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d">More...</a><br /></td></tr>
|
|
<tr class="separator:a35008ba37814a94209cf979302e13e6d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af57c0495a442ea86af0f9cca4521631e"><td class="memItemLeft" align="right" valign="top">std::uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af57c0495a442ea86af0f9cca4521631e">size</a> ()</td></tr>
|
|
<tr class="memdesc:af57c0495a442ea86af0f9cca4521631e"><td class="mdescLeft"> </td><td class="mdescRight">returns the size of the symbol table. <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af57c0495a442ea86af0f9cca4521631e">More...</a><br /></td></tr>
|
|
<tr class="separator:af57c0495a442ea86af0f9cca4521631e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p >this class is a high level wrapper for a hashmap that contains <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a> values. the symbol values are references by a hashcode. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html#l00045">45</a> of file <a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">symbol_table.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="ad06d4004c0cb454b1ffe7e2ae2ccedf5" name="ad06d4004c0cb454b1ffe7e2ae2ccedf5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad06d4004c0cb454b1ffe7e2ae2ccedf5">◆ </a></span>symbol_table_t() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">theo::recomp::symbol_table_t::symbol_table_t </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></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>default constructor. does nothing. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html#l00050">50</a> of file <a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">symbol_table.hpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 50</span>{}</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="ab7dfbb8369463ce3d74ad656115cf4d5" name="ab7dfbb8369463ce3d74ad656115cf4d5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab7dfbb8369463ce3d74ad656115cf4d5">◆ </a></span>symbol_table_t() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">theo::recomp::symbol_table_t::symbol_table_t </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::vector< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> > && </td>
|
|
<td class="paramname"><em>syms</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>this constructor will populate the m_table private field with symbols. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">syms</td><td>vector of <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00034">34</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 34</span> {</div>
|
|
<div class="line"><span class="lineno"> 35</span> std::for_each(syms.begin(), syms.end(), [&](decomp::symbol_t sym) {</div>
|
|
<div class="line"><span class="lineno"> 36</span> m_table.insert({sym.hash(), sym});</div>
|
|
<div class="line"><span class="lineno"> 37</span> });</div>
|
|
<div class="line"><span class="lineno"> 38</span>}</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a35008ba37814a94209cf979302e13e6d" name="a35008ba37814a94209cf979302e13e6d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a35008ba37814a94209cf979302e13e6d">◆ </a></span>for_each()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void theo::recomp::symbol_table_t::for_each </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::function< void(<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> &sym)> </td>
|
|
<td class="paramname"><em>fn</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>this function is a wrapper function that allows you to get at each entry in the symbol table by reference. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">fn</td><td>a callback function that will be called for each symbol</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00049">49</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 49</span> {</div>
|
|
<div class="line"><span class="lineno"> 50</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> itr = m_table.begin(); itr != m_table.end(); ++itr)</div>
|
|
<div class="line"><span class="lineno"> 51</span> fn(itr->second);</div>
|
|
<div class="line"><span class="lineno"> 52</span>}</div>
|
|
</div><!-- fragment -->
|
|
<p class="reference">Referenced by <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00040">theo::recomp::recomp_t::allocate()</a>, and <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00056">theo::theo_t::compose()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af9caf2d4d97b2498aa624c3750a7a601" name="af9caf2d4d97b2498aa624c3750a7a601"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af9caf2d4d97b2498aa624c3750a7a601">◆ </a></span>put_symbol()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void theo::recomp::symbol_table_t::put_symbol </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> & </td>
|
|
<td class="paramname"><em>sym</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>add symbol to m_table </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">sym</td><td>symbol to be added.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00040">40</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 40</span> {</div>
|
|
<div class="line"><span class="lineno"> 41</span> m_table.insert({sym.hash(), sym});</div>
|
|
<div class="line"><span class="lineno"> 42</span>}</div>
|
|
</div><!-- fragment -->
|
|
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00088">theo::decomp::symbol_t::hash()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae7c35d9336f67d3175910c028e0b9b3e" name="ae7c35d9336f67d3175910c028e0b9b3e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae7c35d9336f67d3175910c028e0b9b3e">◆ </a></span>put_symbols()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void theo::recomp::symbol_table_t::put_symbols </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::vector< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> > & </td>
|
|
<td class="paramname"><em>syms</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>add a vector of symbol to m_table </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">syms</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00044">44</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 44</span> {</div>
|
|
<div class="line"><span class="lineno"> 45</span> std::for_each(syms.begin(), syms.end(),</div>
|
|
<div class="line"><span class="lineno"> 46</span> [&](decomp::symbol_t sym) { put_symbol(sym); });</div>
|
|
<div class="line"><span class="lineno"> 47</span>}</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="af57c0495a442ea86af0f9cca4521631e" name="af57c0495a442ea86af0f9cca4521631e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af57c0495a442ea86af0f9cca4521631e">◆ </a></span>size()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::uint32_t theo::recomp::symbol_table_t::size </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>returns the size of the symbol table. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>returns the size of the symbol table.</dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00072">72</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 72</span> {</div>
|
|
<div class="line"><span class="lineno"> 73</span> <span class="keywordflow">return</span> m_table.size();</div>
|
|
<div class="line"><span class="lineno"> 74</span>}</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="abaea9fd899d87b09d60c2b815624e2d2" name="abaea9fd899d87b09d60c2b815624e2d2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abaea9fd899d87b09d60c2b815624e2d2">◆ </a></span>sym_from_alloc()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::optional< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> * > theo::recomp::symbol_table_t::sym_from_alloc </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::uintptr_t </td>
|
|
<td class="paramname"><em>allocated_at</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>returns an optional pointer to a symbol given its allocation location. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">allocated_at</td><td>the address where the symbol is allocated at.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>returns an optional pointer to a <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">theo::decomp::symbol_t</a></dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00060">60</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 61</span> {</div>
|
|
<div class="line"><span class="lineno"> 62</span> <span class="keyword">auto</span> res =</div>
|
|
<div class="line"><span class="lineno"> 63</span> std::find_if(m_table.begin(), m_table.end(),</div>
|
|
<div class="line"><span class="lineno"> 64</span> [&](std::pair<const std::size_t, decomp::symbol_t> itr) {</div>
|
|
<div class="line"><span class="lineno"> 65</span> return itr.second.allocated_at() == allocated_at;</div>
|
|
<div class="line"><span class="lineno"> 66</span> });</div>
|
|
<div class="line"><span class="lineno"> 67</span> </div>
|
|
<div class="line"><span class="lineno"> 68</span> <span class="keywordflow">return</span> res != m_table.end() ? &res->second</div>
|
|
<div class="line"><span class="lineno"> 69</span> : std::optional<decomp::symbol_t*>{};</div>
|
|
<div class="line"><span class="lineno"> 70</span>}</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a308c0dbcc4d569467e0986b32ef30db5" name="a308c0dbcc4d569467e0986b32ef30db5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a308c0dbcc4d569467e0986b32ef30db5">◆ </a></span>sym_from_hash()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::optional< <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> * > theo::recomp::symbol_table_t::sym_from_hash </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::size_t </td>
|
|
<td class="paramname"><em>hash</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its name) the hash is produced by <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">theo::decomp::symbol_t::hash</a> </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">hash</td><td>hashcode of the symbol to get from the symbol table...</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>returns an optional pointer to a <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">theo::decomp::symbol_t</a></dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00054">54</a> of file <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a>.</p>
|
|
<div class="fragment"><div class="line"><span class="lineno"> 55</span> {</div>
|
|
<div class="line"><span class="lineno"> 56</span> <span class="keywordflow">return</span> m_table.count(hash) ? &m_table.at(hash)</div>
|
|
<div class="line"><span class="lineno"> 57</span> : std::optional<decomp::symbol_t*>{};</div>
|
|
<div class="line"><span class="lineno"> 58</span>}</div>
|
|
</div><!-- fragment -->
|
|
<p class="reference">Referenced by <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00068">theo::theo_t::resolve()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>include/recomp/<a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">symbol_table.hpp</a></li>
|
|
<li>src/recomp/<a class="el" href="../../da/d0c/symbol__table_8cpp_source.html">symbol_table.cpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
|
|
</small></address>
|
|
</body>
|
|
</html>
|