ROSE 0.11.145.247
SgAsmLEFileHeader.h
1
2#ifndef ROSE_SgAsmLEFileHeader_H
3#define ROSE_SgAsmLEFileHeader_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmGenericHeader.h>
7
8
9
10/* #line 1 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
11
12// WARNING -- GENERATED CODE -- DO NOT MODIFY THIS CODE -- WARNING!
13// This code is automatically generated for each
14// terminal and non-terminal within the defined
15// grammar. There is a simple way to change the
16// code to fix bugs etc. See the ROSE README file
17// for directions.
18
19// tps: (02/22/2010): Adding DLL export requirements
20#include "rosedll.h"
21
22// predeclarations for SgAsmLEFileHeader
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmLEFileHeader.h" */
25/* #line 8312 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28#include <Rose/BinaryAnalysis/ByteOrder.h>
29
30#ifdef ROSE_SgAsmLEFileHeader_IMPL
31#include <SgAsmDOSExtendedHeader.h>
32#include <SgAsmLEEntryTable.h>
33#include <SgAsmLENameTable.h>
34#include <SgAsmLEPageTable.h>
35#include <SgAsmLERelocTable.h>
36#include <SgAsmLESectionTable.h>
37#endif
38
39
40/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
41
42/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
43
44#if !defined(DOCUMENTATION)
45// Class Definition for SgAsmLEFileHeader
46class ROSE_DLL_API SgAsmLEFileHeader : public SgAsmGenericHeader
47 {
48 public:
49
50
51/* #line 52 "../../../src/frontend/SageIII//SgAsmLEFileHeader.h" */
52
53 virtual SgNode* copy ( SgCopyHelp& help) const override;
54// Start of memberFunctionString
55/* #line 8649 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
56
57
58 //----------------------- Boost serialization for SgAsmLEFileHeader -----------------------
59#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
60private:
61 friend class boost::serialization::access;
62
63 template<class S>
64 void serialize(S &s, const unsigned /*version*/) {
65 debugSerializationBegin("SgAsmLEFileHeader");
66 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
67 s & BOOST_SERIALIZATION_NVP(p_e_byte_order);
68 s & BOOST_SERIALIZATION_NVP(p_e_word_order);
69 s & BOOST_SERIALIZATION_NVP(p_e_format_level);
70 s & BOOST_SERIALIZATION_NVP(p_e_cpu_type);
71 s & BOOST_SERIALIZATION_NVP(p_e_os_type);
72 s & BOOST_SERIALIZATION_NVP(p_e_module_version);
73 s & BOOST_SERIALIZATION_NVP(p_e_flags);
74 s & BOOST_SERIALIZATION_NVP(p_e_eip_section);
75 s & BOOST_SERIALIZATION_NVP(p_e_esp_section);
76 s & BOOST_SERIALIZATION_NVP(p_e_last_page_size);
77 s & BOOST_SERIALIZATION_NVP(p_e_page_offset_shift);
78 s & BOOST_SERIALIZATION_NVP(p_e_fixup_sect_cksum);
79 s & BOOST_SERIALIZATION_NVP(p_e_loader_sect_cksum);
80 s & BOOST_SERIALIZATION_NVP(p_e_secttab_nentries);
81 s & BOOST_SERIALIZATION_NVP(p_e_rsrctab_nentries);
82 s & BOOST_SERIALIZATION_NVP(p_e_fmtdirtab_nentries);
83 s & BOOST_SERIALIZATION_NVP(p_e_import_modtab_nentries);
84 s & BOOST_SERIALIZATION_NVP(p_e_preload_npages);
85 s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_size);
86 s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_cksum);
87 s & BOOST_SERIALIZATION_NVP(p_e_auto_ds_section);
88 s & BOOST_SERIALIZATION_NVP(p_e_debug_info_size);
89 s & BOOST_SERIALIZATION_NVP(p_e_num_instance_preload);
90 s & BOOST_SERIALIZATION_NVP(p_e_num_instance_demand);
91 s & BOOST_SERIALIZATION_NVP(p_e_heap_size);
92 s & BOOST_SERIALIZATION_NVP(p_e_npages);
93 s & BOOST_SERIALIZATION_NVP(p_e_eip);
94 s & BOOST_SERIALIZATION_NVP(p_e_esp);
95 s & BOOST_SERIALIZATION_NVP(p_e_page_size);
96 s & BOOST_SERIALIZATION_NVP(p_e_fixup_sect_size);
97 s & BOOST_SERIALIZATION_NVP(p_e_loader_sect_size);
98 s & BOOST_SERIALIZATION_NVP(p_e_secttab_rfo);
99 s & BOOST_SERIALIZATION_NVP(p_e_pagetab_rfo);
100 s & BOOST_SERIALIZATION_NVP(p_e_iterpages_offset);
101 s & BOOST_SERIALIZATION_NVP(p_e_rsrctab_rfo);
102 s & BOOST_SERIALIZATION_NVP(p_e_resnametab_rfo);
103 s & BOOST_SERIALIZATION_NVP(p_e_entrytab_rfo);
104 s & BOOST_SERIALIZATION_NVP(p_e_fmtdirtab_rfo);
105 s & BOOST_SERIALIZATION_NVP(p_e_fixup_pagetab_rfo);
106 s & BOOST_SERIALIZATION_NVP(p_e_fixup_rectab_rfo);
107 s & BOOST_SERIALIZATION_NVP(p_e_import_modtab_rfo);
108 s & BOOST_SERIALIZATION_NVP(p_e_import_proctab_rfo);
109 s & BOOST_SERIALIZATION_NVP(p_e_ppcksumtab_rfo);
110 s & BOOST_SERIALIZATION_NVP(p_e_data_pages_offset);
111 s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_offset);
112 s & BOOST_SERIALIZATION_NVP(p_e_debug_info_rfo);
113 s & BOOST_SERIALIZATION_NVP(p_dos2Header);
114 s & BOOST_SERIALIZATION_NVP(p_sectionTable);
115 s & BOOST_SERIALIZATION_NVP(p_pageTable);
116 s & BOOST_SERIALIZATION_NVP(p_residentNameTable);
117 s & BOOST_SERIALIZATION_NVP(p_nonresidentNameTable);
118 s & BOOST_SERIALIZATION_NVP(p_entryTable);
119 s & BOOST_SERIALIZATION_NVP(p_relocationTable);
120 debugSerializationEnd("SgAsmLEFileHeader");
121 }
122#endif // ROSE_ENABLE_BOOST_SERIALIZATION
124 // Local types
126public:
127#ifdef _MSC_VER
128# pragma pack (1)
129#endif
130 /* File format of an LE/LX File Header (they are identical except bytes 0x2c-0x2f) */
131 struct LEFileHeader_disk {
132 unsigned char e_magic[2]; /* 0x00 magic number "LX" */
133 unsigned char e_byte_order; /* 0x02 byte order (0=>little endian; otherwise big endian) */
134 unsigned char e_word_order; /* 0x03 word order (0=>little endian; otherwise big endian) */
135 uint32_t e_format_level; /* 0x04 LX file format version number */
136 uint16_t e_cpu_type; /* 0x08 1=>80286, 2=>80386, 3=>80486,4=80586, etc. (see ctor) */
137 uint16_t e_os_type; /* 0x0a 0=>unknown, 1=>0S/2, 2=>Windows, 3=>DOS 4.x, 4=>Windows 386 */
138 uint32_t e_module_version; /* 0x0c user-specified module version number */
139 uint32_t e_flags; /* 0x10 bit flags (see LXFileHeaderFlags) */
140 uint32_t e_npages; /* 0x14 number of physically contained pages (see e_page_size) */
141 uint32_t e_eip_section; /* 0x18 the section number to which e_eip is relative */
142 uint32_t e_eip; /* 0x1c entry address relative to e_eip_section */
143 uint32_t e_esp_section; /* 0x20 the section number to which e_esp is relative */
144 uint32_t e_esp; /* 0x24 starting stack address relative to e_esp_section */
145 uint32_t e_page_size; /* 0x28 page size in bytes */
146 uint32_t e_lps_or_shift; /* 0x2c size of last page (LE) or shift for page table's page offset field (LX) */
147 uint32_t e_fixup_sect_size; /* 0x30 total size of fixup info in bytes (fixup page/record tables + import names) */
148 uint32_t e_fixup_sect_cksum; /* 0x34 cryptographic checksum of all fixup info, or zero */
149 uint32_t e_loader_sect_size; /* 0x38 size of memory resident tables (section table through per-page checksum table) */
150 uint32_t e_loader_sect_cksum; /* 0x3c cryptographic checksum for all loader info, or zero */
151 uint32_t e_secttab_rfo; /* 0x40 offset of section table relative to this header */
152 uint32_t e_secttab_nentries; /* 0x44 number of entries in section table */
153 uint32_t e_pagetab_rfo; /* 0x48 section page table offset relative to this header */
154 uint32_t e_iterpages_offset; /* 0x4c section iterated pages offset (absolute file offset) */
155 uint32_t e_rsrctab_rfo; /* 0x50 offset of resource table relative to this header */
156 uint32_t e_rsrctab_nentries; /* 0x54 number of entries in the resource table */
157 uint32_t e_resnametab_rfo; /* 0x58 offset of resident name table relative to this header */
158 uint32_t e_entrytab_rfo; /* 0x5c offset of entry table relative to this header */
159 uint32_t e_fmtdirtab_rfo; /* 0x60 offset of module format directives relative to this header */
160 uint32_t e_fmtdirtab_nentries; /* 0x64 number of entries in module format directives table */
161 uint32_t e_fixup_pagetab_rfo; /* 0x68 offset of fixup page table relative to this header */
162 uint32_t e_fixup_rectab_rfo; /* 0x6c offset of fixup record table relative to this header */
163 uint32_t e_import_modtab_rfo; /* 0x70 offset of import module name table relative to this header */
164 uint32_t e_import_modtab_nentries;/*0x74 number of entries in import module name table */
165 uint32_t e_import_proctab_rfo; /* 0x78 offset of import procedure name table relative to this header */
166 uint32_t e_ppcksumtab_rfo; /* 0x7c offset of per-page checksum table relative to this header */
167 uint32_t e_data_pages_offset; /* 0x80 offset of data pages (absolute file offset) */
168 uint32_t e_preload_npages; /* 0x84 number of preload pages (not respected by OS/2) */
169 uint32_t e_nonresnametab_offset; /* 0x88 offset of non-resident name table (absolute file offset) */
170 uint32_t e_nonresnametab_size; /* 0x8c size of non-resident name table in bytes */
171 uint32_t e_nonresnametab_cksum; /* 0x90 cryptographic checksum of the non-resident name table */
172 uint32_t e_auto_ds_section; /* 0x94 auto data segment section number (not used by 32-bit modules) */
173 uint32_t e_debug_info_rfo; /* 0x98 offset of debug information relative to this header */
174 uint32_t e_debug_info_size; /* 0x9c size of debug information in bytes */
175 uint32_t e_num_instance_preload; /* 0xa0 number of instance data pages found in the preload section */
176 uint32_t e_num_instance_demand; /* 0xa4 number of instance data pages found in the demand section */
177 uint32_t e_heap_size; /* 0xa8 number of bytes added to auto data segment by loader (not used by 32-bit) */
178 } /* 0xac */
179// DQ (3/7/2013): Adding support to restrict visability to SWIG.
180#ifndef SWIG
181#ifndef _MSC_VER
182 __attribute__((packed))
183#endif
184#endif
185 ;
186#ifdef _MSC_VER
187# pragma pack ()
188#endif
189
190 enum LEFileHeaderFlags {
191 HF_RESERVED = 0xbffc5ccb, /* Reserved bits */
192 HF_PROC_LIB_INIT = 0x00000004, /* Per-process library initialization; not used for executables */
193 HF_IFIXUPS_APPLIED = 0x00000010, /* Sections have preferred load addresses and internal relocs have been applied */
194 HF_EFIXUPS_APPLIED = 0x00000020, /* External fixups for the module have been applied */
195 HF_PM_WINDOW_NO = 0x00000100, /* Incompatible with PM windowing */
196 HF_PM_WINDOW_OK = 0x00000200, /* Compatible with PM windowing */
197 HF_PM_WINDOW_USE = 0x00000300, /* Uses PM windowing API */
198 HF_NOT_LOADABLE = 0x00002000, /* Module is not loadable (has errors or incrementally linked) */
199 HF_PROC_LIB_TERM = 0x40000000, /* Per-process library termination; not used for executables */
200
201 HF_MODTYPE_MASK = 0x00038000, /* Module type mask */
202 HF_MODTYPE_PROG = 0x00000000, /* Program module (other modules cannot link to this one) */
203 HF_MODTYPE_LIB = 0x00008000, /* Library module */
204 HF_MODTYPE_PLIB = 0x00018000, /* Protected memory library module */
205 HF_MODTYPE_PDEV = 0x00020000, /* Physical device driver module */
206 HF_MODTYPE_VDEV = 0x00028000 /* Virtual device driver module */
207 };
208
210 // Properties
212public:
213public:
214 unsigned const& get_e_byte_order() const;
215 void set_e_byte_order(unsigned const&);
216
217public:
218 unsigned const& get_e_word_order() const;
219 void set_e_word_order(unsigned const&);
220
221public:
222 unsigned const& get_e_format_level() const;
223 void set_e_format_level(unsigned const&);
224
225public:
226 unsigned const& get_e_cpu_type() const;
227 void set_e_cpu_type(unsigned const&);
228
229public:
230 unsigned const& get_e_os_type() const;
231 void set_e_os_type(unsigned const&);
232
233public:
234 unsigned const& get_e_module_version() const;
235 void set_e_module_version(unsigned const&);
236
237public:
238 unsigned const& get_e_flags() const;
239 void set_e_flags(unsigned const&);
240
241public:
242 unsigned const& get_e_eip_section() const;
243 void set_e_eip_section(unsigned const&);
244
245public:
246 unsigned const& get_e_esp_section() const;
247 void set_e_esp_section(unsigned const&);
248
249public:
250 unsigned const& get_e_last_page_size() const;
251 void set_e_last_page_size(unsigned const&);
252
253public:
254 unsigned const& get_e_page_offset_shift() const;
255 void set_e_page_offset_shift(unsigned const&);
256
257public:
258 unsigned const& get_e_fixup_sect_cksum() const;
259 void set_e_fixup_sect_cksum(unsigned const&);
260
261public:
262 unsigned const& get_e_loader_sect_cksum() const;
263 void set_e_loader_sect_cksum(unsigned const&);
264
265public:
266 unsigned const& get_e_secttab_nentries() const;
267 void set_e_secttab_nentries(unsigned const&);
268
269public:
270 unsigned const& get_e_rsrctab_nentries() const;
271 void set_e_rsrctab_nentries(unsigned const&);
272
273public:
274 unsigned const& get_e_fmtdirtab_nentries() const;
275 void set_e_fmtdirtab_nentries(unsigned const&);
276
277public:
278 unsigned const& get_e_import_modtab_nentries() const;
279 void set_e_import_modtab_nentries(unsigned const&);
280
281public:
282 unsigned const& get_e_preload_npages() const;
283 void set_e_preload_npages(unsigned const&);
284
285public:
286 unsigned const& get_e_nonresnametab_size() const;
287 void set_e_nonresnametab_size(unsigned const&);
288
289public:
290 unsigned const& get_e_nonresnametab_cksum() const;
291 void set_e_nonresnametab_cksum(unsigned const&);
292
293public:
294 unsigned const& get_e_auto_ds_section() const;
295 void set_e_auto_ds_section(unsigned const&);
296
297public:
298 unsigned const& get_e_debug_info_size() const;
299 void set_e_debug_info_size(unsigned const&);
300
301public:
302 unsigned const& get_e_num_instance_preload() const;
303 void set_e_num_instance_preload(unsigned const&);
304
305public:
306 unsigned const& get_e_num_instance_demand() const;
307 void set_e_num_instance_demand(unsigned const&);
308
309public:
310 unsigned const& get_e_heap_size() const;
311 void set_e_heap_size(unsigned const&);
312
313public:
314 Rose::BinaryAnalysis::Address const& get_e_npages() const;
315 void set_e_npages(Rose::BinaryAnalysis::Address const&);
316
317public:
318 Rose::BinaryAnalysis::Address const& get_e_eip() const;
319 void set_e_eip(Rose::BinaryAnalysis::Address const&);
320
321public:
322 Rose::BinaryAnalysis::Address const& get_e_esp() const;
323 void set_e_esp(Rose::BinaryAnalysis::Address const&);
324
325public:
326 Rose::BinaryAnalysis::Address const& get_e_page_size() const;
327 void set_e_page_size(Rose::BinaryAnalysis::Address const&);
328
329public:
330 Rose::BinaryAnalysis::Address const& get_e_fixup_sect_size() const;
331 void set_e_fixup_sect_size(Rose::BinaryAnalysis::Address const&);
332
333public:
334 Rose::BinaryAnalysis::Address const& get_e_loader_sect_size() const;
335 void set_e_loader_sect_size(Rose::BinaryAnalysis::Address const&);
336
337public:
338 Rose::BinaryAnalysis::Address const& get_e_secttab_rfo() const;
339 void set_e_secttab_rfo(Rose::BinaryAnalysis::Address const&);
340
341public:
342 Rose::BinaryAnalysis::Address const& get_e_pagetab_rfo() const;
343 void set_e_pagetab_rfo(Rose::BinaryAnalysis::Address const&);
344
345public:
346 Rose::BinaryAnalysis::Address const& get_e_iterpages_offset() const;
347 void set_e_iterpages_offset(Rose::BinaryAnalysis::Address const&);
348
349public:
350 Rose::BinaryAnalysis::Address const& get_e_rsrctab_rfo() const;
351 void set_e_rsrctab_rfo(Rose::BinaryAnalysis::Address const&);
352
353public:
354 Rose::BinaryAnalysis::Address const& get_e_resnametab_rfo() const;
355 void set_e_resnametab_rfo(Rose::BinaryAnalysis::Address const&);
356
357public:
358 Rose::BinaryAnalysis::Address const& get_e_entrytab_rfo() const;
359 void set_e_entrytab_rfo(Rose::BinaryAnalysis::Address const&);
360
361public:
362 Rose::BinaryAnalysis::Address const& get_e_fmtdirtab_rfo() const;
363 void set_e_fmtdirtab_rfo(Rose::BinaryAnalysis::Address const&);
364
365public:
366 Rose::BinaryAnalysis::Address const& get_e_fixup_pagetab_rfo() const;
367 void set_e_fixup_pagetab_rfo(Rose::BinaryAnalysis::Address const&);
368
369public:
370 Rose::BinaryAnalysis::Address const& get_e_fixup_rectab_rfo() const;
371 void set_e_fixup_rectab_rfo(Rose::BinaryAnalysis::Address const&);
372
373public:
374 Rose::BinaryAnalysis::Address const& get_e_import_modtab_rfo() const;
375 void set_e_import_modtab_rfo(Rose::BinaryAnalysis::Address const&);
376
377public:
378 Rose::BinaryAnalysis::Address const& get_e_import_proctab_rfo() const;
379 void set_e_import_proctab_rfo(Rose::BinaryAnalysis::Address const&);
380
381public:
382 Rose::BinaryAnalysis::Address const& get_e_ppcksumtab_rfo() const;
383 void set_e_ppcksumtab_rfo(Rose::BinaryAnalysis::Address const&);
384
385public:
386 Rose::BinaryAnalysis::Address const& get_e_data_pages_offset() const;
387 void set_e_data_pages_offset(Rose::BinaryAnalysis::Address const&);
388
389public:
390 Rose::BinaryAnalysis::Address const& get_e_nonresnametab_offset() const;
391 void set_e_nonresnametab_offset(Rose::BinaryAnalysis::Address const&);
392
393public:
394 Rose::BinaryAnalysis::Address const& get_e_debug_info_rfo() const;
395 void set_e_debug_info_rfo(Rose::BinaryAnalysis::Address const&);
396
397public:
398 SgAsmDOSExtendedHeader* const& get_dos2Header() const;
399 void set_dos2Header(SgAsmDOSExtendedHeader* const&);
400
401public:
402 SgAsmLESectionTable* const& get_sectionTable() const;
403 void set_sectionTable(SgAsmLESectionTable* const&);
404
405public:
406 SgAsmLEPageTable* const& get_pageTable() const;
407 void set_pageTable(SgAsmLEPageTable* const&);
408
409public:
410 SgAsmLENameTable* const& get_residentNameTable() const;
411 void set_residentNameTable(SgAsmLENameTable* const&);
412
413public:
414 SgAsmLENameTable* const& get_nonresidentNameTable() const;
415 void set_nonresidentNameTable(SgAsmLENameTable* const&);
416
417public:
418 SgAsmLEEntryTable* const& get_entryTable() const;
419 void set_entryTable(SgAsmLEEntryTable* const&);
420
421public:
422 SgAsmLERelocTable* const& get_relocationTable() const;
423 void set_relocationTable(SgAsmLERelocTable* const&);
425 // Functions
427public:
429 virtual void unparse(std::ostream&) const override;
430 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
431
432 // Overloaded base class virtual function
433 const char *formatName() const override;
434
435 static bool isLe (SgAsmGenericFile*);
437
438private:
440
442 // Deprecated 2023-11
444public:
445 SgAsmDOSExtendedHeader* get_dos2_header() const ROSE_DEPRECATED("use get_dos2Header");
446 void set_dos2_header(SgAsmDOSExtendedHeader*) ROSE_DEPRECATED("use set_dos2Header");
447 SgAsmLESectionTable* get_section_table() const ROSE_DEPRECATED("use get_sectionTable");
448 void set_section_table(SgAsmLESectionTable*) ROSE_DEPRECATED("use set_sectionTable");
449 SgAsmLEPageTable* get_page_table() const ROSE_DEPRECATED("use get_pageTable");
450 void set_page_table(SgAsmLEPageTable*) ROSE_DEPRECATED("use set_pageTable");
451 SgAsmLENameTable* get_resname_table() const ROSE_DEPRECATED("use get_residentNameTable");
452 void set_resname_table(SgAsmLENameTable*) ROSE_DEPRECATED("use set_residentNameTable");
453 SgAsmLENameTable* get_nonresname_table() const ROSE_DEPRECATED("use get_nonresidentNameTable");
454 void set_nonresname_table(SgAsmLENameTable*) ROSE_DEPRECATED("use set_nonresidentNameTable");
455 SgAsmLEEntryTable* get_entry_table() const ROSE_DEPRECATED("use get_entryTable");
456 void set_entry_table(SgAsmLEEntryTable*) ROSE_DEPRECATED("use set_entryTable");
457 SgAsmLERelocTable* get_reloc_table() const ROSE_DEPRECATED("use get_relocationTable");
458 void set_reloc_table(SgAsmLERelocTable*) ROSE_DEPRECATED("use set_relocationTable");
459 const char *format_name() const override ROSE_DEPRECATED("use formatName");
460 static bool is_LE (SgAsmGenericFile*) ROSE_DEPRECATED("use isLe");
461public:
463 virtual ~SgAsmLEFileHeader();
464
465public:
468
469protected:
476 void initializeProperties();
477
478
479// End of memberFunctionString
480// Start of memberFunctionString
481/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
482
483// *** COMMON CODE SECTION BEGINS HERE ***
484
485 public:
486
487 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
488 // and not required which is required to match the other aspects of the copy mechanism code generation.
489 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
490 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
491 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
492 // virtual SgNode* copy ( const SgCopyHelp & help) const;
493
495 virtual std::string class_name() const override;
496
498 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
499
501 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
502 // static const VariantT static_variant = V_SgAsmLEFileHeader;
503 enum { static_variant = V_SgAsmLEFileHeader };
504
505 /* the generated cast function */
507 ROSE_DLL_API friend SgAsmLEFileHeader* isSgAsmLEFileHeader( SgNode * s );
508
510 ROSE_DLL_API friend const SgAsmLEFileHeader* isSgAsmLEFileHeader( const SgNode * s );
511
512 // ******************************************
513 // * Memory Pool / New / Delete
514 // ******************************************
515
516 public:
518 static const unsigned pool_size; //
520 static std::vector<unsigned char *> pools; //
522 static SgAsmLEFileHeader * next_node; //
523
525 static unsigned long initializeStorageClassArray(SgAsmLEFileHeaderStorageClass *); //
526
528 static void clearMemoryPool(); //
529 static void deleteMemoryPool(); //
530
532 static void extendMemoryPoolForFileIO(); //
533
535 static SgAsmLEFileHeader * getPointerFromGlobalIndex(unsigned long); //
537 static SgAsmLEFileHeader * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
538
540 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
542 static void resetValidFreepointers(); //
544 static unsigned long getNumberOfLastValidPointer(); //
545
546
547#if defined(INLINE_FUNCTIONS)
549 inline void *operator new (size_t size);
550#else
552 void *operator new (size_t size);
553#endif
555 void operator delete (void* pointer, size_t size);
556
557 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
558 void operator delete (void* pointer)
559 {
560 // This is the generated delete operator...
561 SgAsmLEFileHeader::operator delete (pointer,sizeof(SgAsmLEFileHeader));
562 }
563
565 static size_t numberOfNodes();
566
568 static size_t memoryUsage();
569
570 // End of scope which started in IR nodes specific code
571 /* */
572
573 /* name Internal Functions
574 \brief Internal functions ... incomplete-documentation
575
576 These functions have been made public as part of the design, but they are suggested for internal use
577 or by particularly knowledgeable users for specialized tools or applications.
578
579 \internal We could not make these private because they are required by user for special purposes. And
580 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
581
582 */
583
584 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
585 // overridden in every class by *generated* implementation
587 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
588 // MS: 06/28/02 container of names of variables or container indices
589 // used used in the traversal to access AST successor nodes
590 // overridden in every class by *generated* implementation
593 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
594
595 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
596 // than all the vector copies. The implementation for these functions is generated for each class.
598 virtual size_t get_numberOfTraversalSuccessors() const override;
600 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
602 virtual size_t get_childIndex(SgNode *child) const override;
603
604#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
605 // MS: 08/16/2002 method for generating RTI information
607 virtual RTIReturnType roseRTI() override;
608#endif
609 /* */
610
611
612
613 /* name Deprecated Functions
614 \brief Deprecated functions ... incomplete-documentation
615
616 These functions have been deprecated from use.
617 */
618 /* */
619
621 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
622
623 // JJW (10/16/2008): Changed to a single function in Node.code, and put
624 // getVariant() in #if 0 block to prevent confusing Doxygen
625#if 0
627 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
629 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
630#endif
631 /* */
632
633
634
635
636 public:
637 /* name Traversal Support Functions
638 \brief Traversal support functions ... incomplete-documentation
639
640 These functions have been made public as part of the design, but they are suggested for internal use
641 or by particularly knowledgable users for specialized tools or applications.
642 */
643 /* */
644
645 // DQ (11/26/2005): Support for visitor pattern mechanims
646 // (inferior to ROSE traversal mechanism, experimental).
650
651 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
653 virtual void accept (ROSE_VisitorPattern & visitor) override;
654
655 // DQ (12/26/2005): Support for traversal based on the memory pool
658 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
659
663
664 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
665 // This traversal helps support internal tools that call static member functions.
666 // note: this function operates on the memory pools.
669 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
670 /* */
671
672 public:
673 /* NodeId support functions */
675 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
678 static SgAsmLEFileHeader* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
681 static std::string getNodeIdString(SgAsmLEFileHeader* sgnode);
682 static std::string getNodeIdStringInternal(SgAsmLEFileHeader* sgnode);
683
684 public:
685 /* name Memory Allocation Functions
686 \brief Memory allocations functions ... incomplete-documentation
687
688 These functions have been made public as part of the design, but they are suggested for internal use
689 or by particularly knowledgable users for specialized tools or applications.
690 */
691 /* */
692
703 virtual bool isInMemoryPool() override;
704
715 virtual void checkDataMemberPointersIfInMemoryPool() override;
716
717 // DQ (4/30/2006): Modified to be a const function.
732 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
733
744
756 virtual long getChildIndex( SgNode* childNode ) const override;
757
758 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
759 // comment here (changed to be a C style comment and not be a doxygen comment).
760 /* \brief Constructor for use by AST File I/O Mechanism
761
762 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
763 which obtained via fast binary file I/O from disk.
764 */
765 // SgAsmLEFileHeader( SgAsmLEFileHeaderStorageClass& source );
766
767
768
769
770
771 // JH (10/24/2005): methods added to support the ast file IO
772 private:
773
774 /* name AST Memory Allocation Support Functions
775 \brief Memory allocations support....
776
777 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
778 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
779 and support the AST File I/O Mechanism.
780 */
781 /* */
782
783 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
784 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
785 that I use the same type everywhere, if any changes are made. THe second one declares the type
786 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
787 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
788 a correspinding one in the AST_FILE_IO class!
789 */
790 // DQ (9/2/2015): This typedef is no longer used, we can't define the
791 // comment here (changed to be a C style comment and not be a doxygen comment).
792 /* \brief Typedef used for low level memory access.
793 */
794 // typedef unsigned char* TestType;
795
796 // DQ (9/2/2015): This typedef is no longer used, we can't define the
797 // comment here (changed to be a C style comment and not be a doxygen comment).
798 /* \brief Typedef used to hold memory addresses as values.
799 */
800 // typedef unsigned long AddressType;
801
802
803
804 // necessary, to have direct access to the p_freepointer and the private methods !
806 friend class AST_FILE_IO;
807
809 friend class SgAsmLEFileHeaderStorageClass;
810
812 friend class AstSpecificDataManagingClass;
813
815 friend class AstSpecificDataManagingClassStorageClass;
816 public:
818 SgAsmLEFileHeader( const SgAsmLEFileHeaderStorageClass& source );
819
820 // private: // JJW hack
821 /*
822 name AST Memory Allocation Support Variables
823 Memory allocations support variables
824
825 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
826 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
827 and support the AST File I/O Mechanism.
828 */
829 /* */
830
831 public:
832
833 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
834 // to current node (so that it will work cleanly with build functions to specify patterns).
835 // virtual SgNode* addRegExpAttribute();
842
843#ifndef _MSC_VER
844// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
845// and likely never fully implemented nor tested. Files remain in the src tree but are no
846// longer built.
847#define BUILD_ATERM_SUPPORT 0
848 #if BUILD_ATERM_SUPPORT
849 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
850 // DQ (10/4/2014): Adding ATerm support to ROSE.
860 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
861 virtual ATerm generate_ATerm() override;
862
864 virtual void generate_ATerm_Annotation(ATerm & term) override;
865 #endif
866 #endif // BUILD_ATERM_SUPPORT
867#endif
868 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
869 // virtual generate_AST(ATerm & term);
870 // virtual void read_ATerm_Annotation(ATerm & term);
871
872// *** COMMON CODE SECTION ENDS HERE ***
873
874
875// End of memberFunctionString
876// Start of memberFunctionString
877/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
878
879 // the generated cast function
880 // friend ROSE_DLL_API SgAsmLEFileHeader* isSgAsmLEFileHeader ( SgNode* s );
881
882 typedef SgAsmGenericHeader base_node_type;
883
884
885// End of memberFunctionString
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940 protected:
941// Start of memberFunctionString
942unsigned p_e_byte_order;
943
944// End of memberFunctionString
945// Start of memberFunctionString
946unsigned p_e_word_order;
947
948// End of memberFunctionString
949// Start of memberFunctionString
950unsigned p_e_format_level;
951
952// End of memberFunctionString
953// Start of memberFunctionString
954unsigned p_e_cpu_type;
955
956// End of memberFunctionString
957// Start of memberFunctionString
958unsigned p_e_os_type;
959
960// End of memberFunctionString
961// Start of memberFunctionString
962unsigned p_e_module_version;
963
964// End of memberFunctionString
965// Start of memberFunctionString
966unsigned p_e_flags;
967
968// End of memberFunctionString
969// Start of memberFunctionString
970unsigned p_e_eip_section;
971
972// End of memberFunctionString
973// Start of memberFunctionString
974unsigned p_e_esp_section;
975
976// End of memberFunctionString
977// Start of memberFunctionString
978unsigned p_e_last_page_size;
979
980// End of memberFunctionString
981// Start of memberFunctionString
982unsigned p_e_page_offset_shift;
983
984// End of memberFunctionString
985// Start of memberFunctionString
986unsigned p_e_fixup_sect_cksum;
987
988// End of memberFunctionString
989// Start of memberFunctionString
990unsigned p_e_loader_sect_cksum;
991
992// End of memberFunctionString
993// Start of memberFunctionString
994unsigned p_e_secttab_nentries;
995
996// End of memberFunctionString
997// Start of memberFunctionString
998unsigned p_e_rsrctab_nentries;
999
1000// End of memberFunctionString
1001// Start of memberFunctionString
1002unsigned p_e_fmtdirtab_nentries;
1003
1004// End of memberFunctionString
1005// Start of memberFunctionString
1006unsigned p_e_import_modtab_nentries;
1007
1008// End of memberFunctionString
1009// Start of memberFunctionString
1010unsigned p_e_preload_npages;
1011
1012// End of memberFunctionString
1013// Start of memberFunctionString
1014unsigned p_e_nonresnametab_size;
1015
1016// End of memberFunctionString
1017// Start of memberFunctionString
1018unsigned p_e_nonresnametab_cksum;
1019
1020// End of memberFunctionString
1021// Start of memberFunctionString
1022unsigned p_e_auto_ds_section;
1023
1024// End of memberFunctionString
1025// Start of memberFunctionString
1026unsigned p_e_debug_info_size;
1027
1028// End of memberFunctionString
1029// Start of memberFunctionString
1030unsigned p_e_num_instance_preload;
1031
1032// End of memberFunctionString
1033// Start of memberFunctionString
1034unsigned p_e_num_instance_demand;
1035
1036// End of memberFunctionString
1037// Start of memberFunctionString
1038unsigned p_e_heap_size;
1039
1040// End of memberFunctionString
1041// Start of memberFunctionString
1043
1044// End of memberFunctionString
1045// Start of memberFunctionString
1047
1048// End of memberFunctionString
1049// Start of memberFunctionString
1051
1052// End of memberFunctionString
1053// Start of memberFunctionString
1054Rose::BinaryAnalysis::Address p_e_page_size;
1055
1056// End of memberFunctionString
1057// Start of memberFunctionString
1058Rose::BinaryAnalysis::Address p_e_fixup_sect_size;
1059
1060// End of memberFunctionString
1061// Start of memberFunctionString
1062Rose::BinaryAnalysis::Address p_e_loader_sect_size;
1063
1064// End of memberFunctionString
1065// Start of memberFunctionString
1066Rose::BinaryAnalysis::Address p_e_secttab_rfo;
1067
1068// End of memberFunctionString
1069// Start of memberFunctionString
1070Rose::BinaryAnalysis::Address p_e_pagetab_rfo;
1071
1072// End of memberFunctionString
1073// Start of memberFunctionString
1074Rose::BinaryAnalysis::Address p_e_iterpages_offset;
1075
1076// End of memberFunctionString
1077// Start of memberFunctionString
1078Rose::BinaryAnalysis::Address p_e_rsrctab_rfo;
1079
1080// End of memberFunctionString
1081// Start of memberFunctionString
1082Rose::BinaryAnalysis::Address p_e_resnametab_rfo;
1083
1084// End of memberFunctionString
1085// Start of memberFunctionString
1086Rose::BinaryAnalysis::Address p_e_entrytab_rfo;
1087
1088// End of memberFunctionString
1089// Start of memberFunctionString
1090Rose::BinaryAnalysis::Address p_e_fmtdirtab_rfo;
1091
1092// End of memberFunctionString
1093// Start of memberFunctionString
1094Rose::BinaryAnalysis::Address p_e_fixup_pagetab_rfo;
1095
1096// End of memberFunctionString
1097// Start of memberFunctionString
1098Rose::BinaryAnalysis::Address p_e_fixup_rectab_rfo;
1099
1100// End of memberFunctionString
1101// Start of memberFunctionString
1102Rose::BinaryAnalysis::Address p_e_import_modtab_rfo;
1103
1104// End of memberFunctionString
1105// Start of memberFunctionString
1106Rose::BinaryAnalysis::Address p_e_import_proctab_rfo;
1107
1108// End of memberFunctionString
1109// Start of memberFunctionString
1110Rose::BinaryAnalysis::Address p_e_ppcksumtab_rfo;
1111
1112// End of memberFunctionString
1113// Start of memberFunctionString
1114Rose::BinaryAnalysis::Address p_e_data_pages_offset;
1115
1116// End of memberFunctionString
1117// Start of memberFunctionString
1118Rose::BinaryAnalysis::Address p_e_nonresnametab_offset;
1119
1120// End of memberFunctionString
1121// Start of memberFunctionString
1122Rose::BinaryAnalysis::Address p_e_debug_info_rfo;
1123
1124// End of memberFunctionString
1125// Start of memberFunctionString
1126SgAsmDOSExtendedHeader* p_dos2Header;
1127
1128// End of memberFunctionString
1129// Start of memberFunctionString
1130SgAsmLESectionTable* p_sectionTable;
1131
1132// End of memberFunctionString
1133// Start of memberFunctionString
1134SgAsmLEPageTable* p_pageTable;
1135
1136// End of memberFunctionString
1137// Start of memberFunctionString
1138SgAsmLENameTable* p_residentNameTable;
1139
1140// End of memberFunctionString
1141// Start of memberFunctionString
1142SgAsmLENameTable* p_nonresidentNameTable;
1143
1144// End of memberFunctionString
1145// Start of memberFunctionString
1146SgAsmLEEntryTable* p_entryTable;
1147
1148// End of memberFunctionString
1149// Start of memberFunctionString
1150SgAsmLERelocTable* p_relocationTable;
1151
1152// End of memberFunctionString
1153
1155 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_byte_order>;
1156 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_word_order>;
1157 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_format_level>;
1158 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_cpu_type>;
1159 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_os_type>;
1160 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_module_version>;
1161 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_flags>;
1162 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_eip_section>;
1163 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_esp_section>;
1164 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_last_page_size>;
1165 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_page_offset_shift>;
1166 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_fixup_sect_cksum>;
1167 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_loader_sect_cksum>;
1168 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_secttab_nentries>;
1169 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_rsrctab_nentries>;
1170 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_fmtdirtab_nentries>;
1171 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_import_modtab_nentries>;
1172 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_preload_npages>;
1173 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_nonresnametab_size>;
1174 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_nonresnametab_cksum>;
1175 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_auto_ds_section>;
1176 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_debug_info_size>;
1177 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_num_instance_preload>;
1178 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_num_instance_demand>;
1179 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, unsigned,&SgAsmLEFileHeader::p_e_heap_size>;
1180 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_npages>;
1181 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_eip>;
1182 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_esp>;
1183 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_page_size>;
1184 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_fixup_sect_size>;
1185 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_loader_sect_size>;
1186 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_secttab_rfo>;
1187 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_pagetab_rfo>;
1188 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_iterpages_offset>;
1189 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_rsrctab_rfo>;
1190 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_resnametab_rfo>;
1191 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_entrytab_rfo>;
1192 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_fmtdirtab_rfo>;
1193 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_fixup_pagetab_rfo>;
1194 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_fixup_rectab_rfo>;
1195 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_import_modtab_rfo>;
1196 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_import_proctab_rfo>;
1197 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_ppcksumtab_rfo>;
1198 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_data_pages_offset>;
1199 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_nonresnametab_offset>;
1200 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, Rose::BinaryAnalysis::Address,&SgAsmLEFileHeader::p_e_debug_info_rfo>;
1201 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmDOSExtendedHeader*,&SgAsmLEFileHeader::p_dos2Header>;
1202 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmLESectionTable*,&SgAsmLEFileHeader::p_sectionTable>;
1203 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmLEPageTable*,&SgAsmLEFileHeader::p_pageTable>;
1204 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmLENameTable*,&SgAsmLEFileHeader::p_residentNameTable>;
1205 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmLENameTable*,&SgAsmLEFileHeader::p_nonresidentNameTable>;
1206 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmLEEntryTable*,&SgAsmLEFileHeader::p_entryTable>;
1207 friend struct Rose::Traits::generated::describe_field_t<SgAsmLEFileHeader, SgAsmLERelocTable*,&SgAsmLEFileHeader::p_relocationTable>;
1208
1209/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
1210
1211
1212 };
1213#endif
1214
1215// postdeclarations for SgAsmLEFileHeader
1216
1217/* #line 1218 "../../../src/frontend/SageIII//SgAsmLEFileHeader.h" */
1218
1219/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
1220
1221/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
1222
1223
1224/* #line 1225 "../../../src/frontend/SageIII//SgAsmLEFileHeader.h" */
1225
1226#endif // ROSE_SgAsmLEFileHeader_H
1227
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Represents the file header for DOS executables.
Base class for binary files.
Base class for container file headers.
virtual const char * formatName() const
Returns the name of the file format.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const override
Print some debugging info.
virtual void unparse(std::ostream &) const override
Unparse headers and all they point to.
virtual SgAsmGenericSection * parse()
Parse contents of the section.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual size_t get_numberOfTraversalSuccessors() const
return number of children in the traversal successor list
virtual std::vector< std::string > get_traversalSuccessorNamesContainer() const
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual size_t get_childIndex(SgNode *child) const
index-based access to traversal successors by child node
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual SgNode * get_traversalSuccessorByIndex(size_t idx) const
index-based access to traversal successors by index number
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
std::uint64_t Address
Address.
Definition Address.h:11
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
The ROSE library.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * LEFileHeaderFlags(int64_t)
Convert SgAsmLEFileHeader::LEFileHeaderFlags enum constant to a string.