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