-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assembler_8h_source.html
205 lines (205 loc) · 35.6 KB
/
Assembler_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!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" lang="en-US">
<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.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ROSE: Assembler.h Source File</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/search.js"></script>
<link rel="search" href="search_opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="ROSE"/>
<link href="roseDoxygen.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="projectalign">
<div id="projectname">ROSE<span id="projectnumber"> 0.11.145.141</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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,true,'search.html','Search');
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_8509b06bafa958d2011203a730bf5778.html">frontend</a></li><li class="navelem"><a class="el" href="dir_01d256553a57eab573128ced8c11ea22.html">Disassemblers</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">Assembler.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef ROSE_BinaryAnalysis_Assembler_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ROSE_BinaryAnalysis_Assembler_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include <featureTests.h></span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#ifdef ROSE_ENABLE_BINARY_ANALYSIS</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include <Rose/Exception.h></span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceRose.html">Rose</a> {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span>BinaryAnalysis {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="foldopen" id="foldopen00058" data-start="{" data-end="};">
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html"> 58</a></span><span class="keyword">class </span><a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Assembler</a> {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00061" data-start="{" data-end="};">
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html"> 61</a></span> <span class="keyword">class </span><a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html">Exception</a>: <span class="keyword">public</span> <a class="code hl_class" href="classRose_1_1Exception.html">Rose::Exception</a> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00064" data-start="{" data-end="}">
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#a755814f06dfe3da7c384c09563add53e"> 64</a></span> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#a755814f06dfe3da7c384c09563add53e">Exception</a>(<span class="keyword">const</span> std::string &reason, <a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a> *<a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30">insn</a>)</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> : <a class="code hl_namespace" href="namespaceRose.html">Rose</a>::<a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html">Exception</a>(reason), <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30">insn</a>(<a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30">insn</a>)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> {}</div>
</div>
<div class="foldopen" id="foldopen00068" data-start="{" data-end="}">
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#aad354728fd2c0d3d7510abacb09e513d"> 68</a></span> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#aad354728fd2c0d3d7510abacb09e513d">Exception</a>(<span class="keyword">const</span> std::string &reason)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> : <a class="code hl_namespace" href="namespaceRose.html">Rose</a>::<a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html">Exception</a>(reason), <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30">insn</a>(NULL)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> {}</div>
</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">void</span> print(std::ostream&) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keyword">friend</span> std::ostream& operator<<(std::ostream&, <span class="keyword">const</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html">Exception</a>&);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30"> 74</a></span> <a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a> *<a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30">insn</a>; </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> };</div>
</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="foldopen" id="foldopen00080" data-start="{" data-end="};">
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9"> 80</a></span> <span class="keyword">enum</span> <a class="code hl_enumeration" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9">EncodingType</a></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9a8064607db6b2413b30bcc614e023dd78"> 82</a></span> <a class="code hl_enumvalue" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9a8064607db6b2413b30bcc614e023dd78">ET_SHORTEST</a>, </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9ad8e21e2c7a59e412db1e324de4a6b667"> 83</a></span> <a class="code hl_enumvalue" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9ad8e21e2c7a59e412db1e324de4a6b667">ET_LONGEST</a>, </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_enumvalue" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9adb03164bf5bab974ee254319e94dba9c">ET_MATCHES</a> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9adb03164bf5bab974ee254319e94dba9c"> 87</a></span> };</div>
</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Assembler</a>()</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> : <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aae5cb7d3958ee152c9756d23dcb5c4fd">p_debug</a>(NULL), <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a3eaec8ddc04bf212adb99286d1b20710">p_encoding_type</a>(<a class="code hl_enumvalue" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9a8064607db6b2413b30bcc614e023dd78">ET_SHORTEST</a>)</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> {}</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">virtual</span> ~Assembler() {}</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a68974c27617870fdf90fb4455f2928b4"> 96</a></span> <span class="keyword">static</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Assembler</a> *<a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a68974c27617870fdf90fb4455f2928b4">create</a>(<a class="code hl_class" href="classSgAsmInterpretation.html">SgAsmInterpretation</a> *interp);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a96e40c53b616396e95efc96d559c8bd3"> 99</a></span> <span class="keyword">static</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Assembler</a> *<a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a96e40c53b616396e95efc96d559c8bd3">create</a>(<a class="code hl_class" href="classSgAsmGenericHeader.html">SgAsmGenericHeader</a>*);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">/*==========================================================================================================================</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> * Main public assembly methods</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"> *========================================================================================================================== */</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#ab49117d475fe9d8b834806539af31e00"> 108</a></span> <span class="keyword">virtual</span> SgUnsignedCharList <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#ab49117d475fe9d8b834806539af31e00">assembleOne</a>(<a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a> *insn) = 0;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a8d5a8afa2676753c71f6957fbe86eccf"> 113</a></span> SgUnsignedCharList <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a8d5a8afa2676753c71f6957fbe86eccf">assembleBlock</a>(<a class="code hl_class" href="classSgAsmBlock.html">SgAsmBlock</a>*);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a25e6c8e5ec3a2bba922c44bd68531bf4"> 118</a></span> SgUnsignedCharList <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a25e6c8e5ec3a2bba922c44bd68531bf4">assembleBlock</a>(<span class="keyword">const</span> std::vector<SgAsmInstruction*> &insns, rose_addr_t starting_rva);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#ad2bcddf501c2b4655ba077fc58475f0e"> 121</a></span> <span class="keyword">virtual</span> SgUnsignedCharList <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#ad2bcddf501c2b4655ba077fc58475f0e">assembleProgram</a>(<span class="keyword">const</span> std::string &source) = 0;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="comment">/*==========================================================================================================================</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="comment"> * Assembler properties and settings</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="comment"> *========================================================================================================================== */</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00128" data-start="{" data-end="}">
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a805d351924f56d06ed146e36797c5e7f"> 128</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a805d351924f56d06ed146e36797c5e7f">set_encoding_type</a>(<a class="code hl_enumeration" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9">EncodingType</a> et) {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a3eaec8ddc04bf212adb99286d1b20710">p_encoding_type</a> = et;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
<div class="foldopen" id="foldopen00133" data-start="{" data-end="}">
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aff1a4b6f4032bbf4ab41ab2481f4759e"> 133</a></span> <a class="code hl_enumeration" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9">EncodingType</a> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aff1a4b6f4032bbf4ab41ab2481f4759e">get_encoding_type</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a3eaec8ddc04bf212adb99286d1b20710">p_encoding_type</a>;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
<div class="foldopen" id="foldopen00138" data-start="{" data-end="}">
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#af0245ab410d021384b44e736b0e5a91d"> 138</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#af0245ab410d021384b44e736b0e5a91d">set_debug</a>(FILE *f) {</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aae5cb7d3958ee152c9756d23dcb5c4fd">p_debug</a> = f;</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
<div class="foldopen" id="foldopen00143" data-start="{" data-end="}">
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a6eebe21be65c6d5bded7ee5453bdedb7"> 143</a></span> FILE *<a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a6eebe21be65c6d5bded7ee5453bdedb7">get_debug</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aae5cb7d3958ee152c9756d23dcb5c4fd">p_debug</a>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> }</div>
</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="comment">/*==========================================================================================================================</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="comment"> * Data members</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="comment"> *========================================================================================================================== */</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aae5cb7d3958ee152c9756d23dcb5c4fd"> 151</a></span> FILE *<a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aae5cb7d3958ee152c9756d23dcb5c4fd">p_debug</a>; </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a3eaec8ddc04bf212adb99286d1b20710"> 152</a></span> <a class="code hl_enumeration" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9">EncodingType</a> <a class="code hl_variable" href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a3eaec8ddc04bf212adb99286d1b20710">p_encoding_type</a>; </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span>};</div>
</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception_html"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html">Rose::BinaryAnalysis::Assembler::Exception</a></div><div class="ttdoc">Exception thrown by the assemblers.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00061">Assembler.h:61</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception_html_a755814f06dfe3da7c384c09563add53e"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#a755814f06dfe3da7c384c09563add53e">Rose::BinaryAnalysis::Assembler::Exception::Exception</a></div><div class="ttdeci">Exception(const std::string &reason, SgAsmInstruction *insn)</div><div class="ttdoc">An exception bound to a particular instruction being assembled.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00064">Assembler.h:64</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception_html_aad354728fd2c0d3d7510abacb09e513d"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#aad354728fd2c0d3d7510abacb09e513d">Rose::BinaryAnalysis::Assembler::Exception::Exception</a></div><div class="ttdeci">Exception(const std::string &reason)</div><div class="ttdoc">An exception not bound to a particular instruction.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00068">Assembler.h:68</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception_html_afd08dfdef1f2fbf6bb3962b13baddc30"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler_1_1Exception.html#afd08dfdef1f2fbf6bb3962b13baddc30">Rose::BinaryAnalysis::Assembler::Exception::insn</a></div><div class="ttdeci">SgAsmInstruction * insn</div><div class="ttdoc">Instruction associated with an assembly error.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00074">Assembler.h:74</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Rose::BinaryAnalysis::Assembler</a></div><div class="ttdoc">Virtual base class for instruction assemblers.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00058">Assembler.h:58</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a25e6c8e5ec3a2bba922c44bd68531bf4"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a25e6c8e5ec3a2bba922c44bd68531bf4">Rose::BinaryAnalysis::Assembler::assembleBlock</a></div><div class="ttdeci">SgUnsignedCharList assembleBlock(const std::vector< SgAsmInstruction * > &insns, rose_addr_t starting_rva)</div><div class="ttdoc">Assembles a single basic block of instructions like the version that takes an SgAsmBlock pointer.</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a3eaec8ddc04bf212adb99286d1b20710"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a3eaec8ddc04bf212adb99286d1b20710">Rose::BinaryAnalysis::Assembler::p_encoding_type</a></div><div class="ttdeci">EncodingType p_encoding_type</div><div class="ttdoc">Which encoding should be returned by assembleOne.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00152">Assembler.h:152</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a64d85570ab8c92e27bb6e6dc9057eeb9"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9">Rose::BinaryAnalysis::Assembler::EncodingType</a></div><div class="ttdeci">EncodingType</div><div class="ttdoc">Assemblers can often assemble a single instruction various ways.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00080">Assembler.h:81</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a64d85570ab8c92e27bb6e6dc9057eeb9a8064607db6b2413b30bcc614e023dd78"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9a8064607db6b2413b30bcc614e023dd78">Rose::BinaryAnalysis::Assembler::ET_SHORTEST</a></div><div class="ttdeci">@ ET_SHORTEST</div><div class="ttdoc">Returns the shortest possible encoding.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00082">Assembler.h:82</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a64d85570ab8c92e27bb6e6dc9057eeb9ad8e21e2c7a59e412db1e324de4a6b667"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9ad8e21e2c7a59e412db1e324de4a6b667">Rose::BinaryAnalysis::Assembler::ET_LONGEST</a></div><div class="ttdeci">@ ET_LONGEST</div><div class="ttdoc">Returns the longest encoding.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00083">Assembler.h:83</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a64d85570ab8c92e27bb6e6dc9057eeb9adb03164bf5bab974ee254319e94dba9c"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a64d85570ab8c92e27bb6e6dc9057eeb9adb03164bf5bab974ee254319e94dba9c">Rose::BinaryAnalysis::Assembler::ET_MATCHES</a></div><div class="ttdeci">@ ET_MATCHES</div><div class="ttdoc">Returns an encoding that matches the SgAsmInstruction::p_raw_bytes.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00087">Assembler.h:84</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a68974c27617870fdf90fb4455f2928b4"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a68974c27617870fdf90fb4455f2928b4">Rose::BinaryAnalysis::Assembler::create</a></div><div class="ttdeci">static Assembler * create(SgAsmInterpretation *interp)</div><div class="ttdoc">Creates an assembler that is appropriate for assembling instructions in the specified interpretation.</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a6eebe21be65c6d5bded7ee5453bdedb7"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a6eebe21be65c6d5bded7ee5453bdedb7">Rose::BinaryAnalysis::Assembler::get_debug</a></div><div class="ttdeci">FILE * get_debug() const</div><div class="ttdoc">Returns the file currently used for debugging; null implies no debugging.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00143">Assembler.h:143</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a805d351924f56d06ed146e36797c5e7f"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a805d351924f56d06ed146e36797c5e7f">Rose::BinaryAnalysis::Assembler::set_encoding_type</a></div><div class="ttdeci">void set_encoding_type(EncodingType et)</div><div class="ttdoc">Controls how the assembleOne() method determines which encoding to return.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00128">Assembler.h:128</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a8d5a8afa2676753c71f6957fbe86eccf"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a8d5a8afa2676753c71f6957fbe86eccf">Rose::BinaryAnalysis::Assembler::assembleBlock</a></div><div class="ttdeci">SgUnsignedCharList assembleBlock(SgAsmBlock *)</div><div class="ttdoc">Assembles a single basic block of instructions, packing them together and adjusting their virtual add...</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_a96e40c53b616396e95efc96d559c8bd3"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#a96e40c53b616396e95efc96d559c8bd3">Rose::BinaryAnalysis::Assembler::create</a></div><div class="ttdeci">static Assembler * create(SgAsmGenericHeader *)</div><div class="ttdoc">Creates an assembler that is appropriate for assembling instructions in the specified header.</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_aae5cb7d3958ee152c9756d23dcb5c4fd"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aae5cb7d3958ee152c9756d23dcb5c4fd">Rose::BinaryAnalysis::Assembler::p_debug</a></div><div class="ttdeci">FILE * p_debug</div><div class="ttdoc">Set to non-null to get debugging info.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00151">Assembler.h:151</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_ab49117d475fe9d8b834806539af31e00"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#ab49117d475fe9d8b834806539af31e00">Rose::BinaryAnalysis::Assembler::assembleOne</a></div><div class="ttdeci">virtual SgUnsignedCharList assembleOne(SgAsmInstruction *insn)=0</div><div class="ttdoc">This is the lowest level architecture-independent assembly function and is implemented in the archite...</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_ad2bcddf501c2b4655ba077fc58475f0e"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#ad2bcddf501c2b4655ba077fc58475f0e">Rose::BinaryAnalysis::Assembler::assembleProgram</a></div><div class="ttdeci">virtual SgUnsignedCharList assembleProgram(const std::string &source)=0</div><div class="ttdoc">Assembles a program from an assembly listing.</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_af0245ab410d021384b44e736b0e5a91d"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#af0245ab410d021384b44e736b0e5a91d">Rose::BinaryAnalysis::Assembler::set_debug</a></div><div class="ttdeci">void set_debug(FILE *f)</div><div class="ttdoc">Sends assembler diagnostics to the specified output stream.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00138">Assembler.h:138</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html_aff1a4b6f4032bbf4ab41ab2481f4759e"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html#aff1a4b6f4032bbf4ab41ab2481f4759e">Rose::BinaryAnalysis::Assembler::get_encoding_type</a></div><div class="ttdeci">EncodingType get_encoding_type() const</div><div class="ttdoc">Returns the encoding type employed by this assembler.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00133">Assembler.h:133</a></div></div>
<div class="ttc" id="aclassRose_1_1Exception_html"><div class="ttname"><a href="classRose_1_1Exception.html">Rose::Exception</a></div><div class="ttdoc">Base class for all ROSE exceptions.</div><div class="ttdef"><b>Definition</b> <a href="Rose_2Exception_8h_source.html#l00010">Rose/Exception.h:10</a></div></div>
<div class="ttc" id="aclassSgAsmBlock_html"><div class="ttname"><a href="classSgAsmBlock.html">SgAsmBlock</a></div><div class="ttdoc">Instruction basic block.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l40507">binaryInstruction.C:40507</a></div></div>
<div class="ttc" id="aclassSgAsmGenericHeader_html"><div class="ttname"><a href="classSgAsmGenericHeader.html">SgAsmGenericHeader</a></div><div class="ttdoc">Base class for container file headers.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l28618">binaryInstruction.C:28618</a></div></div>
<div class="ttc" id="aclassSgAsmInstruction_html"><div class="ttname"><a href="classSgAsmInstruction.html">SgAsmInstruction</a></div><div class="ttdoc">Base class for machine instructions.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l43208">binaryInstruction.C:43208</a></div></div>
<div class="ttc" id="aclassSgAsmInterpretation_html"><div class="ttname"><a href="classSgAsmInterpretation.html">SgAsmInterpretation</a></div><div class="ttdoc">Represents an interpretation of a binary container.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l14125">binaryInstruction.C:14125</a></div></div>
<div class="ttc" id="anamespaceRose_html"><div class="ttname"><a href="namespaceRose.html">Rose</a></div><div class="ttdoc">The ROSE library.</div><div class="ttdef"><b>Definition</b> <a href="BinaryTutorial_8dox_source.html#l00003">BinaryTutorial.dox:3</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 2 2024 00:07:47 for ROSE by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>