ROSE 0.11.145.192
SgAsmPEFileHeader.h
1
2#ifndef ROSE_SgAsmPEFileHeader_H
3#define ROSE_SgAsmPEFileHeader_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 SgAsmPEFileHeader
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmPEFileHeader.h" */
25/* #line 3698 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/RelativeVirtualAddress.h>
28
29#ifdef ROSE_SgAsmPEFileHeader_IMPL
30#include <SgAsmCoffSymbolTable.h>
31#include <SgAsmPERVASizePairList.h>
32#include <SgAsmPESectionTable.h>
33#endif
34
35
36/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
37
38/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
39
40#if !defined(DOCUMENTATION)
41// Class Definition for SgAsmPEFileHeader
42class ROSE_DLL_API SgAsmPEFileHeader : public SgAsmGenericHeader
43 {
44 public:
45
46
47/* #line 48 "../../../src/frontend/SageIII//SgAsmPEFileHeader.h" */
48
49 virtual SgNode* copy ( SgCopyHelp& help) const override;
50// Start of memberFunctionString
51/* #line 3944 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
52
53
54 //----------------------- Boost serialization for SgAsmPEFileHeader -----------------------
55#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
56private:
57 friend class boost::serialization::access;
58
59 template<class S>
60 void serialize(S &s, const unsigned /*version*/) {
61 debugSerializationBegin("SgAsmPEFileHeader");
62 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
63 s & BOOST_SERIALIZATION_NVP(p_e_cpu_type);
64 s & BOOST_SERIALIZATION_NVP(p_e_nsections);
65 s & BOOST_SERIALIZATION_NVP(p_e_time);
66 s & BOOST_SERIALIZATION_NVP(p_e_coff_symtab);
67 s & BOOST_SERIALIZATION_NVP(p_e_nt_hdr_size);
68 s & BOOST_SERIALIZATION_NVP(p_e_coff_nsyms);
69 s & BOOST_SERIALIZATION_NVP(p_e_flags);
70 s & BOOST_SERIALIZATION_NVP(p_e_opt_magic);
71 s & BOOST_SERIALIZATION_NVP(p_e_lmajor);
72 s & BOOST_SERIALIZATION_NVP(p_e_lminor);
73 s & BOOST_SERIALIZATION_NVP(p_e_code_size);
74 s & BOOST_SERIALIZATION_NVP(p_e_data_size);
75 s & BOOST_SERIALIZATION_NVP(p_e_bss_size);
76 s & BOOST_SERIALIZATION_NVP(p_e_code_rva);
77 s & BOOST_SERIALIZATION_NVP(p_e_data_rva);
78 s & BOOST_SERIALIZATION_NVP(p_e_section_align);
79 s & BOOST_SERIALIZATION_NVP(p_e_file_align);
80 s & BOOST_SERIALIZATION_NVP(p_e_os_major);
81 s & BOOST_SERIALIZATION_NVP(p_e_os_minor);
82 s & BOOST_SERIALIZATION_NVP(p_e_user_major);
83 s & BOOST_SERIALIZATION_NVP(p_e_user_minor);
84 s & BOOST_SERIALIZATION_NVP(p_e_subsys_major);
85 s & BOOST_SERIALIZATION_NVP(p_e_subsys_minor);
86 s & BOOST_SERIALIZATION_NVP(p_e_reserved9);
87 s & BOOST_SERIALIZATION_NVP(p_e_image_size);
88 s & BOOST_SERIALIZATION_NVP(p_e_header_size);
89 s & BOOST_SERIALIZATION_NVP(p_e_file_checksum);
90 s & BOOST_SERIALIZATION_NVP(p_e_subsystem);
91 s & BOOST_SERIALIZATION_NVP(p_e_dll_flags);
92 s & BOOST_SERIALIZATION_NVP(p_e_stack_reserve_size);
93 s & BOOST_SERIALIZATION_NVP(p_e_stack_commit_size);
94 s & BOOST_SERIALIZATION_NVP(p_e_heap_reserve_size);
95 s & BOOST_SERIALIZATION_NVP(p_e_heap_commit_size);
96 s & BOOST_SERIALIZATION_NVP(p_e_loader_flags);
97 s & BOOST_SERIALIZATION_NVP(p_e_num_rvasize_pairs);
98 s & BOOST_SERIALIZATION_NVP(p_rvaSizePairs);
99 s & BOOST_SERIALIZATION_NVP(p_sectionTable);
100 s & BOOST_SERIALIZATION_NVP(p_coffSymbolTable);
101 debugSerializationEnd("SgAsmPEFileHeader");
102 }
103#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
105 // Local types
107public:
108#ifdef _MSC_VER
109# pragma pack (1)
110#endif
111 /* File format of a PE File Header. All fields are little endian. */
112 struct PEFileHeader_disk {
113 unsigned char e_magic[4]; /* 0x00 magic number "PE\0\0" */
114 uint16_t e_cpu_type; /* 0x04 e.g., 0x014c = Intel 386 */
115 uint16_t e_nsections; /* 0x06 number of sections defined in the Section Table */
116 uint32_t e_time; /* 0x08 time and date file was created or modified by the linker */
117 uint32_t e_coff_symtab; /* 0x0c offset to COFF symbol table */
118 uint32_t e_coff_nsyms; /* 0x10 number of symbols in COFF symbol table */
119 uint16_t e_nt_hdr_size; /* 0x14 num remaining bytes in the header following the 'flags' field */
120 uint16_t e_flags; /* 0x16 Bit flags: exe file, program/library image, fixed address, etc. */
121 } /* 0x18 */
122#if !defined(SWIG) && !defined(_MSC_VER)
123 __attribute__((packed))
124#endif
125 ;
126
127 struct PE32OptHeader_disk {
128 uint16_t e_opt_magic; /* 0x18 magic number */
129 uint16_t e_lmajor; /* 0x1a linker version */
130 uint16_t e_lminor; /* 0x1c */
131 uint16_t e_code_size; /* 0x1e Size of .text or sum of all code sections */
132 uint32_t e_data_size; /* 0x20 Sum size of initialized data */
133 uint32_t e_bss_size; /* 0x24 Sum size of uninitialized data */
134 uint32_t e_entrypoint_rva; /* 0x28 RVA="relative virtual address"; relative to 'image_base', below */
135 uint32_t e_code_rva; /* 0x2c Addr relative to image base for code section when memory mapped */
136 uint32_t e_data_rva; /* 0x30 Address relative to image base for data section */
137 uint32_t e_image_base; /* 0x34 Virt base of image (first byte of file, DOS header). 64k aligned */
138 uint32_t e_section_align; /* 0x38 Alignment of sections in memory. Power of two 512<=x<=256M */
139 uint32_t e_file_align; /* 0x3c Alignment factor (in bytes) for image pages */
140 uint16_t e_os_major; /* 0x40 OS version number required to run this image */
141 uint16_t e_os_minor; /* 0x42 */
142 uint16_t e_user_major; /* 0x44 User-specified for differentiating between image revs */
143 uint16_t e_user_minor; /* 0x46 */
144 uint16_t e_subsys_major; /* 0x48 Subsystem version number */
145 uint16_t e_subsys_minor; /* 0x4a */
146 uint32_t e_reserved9; /* 0x4c */
147 uint32_t e_image_size; /* 0x50 Virtual size of the image inc. all headers; section_align */
148 uint32_t e_header_size; /* 0x54 Total header size (DOS Header + PE Header + Section table */
149 uint32_t e_file_checksum; /* 0x58 Checksum for entire file; Set to zero by the linker */
150 uint16_t e_subsystem; /* 0x5c Native, WindowsGUI, WindowsCharacter, OS/2 Character, etc. */
151 uint16_t e_dll_flags; /* 0x5e Bit flags for library init/terminate per process or thread */
152 uint32_t e_stack_reserve_size;/*0x60 Virtual mem reserved for stack; non-committed pages are guards */
153 uint32_t e_stack_commit_size;/* 0x64 Size of valid stack; other pages are guards; <=stack_reserve_size*/
154 uint32_t e_heap_reserve_size;/* 0x68 Size (bytes) of local heap to reserve */
155 uint32_t e_heap_commit_size; /* 0x6c Size (bytes) of valid local heap */
156 uint32_t e_loader_flags; /* 0x70 Reserved, must be zero */
157 uint32_t e_num_rvasize_pairs;/* 0x74 Num RVASizePair entries that follow this member; part of header */
158 } /* 0x78 */
159#if !defined(SWIG) && !defined(_MSC_VER)
160 __attribute__((packed))
161#endif
162 ;
163
164 struct PE64OptHeader_disk {
165 uint16_t e_opt_magic; /* 0x18 */
166 uint16_t e_lmajor; /* 0x1a */
167 uint16_t e_lminor; /* 0x1c */
168 uint16_t e_code_size; /* 0x1e */
169 uint32_t e_data_size; /* 0x20 */
170 uint32_t e_bss_size; /* 0x24 */
171 uint32_t e_entrypoint_rva; /* 0x28 */
172 uint32_t e_code_rva; /* 0x2c */
173 // uint32_t e_data_rva; /* Not present in PE32+ */
174 uint64_t e_image_base; /* 0x30 */
175 uint32_t e_section_align; /* 0x38 */
176 uint32_t e_file_align; /* 0x3c */
177 uint16_t e_os_major; /* 0x40 */
178 uint16_t e_os_minor; /* 0x42 */
179 uint16_t e_user_major; /* 0x44 */
180 uint16_t e_user_minor; /* 0x46 */
181 uint16_t e_subsys_major; /* 0x48 */
182 uint16_t e_subsys_minor; /* 0x4a */
183 uint32_t e_reserved9; /* 0x4c */
184 uint32_t e_image_size; /* 0x50 */
185 uint32_t e_header_size; /* 0x54 */
186 uint32_t e_file_checksum; /* 0x58 */
187 uint16_t e_subsystem; /* 0x5c */
188 uint16_t e_dll_flags; /* 0x5e */
189 uint64_t e_stack_reserve_size;/*0x60 */
190 uint64_t e_stack_commit_size;/* 0x68 */
191 uint64_t e_heap_reserve_size;/* 0x70 */
192 uint64_t e_heap_commit_size; /* 0x78 */
193 uint32_t e_loader_flags; /* 0x80 */
194 uint32_t e_num_rvasize_pairs;/* 0x84 */
195 } /* 0x88 */
196#if !defined(SWIG) && !defined(_MSC_VER)
197 __attribute__((packed))
198#endif
199 ;
200#ifdef _MSC_VER
201# pragma pack ()
202#endif
203
204 /* Bit flags for the PE header 'flags' member */
205 enum HeaderFlags {
206 HF_PROGRAM = 0x0000, /* Program image (no non-reserved bits set) */
207 HF_EXECUTABLE = 0x0002, /* Clear indicates can't load: link errors or incrementally linked */
208 HF_FIXED = 0x0200, /* Image *must* be loaded at image_base address or error */
209 HF_LIBRARY = 0x2000, /* Library image */
210 HF_RESERVED_MASK = 0xddfd /* Reserved bits */
211 };
212
213 /* Values for the PE header 'subsystem' member */
214 enum Subsystem {
215 HF_SPEC_UNKNOWN = 0x0000, /* Specified as 'unknown' in the file */
216 HF_NATIVE = 0x0001, /* Native */
217 HF_WINGUI = 0x0002, /* Windows GUI */
218 HF_WINCHAR = 0x0003, /* Windows character */
219 HF_OS2CHAR = 0x0005, /* OS/2 character */
220 HF_POSIX = 0x0007 /* POSIX character */
221 };
222
223 /* Bit flags for the PE header 'dll_flags' member */
224 enum DLLFlags {
225 DLL_PROC_INIT = 0x0001, /* Per-process library initialization */
226 DLL_PROC_TERM = 0x0002, /* Per-process library termination */
227 DLL_THRD_INIT = 0x0004, /* Per-thread library initialization */
228 DLL_THRD_TERM = 0x0008, /* Per-thread library termination */
229 DLL_RESERVED_MASK = 0xfff0 /* Reserved bits */
230 };
231
233 enum PairPurpose { // Values are important
234 PAIR_EXPORTS = 0,
235 PAIR_IMPORTS = 1,
236 PAIR_RESOURCES = 2,
237 PAIR_EXCEPTIONS = 3,
238 PAIR_CERTIFICATES = 4,
239 PAIR_BASERELOCS = 5,
240 PAIR_DEBUG = 6,
241 PAIR_ARCHITECTURE = 7,
242 PAIR_GLOBALPTR = 8,
243 PAIR_TLS = 9, // Thread local storage
244 PAIR_LOADCONFIG = 10,
245 PAIR_BOUNDIMPORT = 11,
246 PAIR_IAT = 12, // Import address table
247 PAIR_DELAYIMPORT = 13, // Delay import descriptor
248 PAIR_CLRRUNTIME = 14, // CLR(?) runtime header
249 PAIR_RESERVED15 = 15 // Reserved (always zero according to specification)
250 };
251
253 // Properties
255public:
256public:
262 unsigned const& get_e_cpu_type() const;
263 void set_e_cpu_type(unsigned const&);
266public:
272 unsigned const& get_e_nsections() const;
273 void set_e_nsections(unsigned const&);
276public:
282 unsigned const& get_e_time() const;
283 void set_e_time(unsigned const&);
286public:
292 rose_addr_t const& get_e_coff_symtab() const;
293 void set_e_coff_symtab(rose_addr_t const&);
296public:
302 rose_addr_t const& get_e_nt_hdr_size() const;
303 void set_e_nt_hdr_size(rose_addr_t const&);
306public:
312 unsigned const& get_e_coff_nsyms() const;
313 void set_e_coff_nsyms(unsigned const&);
316public:
322 unsigned const& get_e_flags() const;
323 void set_e_flags(unsigned const&);
326public:
332 unsigned const& get_e_opt_magic() const;
333 void set_e_opt_magic(unsigned const&);
336public:
342 unsigned const& get_e_lmajor() const;
343 void set_e_lmajor(unsigned const&);
346public:
352 unsigned const& get_e_lminor() const;
353 void set_e_lminor(unsigned const&);
356public:
362 unsigned const& get_e_code_size() const;
363 void set_e_code_size(unsigned const&);
366public:
372 unsigned const& get_e_data_size() const;
373 void set_e_data_size(unsigned const&);
376public:
382 unsigned const& get_e_bss_size() const;
383 void set_e_bss_size(unsigned const&);
386public:
392 Rose::BinaryAnalysis::RelativeVirtualAddress const& get_e_code_rva() const;
394 void set_e_code_rva(Rose::BinaryAnalysis::RelativeVirtualAddress const&);
397public:
403 Rose::BinaryAnalysis::RelativeVirtualAddress const& get_e_data_rva() const;
405 void set_e_data_rva(Rose::BinaryAnalysis::RelativeVirtualAddress const&);
408public:
414 unsigned const& get_e_section_align() const;
415 void set_e_section_align(unsigned const&);
418public:
424 unsigned const& get_e_file_align() const;
425 void set_e_file_align(unsigned const&);
428public:
434 unsigned const& get_e_os_major() const;
435 void set_e_os_major(unsigned const&);
438public:
444 unsigned const& get_e_os_minor() const;
445 void set_e_os_minor(unsigned const&);
448public:
454 unsigned const& get_e_user_major() const;
455 void set_e_user_major(unsigned const&);
458public:
464 unsigned const& get_e_user_minor() const;
465 void set_e_user_minor(unsigned const&);
468public:
474 unsigned const& get_e_subsys_major() const;
475 void set_e_subsys_major(unsigned const&);
478public:
484 unsigned const& get_e_subsys_minor() const;
485 void set_e_subsys_minor(unsigned const&);
488public:
494 unsigned const& get_e_reserved9() const;
495 void set_e_reserved9(unsigned const&);
498public:
504 unsigned const& get_e_image_size() const;
505 void set_e_image_size(unsigned const&);
508public:
514 unsigned const& get_e_header_size() const;
515 void set_e_header_size(unsigned const&);
518public:
524 unsigned const& get_e_file_checksum() const;
525 void set_e_file_checksum(unsigned const&);
528public:
534 unsigned const& get_e_subsystem() const;
535 void set_e_subsystem(unsigned const&);
538public:
544 unsigned const& get_e_dll_flags() const;
545 void set_e_dll_flags(unsigned const&);
548public:
554 unsigned const& get_e_stack_reserve_size() const;
555 void set_e_stack_reserve_size(unsigned const&);
558public:
564 unsigned const& get_e_stack_commit_size() const;
565 void set_e_stack_commit_size(unsigned const&);
568public:
574 unsigned const& get_e_heap_reserve_size() const;
575 void set_e_heap_reserve_size(unsigned const&);
578public:
584 unsigned const& get_e_heap_commit_size() const;
585 void set_e_heap_commit_size(unsigned const&);
588public:
594 unsigned const& get_e_loader_flags() const;
595 void set_e_loader_flags(unsigned const&);
598public:
604 unsigned const& get_e_num_rvasize_pairs() const;
605 void set_e_num_rvasize_pairs(unsigned const&);
608public:
614 SgAsmPERVASizePairList* const& get_rvaSizePairs() const;
615 void set_rvaSizePairs(SgAsmPERVASizePairList* const&);
618public:
624 SgAsmPESectionTable* const& get_sectionTable() const;
625 void set_sectionTable(SgAsmPESectionTable* const&);
628public:
634 SgAsmCoffSymbolTable* const& get_coffSymbolTable() const;
635 void set_coffSymbolTable(SgAsmCoffSymbolTable* const&);
638 // Functions
640public:
642
643 virtual const char* formatName() const override;
644
650 static bool isPe(SgAsmGenericFile*);
651
658 std::string rvaSizePairName(PairPurpose, const char **short_name);
659
661 void set_rvaSizePair(PairPurpose, SgAsmPESection*);
662
664 void updateRvaSizePairs();
665
666 void addRvaSizePairs();
667
668 virtual SgAsmPEFileHeader *parse() override;
669 virtual bool reallocate() override;
670 virtual void unparse(std::ostream&) const override;
671 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
672 void createTableSections();
673
674 /* Loader memory maps */
675 Rose::BinaryAnalysis::MemoryMap::Ptr get_loaderMap() const;
676 void set_loaderMap(const Rose::BinaryAnalysis::MemoryMap::Ptr&);
677
678private:
679 void *encode(SgAsmPEFileHeader::PEFileHeader_disk*) const;
680 void *encode(SgAsmPEFileHeader::PE32OptHeader_disk*) const;
681 void *encode(SgAsmPEFileHeader::PE64OptHeader_disk*) const;
683
685 // Deprecated 2023-11
687public:
688 SgAsmPERVASizePairList* get_rvasize_pairs() const ROSE_DEPRECATED("use get_rvaSizePairs");
689 void set_rvasize_pairs(SgAsmPERVASizePairList*) ROSE_DEPRECATED("use set_rvaSizePairs");
690 SgAsmPESectionTable* get_section_table() const ROSE_DEPRECATED("use get_sectionTable");
691 void set_section_table(SgAsmPESectionTable*) ROSE_DEPRECATED("use set_sectionTable");
692 SgAsmCoffSymbolTable* get_coff_symtab() const ROSE_DEPRECATED("use get_coffSymbolTable");
693 void set_coff_symtab(SgAsmCoffSymbolTable*) ROSE_DEPRECATED("use set_coffSymbolTable");
694 virtual const char *format_name() const override ROSE_DEPRECATED("use formatName");
695 static bool is_PE (SgAsmGenericFile*) ROSE_DEPRECATED("use isPe");
696 std::string rvasize_pair_name(PairPurpose, const char**) ROSE_DEPRECATED("use rvaSizePairName");
697 void set_rvasize_pair(PairPurpose, SgAsmPESection*) ROSE_DEPRECATED("use set_rvaSizePair");
698 void update_rvasize_pairs() ROSE_DEPRECATED("use updateRvaSizePairs");
699 void add_rvasize_pairs() ROSE_DEPRECATED("use addRvaSizePairs");
700 void create_table_sections() ROSE_DEPRECATED("use createTableSections");
701 Rose::BinaryAnalysis::MemoryMap::Ptr get_loader_map() const ROSE_DEPRECATED("use get_loaderMap");
702 void set_loader_map(const Rose::BinaryAnalysis::MemoryMap::Ptr&) ROSE_DEPRECATED("use set_loaderMap");
703public:
705 virtual ~SgAsmPEFileHeader();
706
707public:
710
711protected:
718 void initializeProperties();
719
720
721// End of memberFunctionString
722// Start of memberFunctionString
723/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
724
725// *** COMMON CODE SECTION BEGINS HERE ***
726
727 public:
728
729 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
730 // and not required which is required to match the other aspects of the copy mechanism code generation.
731 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
732 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
733 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
734 // virtual SgNode* copy ( const SgCopyHelp & help) const;
735
737 virtual std::string class_name() const override;
738
740 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
741
743 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
744 // static const VariantT static_variant = V_SgAsmPEFileHeader;
745 enum { static_variant = V_SgAsmPEFileHeader };
746
747 /* the generated cast function */
749 ROSE_DLL_API friend SgAsmPEFileHeader* isSgAsmPEFileHeader( SgNode * s );
750
752 ROSE_DLL_API friend const SgAsmPEFileHeader* isSgAsmPEFileHeader( const SgNode * s );
753
754 // ******************************************
755 // * Memory Pool / New / Delete
756 // ******************************************
757
758 public:
760 static const unsigned pool_size; //
762 static std::vector<unsigned char *> pools; //
764 static SgAsmPEFileHeader * next_node; //
765
767 static unsigned long initializeStorageClassArray(SgAsmPEFileHeaderStorageClass *); //
768
770 static void clearMemoryPool(); //
771 static void deleteMemoryPool(); //
772
774 static void extendMemoryPoolForFileIO(); //
775
777 static SgAsmPEFileHeader * getPointerFromGlobalIndex(unsigned long); //
779 static SgAsmPEFileHeader * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
780
782 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
784 static void resetValidFreepointers(); //
786 static unsigned long getNumberOfLastValidPointer(); //
787
788
789#if defined(INLINE_FUNCTIONS)
791 inline void *operator new (size_t size);
792#else
794 void *operator new (size_t size);
795#endif
797 void operator delete (void* pointer, size_t size);
798
799 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
800 void operator delete (void* pointer)
801 {
802 // This is the generated delete operator...
803 SgAsmPEFileHeader::operator delete (pointer,sizeof(SgAsmPEFileHeader));
804 }
805
807 static size_t numberOfNodes();
808
810 static size_t memoryUsage();
811
812 // End of scope which started in IR nodes specific code
813 /* */
814
815 /* name Internal Functions
816 \brief Internal functions ... incomplete-documentation
817
818 These functions have been made public as part of the design, but they are suggested for internal use
819 or by particularly knowledgeable users for specialized tools or applications.
820
821 \internal We could not make these private because they are required by user for special purposes. And
822 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
823
824 */
825
826 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
827 // overridden in every class by *generated* implementation
829 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
830 // MS: 06/28/02 container of names of variables or container indices
831 // used used in the traversal to access AST successor nodes
832 // overridden in every class by *generated* implementation
835 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
836
837 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
838 // than all the vector copies. The implementation for these functions is generated for each class.
840 virtual size_t get_numberOfTraversalSuccessors() override;
842 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
844 virtual size_t get_childIndex(SgNode *child) override;
845
846#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
847 // MS: 08/16/2002 method for generating RTI information
849 virtual RTIReturnType roseRTI() override;
850#endif
851 /* */
852
853
854
855 /* name Deprecated Functions
856 \brief Deprecated functions ... incomplete-documentation
857
858 These functions have been deprecated from use.
859 */
860 /* */
861
863 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
864
865 // JJW (10/16/2008): Changed to a single function in Node.code, and put
866 // getVariant() in #if 0 block to prevent confusing Doxygen
867#if 0
869 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
871 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
872#endif
873 /* */
874
875
876
877
878 public:
879 /* name Traversal Support Functions
880 \brief Traversal support functions ... incomplete-documentation
881
882 These functions have been made public as part of the design, but they are suggested for internal use
883 or by particularly knowledgable users for specialized tools or applications.
884 */
885 /* */
886
887 // DQ (11/26/2005): Support for visitor pattern mechanims
888 // (inferior to ROSE traversal mechanism, experimental).
892
893 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
895 virtual void accept (ROSE_VisitorPattern & visitor) override;
896
897 // DQ (12/26/2005): Support for traversal based on the memory pool
900 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
901
905
906 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
907 // This traversal helps support internal tools that call static member functions.
908 // note: this function operates on the memory pools.
911 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
912 /* */
913
914 public:
915 /* NodeId support functions */
917 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
920 static SgAsmPEFileHeader* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
923 static std::string getNodeIdString(SgAsmPEFileHeader* sgnode);
924 static std::string getNodeIdStringInternal(SgAsmPEFileHeader* sgnode);
925
926 public:
927 /* name Memory Allocation Functions
928 \brief Memory allocations functions ... incomplete-documentation
929
930 These functions have been made public as part of the design, but they are suggested for internal use
931 or by particularly knowledgable users for specialized tools or applications.
932 */
933 /* */
934
945 virtual bool isInMemoryPool() override;
946
957 virtual void checkDataMemberPointersIfInMemoryPool() override;
958
959 // DQ (4/30/2006): Modified to be a const function.
974 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
975
986
998 virtual long getChildIndex( SgNode* childNode ) const override;
999
1000 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
1001 // comment here (changed to be a C style comment and not be a doxygen comment).
1002 /* \brief Constructor for use by AST File I/O Mechanism
1003
1004 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
1005 which obtained via fast binary file I/O from disk.
1006 */
1007 // SgAsmPEFileHeader( SgAsmPEFileHeaderStorageClass& source );
1008
1009
1010
1011
1012
1013 // JH (10/24/2005): methods added to support the ast file IO
1014 private:
1015
1016 /* name AST Memory Allocation Support Functions
1017 \brief Memory allocations support....
1018
1019 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
1020 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
1021 and support the AST File I/O Mechanism.
1022 */
1023 /* */
1024
1025 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
1026 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
1027 that I use the same type everywhere, if any changes are made. THe second one declares the type
1028 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
1029 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
1030 a correspinding one in the AST_FILE_IO class!
1031 */
1032 // DQ (9/2/2015): This typedef is no longer used, we can't define the
1033 // comment here (changed to be a C style comment and not be a doxygen comment).
1034 /* \brief Typedef used for low level memory access.
1035 */
1036 // typedef unsigned char* TestType;
1037
1038 // DQ (9/2/2015): This typedef is no longer used, we can't define the
1039 // comment here (changed to be a C style comment and not be a doxygen comment).
1040 /* \brief Typedef used to hold memory addresses as values.
1041 */
1042 // typedef unsigned long AddressType;
1043
1044
1045
1046 // necessary, to have direct access to the p_freepointer and the private methods !
1048 friend class AST_FILE_IO;
1049
1051 friend class SgAsmPEFileHeaderStorageClass;
1052
1054 friend class AstSpecificDataManagingClass;
1055
1057 friend class AstSpecificDataManagingClassStorageClass;
1058 public:
1060 SgAsmPEFileHeader( const SgAsmPEFileHeaderStorageClass& source );
1061
1062 // private: // JJW hack
1063 /*
1064 name AST Memory Allocation Support Variables
1065 Memory allocations support variables
1066
1067 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
1068 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
1069 and support the AST File I/O Mechanism.
1070 */
1071 /* */
1072
1073 public:
1074
1075 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
1076 // to current node (so that it will work cleanly with build functions to specify patterns).
1077 // virtual SgNode* addRegExpAttribute();
1084
1085#ifndef _MSC_VER
1086// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
1087// and likely never fully implemented nor tested. Files remain in the src tree but are no
1088// longer built.
1089#define BUILD_ATERM_SUPPORT 0
1090 #if BUILD_ATERM_SUPPORT
1091 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
1092 // DQ (10/4/2014): Adding ATerm support to ROSE.
1102 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
1103 virtual ATerm generate_ATerm() override;
1104
1106 virtual void generate_ATerm_Annotation(ATerm & term) override;
1107 #endif
1108 #endif // BUILD_ATERM_SUPPORT
1109#endif
1110 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
1111 // virtual generate_AST(ATerm & term);
1112 // virtual void read_ATerm_Annotation(ATerm & term);
1113
1114// *** COMMON CODE SECTION ENDS HERE ***
1115
1116
1117// End of memberFunctionString
1118// Start of memberFunctionString
1119/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
1120
1121 // the generated cast function
1122 // friend ROSE_DLL_API SgAsmPEFileHeader* isSgAsmPEFileHeader ( SgNode* s );
1123
1124 typedef SgAsmGenericHeader base_node_type;
1125
1126
1127// End of memberFunctionString
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167 protected:
1168// Start of memberFunctionString
1169unsigned p_e_cpu_type;
1170
1171// End of memberFunctionString
1172// Start of memberFunctionString
1173unsigned p_e_nsections;
1174
1175// End of memberFunctionString
1176// Start of memberFunctionString
1177unsigned p_e_time;
1178
1179// End of memberFunctionString
1180// Start of memberFunctionString
1181rose_addr_t p_e_coff_symtab;
1182
1183// End of memberFunctionString
1184// Start of memberFunctionString
1185rose_addr_t p_e_nt_hdr_size;
1186
1187// End of memberFunctionString
1188// Start of memberFunctionString
1189unsigned p_e_coff_nsyms;
1190
1191// End of memberFunctionString
1192// Start of memberFunctionString
1193unsigned p_e_flags;
1194
1195// End of memberFunctionString
1196// Start of memberFunctionString
1197unsigned p_e_opt_magic;
1198
1199// End of memberFunctionString
1200// Start of memberFunctionString
1201unsigned p_e_lmajor;
1202
1203// End of memberFunctionString
1204// Start of memberFunctionString
1205unsigned p_e_lminor;
1206
1207// End of memberFunctionString
1208// Start of memberFunctionString
1209unsigned p_e_code_size;
1210
1211// End of memberFunctionString
1212// Start of memberFunctionString
1213unsigned p_e_data_size;
1214
1215// End of memberFunctionString
1216// Start of memberFunctionString
1217unsigned p_e_bss_size;
1218
1219// End of memberFunctionString
1220// Start of memberFunctionString
1222
1223// End of memberFunctionString
1224// Start of memberFunctionString
1226
1227// End of memberFunctionString
1228// Start of memberFunctionString
1229unsigned p_e_section_align;
1230
1231// End of memberFunctionString
1232// Start of memberFunctionString
1233unsigned p_e_file_align;
1234
1235// End of memberFunctionString
1236// Start of memberFunctionString
1237unsigned p_e_os_major;
1238
1239// End of memberFunctionString
1240// Start of memberFunctionString
1241unsigned p_e_os_minor;
1242
1243// End of memberFunctionString
1244// Start of memberFunctionString
1245unsigned p_e_user_major;
1246
1247// End of memberFunctionString
1248// Start of memberFunctionString
1249unsigned p_e_user_minor;
1250
1251// End of memberFunctionString
1252// Start of memberFunctionString
1253unsigned p_e_subsys_major;
1254
1255// End of memberFunctionString
1256// Start of memberFunctionString
1257unsigned p_e_subsys_minor;
1258
1259// End of memberFunctionString
1260// Start of memberFunctionString
1261unsigned p_e_reserved9;
1262
1263// End of memberFunctionString
1264// Start of memberFunctionString
1265unsigned p_e_image_size;
1266
1267// End of memberFunctionString
1268// Start of memberFunctionString
1269unsigned p_e_header_size;
1270
1271// End of memberFunctionString
1272// Start of memberFunctionString
1273unsigned p_e_file_checksum;
1274
1275// End of memberFunctionString
1276// Start of memberFunctionString
1277unsigned p_e_subsystem;
1278
1279// End of memberFunctionString
1280// Start of memberFunctionString
1281unsigned p_e_dll_flags;
1282
1283// End of memberFunctionString
1284// Start of memberFunctionString
1285unsigned p_e_stack_reserve_size;
1286
1287// End of memberFunctionString
1288// Start of memberFunctionString
1289unsigned p_e_stack_commit_size;
1290
1291// End of memberFunctionString
1292// Start of memberFunctionString
1293unsigned p_e_heap_reserve_size;
1294
1295// End of memberFunctionString
1296// Start of memberFunctionString
1297unsigned p_e_heap_commit_size;
1298
1299// End of memberFunctionString
1300// Start of memberFunctionString
1301unsigned p_e_loader_flags;
1302
1303// End of memberFunctionString
1304// Start of memberFunctionString
1305unsigned p_e_num_rvasize_pairs;
1306
1307// End of memberFunctionString
1308// Start of memberFunctionString
1309SgAsmPERVASizePairList* p_rvaSizePairs;
1310
1311// End of memberFunctionString
1312// Start of memberFunctionString
1313SgAsmPESectionTable* p_sectionTable;
1314
1315// End of memberFunctionString
1316// Start of memberFunctionString
1317SgAsmCoffSymbolTable* p_coffSymbolTable;
1318
1319// End of memberFunctionString
1320
1322 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_cpu_type>;
1323 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_nsections>;
1324 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_time>;
1325 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, rose_addr_t,&SgAsmPEFileHeader::p_e_coff_symtab>;
1326 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, rose_addr_t,&SgAsmPEFileHeader::p_e_nt_hdr_size>;
1327 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_coff_nsyms>;
1328 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_flags>;
1329 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_opt_magic>;
1330 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_lmajor>;
1331 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_lminor>;
1332 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_code_size>;
1333 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_data_size>;
1334 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_bss_size>;
1335 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, Rose::BinaryAnalysis::RelativeVirtualAddress,&SgAsmPEFileHeader::p_e_code_rva>;
1336 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, Rose::BinaryAnalysis::RelativeVirtualAddress,&SgAsmPEFileHeader::p_e_data_rva>;
1337 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_section_align>;
1338 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_file_align>;
1339 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_os_major>;
1340 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_os_minor>;
1341 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_user_major>;
1342 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_user_minor>;
1343 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_subsys_major>;
1344 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_subsys_minor>;
1345 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_reserved9>;
1346 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_image_size>;
1347 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_header_size>;
1348 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_file_checksum>;
1349 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_subsystem>;
1350 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_dll_flags>;
1351 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_stack_reserve_size>;
1352 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_stack_commit_size>;
1353 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_heap_reserve_size>;
1354 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_heap_commit_size>;
1355 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_loader_flags>;
1356 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, unsigned,&SgAsmPEFileHeader::p_e_num_rvasize_pairs>;
1357 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, SgAsmPERVASizePairList*,&SgAsmPEFileHeader::p_rvaSizePairs>;
1358 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, SgAsmPESectionTable*,&SgAsmPEFileHeader::p_sectionTable>;
1359 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEFileHeader, SgAsmCoffSymbolTable*,&SgAsmPEFileHeader::p_coffSymbolTable>;
1360
1361/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
1362
1363
1364 };
1365#endif
1366
1367// postdeclarations for SgAsmPEFileHeader
1368
1369/* #line 1370 "../../../src/frontend/SageIII//SgAsmPEFileHeader.h" */
1370
1371/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
1372
1373/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
1374
1375
1376/* #line 1377 "../../../src/frontend/SageIII//SgAsmPEFileHeader.h" */
1377
1378#endif // ROSE_SgAsmPEFileHeader_H
1379
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Optionally bound relative virtual address.
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 bool reallocate() override
Called prior to unparse to make things consistent.
virtual void unparse(std::ostream &) const override
Unparse headers and all they point to.
virtual SgAsmGenericSection * parse()
Parse contents of the section.
Windows PE file header.
List of SgAsmPERVASizePair AST nodes.
Base class for PE sections.
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.
The ROSE library.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * PairPurpose(int64_t)
Convert SgAsmPEFileHeader::PairPurpose enum constant to a string.
const char * DLLFlags(int64_t)
Convert SgAsmPEFileHeader::DLLFlags enum constant to a string.
const char * HeaderFlags(int64_t)
Convert SgAsmPEFileHeader::HeaderFlags enum constant to a string.
const char * Subsystem(int64_t)
Convert SgAsmPEFileHeader::Subsystem enum constant to a string.