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