ROSE  0.11.145.0
binaryInstruction.C
1 // THIS FILE IS MACHINE GENERATED -- DO NOT MODIFY
4 //
5 // This file was generated with ROSE's "rosebud" tool by reading node definitions written in a
6 // C++-like language and emitting this ROSETTA input.
7 //
9 // DO NOT MODIFY THIS FILE MANUALLY!
11 
12 
13 #include <featureTests.h>
14 #if defined(ROSE_ENABLE_BINARY_ANALYSIS)
15 #include "ROSETTA_macros.h"
16 #include "grammar.h"
17 #include "AstNodeClass.h"
18 
19 //#undef DOCUMENTATION -- commented out so IDEs can't figure it out
20 #ifdef DOCUMENTATION
21 DOCUMENTATION_should_never_be_defined;
22 #endif
23 
24 #ifdef DOCUMENTATION
25 #define DECLARE_LEAF_CLASS(CLASS_WITHOUT_Sg) /*void*/
26 #else
27 #define DECLARE_LEAF_CLASS(CLASS_WITHOUT_Sg) \
28  NEW_TERMINAL_MACRO(CLASS_WITHOUT_Sg, #CLASS_WITHOUT_Sg, #CLASS_WITHOUT_Sg "Tag"); \
29  CLASS_WITHOUT_Sg.setCppCondition("!defined(DOCUMENTATION)");\
30  CLASS_WITHOUT_Sg.setAutomaticGenerationOfConstructor(false);\
31  CLASS_WITHOUT_Sg.setAutomaticGenerationOfDestructor(false)
32 #endif
33 
34 #ifdef DOCUMENTATION
35 #define DECLARE_HEADERS(CLASS_WITHOUT_Sg) /*void*/
36 #else
37 #define DECLARE_HEADERS(CLASS_WITHOUT_Sg) \
38  CLASS_WITHOUT_Sg.setPredeclarationString("Sg" #CLASS_WITHOUT_Sg "_HEADERS", \
39  ROSE_AUTOMAKE_ABSOLUTE_PATH_TOP_SRCDIR + "/src/ROSETTA/src/binaryInstruction.C")
40 #endif
41 
42 #ifdef DOCUMENTATION
43 #define DECLARE_OTHERS(CLASS_WITHOUT_Sg) /*void*/
44 #else
45 #define DECLARE_OTHERS(CLASS_WITHOUT_Sg) \
46  CLASS_WITHOUT_Sg.setFunctionPrototype("Sg" #CLASS_WITHOUT_Sg "_OTHERS", \
47  ROSE_AUTOMAKE_ABSOLUTE_PATH_TOP_SRCDIR + "/src/ROSETTA/src/binaryInstruction.C")
48 #endif
49 
50 #ifdef DOCUMENTATION
51 #define IS_SERIALIZABLE() /*void*/
52 #else
53 #define IS_SERIALIZABLE(CLASS_WITHOUT_Sg) \
54  CLASS_WITHOUT_Sg.isBoostSerializable(true)
55 #endif
56 
57 
58 // Since ROSETTA builds classes from the leaves up to the base, and C++ builds classes from the
59 // base down to the leaves, we need to make sure that doxygen sees the base classes before the derived classes. So
60 // just list all the non-leaf classes here.
61 #ifdef DOCUMENTATION
63 class SgAsmCilDataStream;
64 class SgAsmCilMetadata;
65 class SgAsmCilNode;
69 class SgAsmElfSection;
71 class SgAsmExpression;
72 class SgAsmGenericHeader;
74 class SgAsmGenericString;
75 class SgAsmGenericStrtab;
76 class SgAsmGenericSymbol;
77 class SgAsmInstruction;
78 class SgAsmJvmAttribute;
79 class SgAsmJvmNode;
80 class SgAsmNode;
81 class SgAsmPESection;
83 class SgAsmScalarType;
84 class SgAsmStatement;
86 class SgAsmType;
89 class SgNode;
90 #endif // DOCUMENTATION
91 
92 #ifndef DOCUMENTATION
93 void Grammar::setUpBinaryInstructions() {
94 #endif // !DOCUMENTATION
95 
96 
98 // SgAsmX86Instruction -- MACHINE GENERATED; DO NOT MODIFY --
100 
101 DECLARE_LEAF_CLASS(AsmX86Instruction);
102 IS_SERIALIZABLE(AsmX86Instruction);
103 
104 DECLARE_HEADERS(AsmX86Instruction);
105 #if defined(SgAsmX86Instruction_HEADERS) || defined(DOCUMENTATION)
106 #include <Rose/BinaryAnalysis/BasicTypes.h>
107 #include <Rose/BinaryAnalysis/InstructionEnumsX86.h>
108 #endif // SgAsmX86Instruction_HEADERS
109 
110 #ifdef DOCUMENTATION
111 
113 #endif // DOCUMENTATION
114 
115 #ifndef DOCUMENTATION
116  AsmX86Instruction.setDataPrototype(
117  "Rose::BinaryAnalysis::X86InstructionKind", "kind", "= Rose::BinaryAnalysis::x86_unknown_instruction",
118  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
119 #endif // !DOCUMENTATION
120 
121 #ifndef DOCUMENTATION
122  AsmX86Instruction.setDataPrototype(
123  "Rose::BinaryAnalysis::X86InstructionSize", "baseSize", "= Rose::BinaryAnalysis::x86_insnsize_none",
124  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
125 #endif // !DOCUMENTATION
126 
127 #ifndef DOCUMENTATION
128  AsmX86Instruction.setDataPrototype(
129  "Rose::BinaryAnalysis::X86InstructionSize", "operandSize", "= Rose::BinaryAnalysis::x86_insnsize_none",
130  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
131 #endif // !DOCUMENTATION
132 
133 #ifndef DOCUMENTATION
134  AsmX86Instruction.setDataPrototype(
135  "Rose::BinaryAnalysis::X86InstructionSize", "addressSize", "= Rose::BinaryAnalysis::x86_insnsize_none",
136  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
137 #endif // !DOCUMENTATION
138 
139 #ifndef DOCUMENTATION
140  AsmX86Instruction.setDataPrototype(
141  "bool", "lockPrefix", "= false",
142  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
143 #endif // !DOCUMENTATION
144 
145 #ifndef DOCUMENTATION
146  AsmX86Instruction.setDataPrototype(
147  "Rose::BinaryAnalysis::X86RepeatPrefix", "repeatPrefix", "= Rose::BinaryAnalysis::x86_repeat_none",
148  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
149 #endif // !DOCUMENTATION
150 
151 #ifndef DOCUMENTATION
152  AsmX86Instruction.setDataPrototype(
153  "Rose::BinaryAnalysis::X86BranchPrediction", "branchPrediction", "= Rose::BinaryAnalysis::x86_branch_prediction_none",
154  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
155 #endif // !DOCUMENTATION
156 
157 #ifndef DOCUMENTATION
158  AsmX86Instruction.setDataPrototype(
159  "Rose::BinaryAnalysis::X86SegmentRegister", "segmentOverride", "= Rose::BinaryAnalysis::x86_segreg_none",
160  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
161 #endif // !DOCUMENTATION
162 
163  DECLARE_OTHERS(AsmX86Instruction);
164 #if defined(SgAsmX86Instruction_OTHERS) || defined(DOCUMENTATION)
165 
166  //----------------------- Boost serialization for SgAsmX86Instruction -----------------------
167 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
168 private:
169  friend class boost::serialization::access;
170 
171  template<class S>
172  void serialize(S &s, const unsigned /*version*/) {
173  debugSerializationBegin("SgAsmX86Instruction");
174  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmInstruction);
175  s & BOOST_SERIALIZATION_NVP(p_kind);
176  s & BOOST_SERIALIZATION_NVP(p_baseSize);
177  s & BOOST_SERIALIZATION_NVP(p_operandSize);
178  s & BOOST_SERIALIZATION_NVP(p_addressSize);
179  s & BOOST_SERIALIZATION_NVP(p_lockPrefix);
180  s & BOOST_SERIALIZATION_NVP(p_repeatPrefix);
181  s & BOOST_SERIALIZATION_NVP(p_branchPrediction);
182  s & BOOST_SERIALIZATION_NVP(p_segmentOverride);
183  debugSerializationEnd("SgAsmX86Instruction");
184  }
185 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
186 public:
187 public:
198 public:
206 public:
214 public:
222 public:
228  bool const& get_lockPrefix() const;
229  void set_lockPrefix(bool const&);
232 public:
240 public:
248 public:
258 public:
263 
268 
274 
280 
281  // Overrides are documented in the base class
282  virtual bool terminatesBasicBlock() override;
283  virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&,
284  rose_addr_t *target, rose_addr_t *ret) override;
285  virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&,
286  rose_addr_t *target, rose_addr_t *ret) override;
287  virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) override;
288  virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*>&) override;
289  virtual Sawyer::Optional<rose_addr_t> branchTarget() override;
290  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete) override;
291  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(const std::vector<SgAsmInstruction*>&,
292  bool &complete,
293  const Rose::BinaryAnalysis::MemoryMap::Ptr &initial_memory =
295  virtual bool isUnknown() const override;
296  virtual unsigned get_anyKind() const override;
297 public:
299  virtual ~SgAsmX86Instruction();
300 
301 public:
304 
305 public:
307  SgAsmX86Instruction(rose_addr_t const& address,
308  std::string const& mnemonic,
311  Rose::BinaryAnalysis::X86InstructionSize const& operandSize,
312  Rose::BinaryAnalysis::X86InstructionSize const& addressSize);
313 
314 protected:
321  void initializeProperties();
322 #endif // SgAsmX86Instruction_OTHERS
323 #ifdef DOCUMENTATION
324 };
325 #endif // DOCUMENTATION
326 
327 
329 // SgAsmDwarfVolatileType -- MACHINE GENERATED; DO NOT MODIFY --
331 
332 DECLARE_LEAF_CLASS(AsmDwarfVolatileType);
333 IS_SERIALIZABLE(AsmDwarfVolatileType);
334 
335 #ifdef DOCUMENTATION
337 #endif // DOCUMENTATION
338 
339  DECLARE_OTHERS(AsmDwarfVolatileType);
340 #if defined(SgAsmDwarfVolatileType_OTHERS) || defined(DOCUMENTATION)
341 
342  //----------------------- Boost serialization for SgAsmDwarfVolatileType -----------------------
343 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
344 private:
345  friend class boost::serialization::access;
346 
347  template<class S>
348  void serialize(S &s, const unsigned /*version*/) {
349  debugSerializationBegin("SgAsmDwarfVolatileType");
350  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmDwarfConstruct);
351  debugSerializationEnd("SgAsmDwarfVolatileType");
352  }
353 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
354 
355 public:
357  virtual ~SgAsmDwarfVolatileType();
358 
359 public:
362 
363 public:
365  SgAsmDwarfVolatileType(int const& nesting_level,
366  uint64_t const& offset,
367  uint64_t const& overall_offset);
368 
369 protected:
376  void initializeProperties();
377 #endif // SgAsmDwarfVolatileType_OTHERS
378 #ifdef DOCUMENTATION
379 };
380 #endif // DOCUMENTATION
381 
382 
384 // SgAsmVectorType -- MACHINE GENERATED; DO NOT MODIFY --
386 
387 DECLARE_LEAF_CLASS(AsmVectorType);
388 IS_SERIALIZABLE(AsmVectorType);
389 
390 #ifdef DOCUMENTATION
391 
392 class SgAsmVectorType: public SgAsmType {
393 #endif // DOCUMENTATION
394 
395 #ifndef DOCUMENTATION
396  AsmVectorType.setDataPrototype(
397  "size_t", "nElmts", "= 0",
398  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
399 #endif // !DOCUMENTATION
400 
401 #ifndef DOCUMENTATION
402  AsmVectorType.setDataPrototype(
403  "SgAsmType*", "elmtType", "= nullptr",
404  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
405 #endif // !DOCUMENTATION
406 
407  DECLARE_OTHERS(AsmVectorType);
408 #if defined(SgAsmVectorType_OTHERS) || defined(DOCUMENTATION)
409 
410  //----------------------- Boost serialization for SgAsmVectorType -----------------------
411 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
412 private:
413  friend class boost::serialization::access;
414 
415  template<class S>
416  void serialize(S &s, const unsigned /*version*/) {
417  debugSerializationBegin("SgAsmVectorType");
418  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmType);
419  s & BOOST_SERIALIZATION_NVP(p_nElmts);
420  s & BOOST_SERIALIZATION_NVP(p_elmtType);
421  debugSerializationEnd("SgAsmVectorType");
422  }
423 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
424 
425 public:
431 public:
436 public:
438  SgAsmVectorType(size_t nElmts, SgAsmType *elmtType);
439 
441  size_t get_nElmts() const;
442 
444  SgAsmType* get_elmtType() const;
445 
446  // Overrides documented in base class
447  virtual void check() const override;
448  virtual std::string toString() const override;
449  virtual size_t get_nBits() const override;
450 public:
452  virtual ~SgAsmVectorType();
453 
454 public:
456  SgAsmVectorType();
457 
458 protected:
465  void initializeProperties();
466 #endif // SgAsmVectorType_OTHERS
467 #ifdef DOCUMENTATION
468 };
469 #endif // DOCUMENTATION
470 
471 
473 // SgAsmUnaryUnsignedExtend -- MACHINE GENERATED; DO NOT MODIFY --
475 
476 DECLARE_LEAF_CLASS(AsmUnaryUnsignedExtend);
477 IS_SERIALIZABLE(AsmUnaryUnsignedExtend);
478 
479 #ifdef DOCUMENTATION
480 
486 #endif // DOCUMENTATION
487 
488  DECLARE_OTHERS(AsmUnaryUnsignedExtend);
489 #if defined(SgAsmUnaryUnsignedExtend_OTHERS) || defined(DOCUMENTATION)
490 
491  //----------------------- Boost serialization for SgAsmUnaryUnsignedExtend -----------------------
492 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
493 private:
494  friend class boost::serialization::access;
495 
496  template<class S>
497  void serialize(S &s, const unsigned /*version*/) {
498  debugSerializationBegin("SgAsmUnaryUnsignedExtend");
499  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmUnaryExpression);
500  debugSerializationEnd("SgAsmUnaryUnsignedExtend");
501  }
502 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
503 
504 public:
506  virtual ~SgAsmUnaryUnsignedExtend();
507 
508 public:
511 
512 public:
514  explicit SgAsmUnaryUnsignedExtend(SgAsmExpression* const& operand);
515 
516 protected:
523  void initializeProperties();
524 #endif // SgAsmUnaryUnsignedExtend_OTHERS
525 #ifdef DOCUMENTATION
526 };
527 #endif // DOCUMENTATION
528 
529 
531 // SgAsmUnaryTruncate -- MACHINE GENERATED; DO NOT MODIFY --
533 
534 DECLARE_LEAF_CLASS(AsmUnaryTruncate);
535 IS_SERIALIZABLE(AsmUnaryTruncate);
536 
537 #ifdef DOCUMENTATION
538 
544 #endif // DOCUMENTATION
545 
546  DECLARE_OTHERS(AsmUnaryTruncate);
547 #if defined(SgAsmUnaryTruncate_OTHERS) || defined(DOCUMENTATION)
548 
549  //----------------------- Boost serialization for SgAsmUnaryTruncate -----------------------
550 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
551 private:
552  friend class boost::serialization::access;
553 
554  template<class S>
555  void serialize(S &s, const unsigned /*version*/) {
556  debugSerializationBegin("SgAsmUnaryTruncate");
557  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmUnaryExpression);
558  debugSerializationEnd("SgAsmUnaryTruncate");
559  }
560 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
561 
562 public:
564  virtual ~SgAsmUnaryTruncate();
565 
566 public:
569 
570 public:
572  explicit SgAsmUnaryTruncate(SgAsmExpression* const& operand);
573 
574 protected:
581  void initializeProperties();
582 #endif // SgAsmUnaryTruncate_OTHERS
583 #ifdef DOCUMENTATION
584 };
585 #endif // DOCUMENTATION
586 
587 
589 // SgAsmUnarySignedExtend -- MACHINE GENERATED; DO NOT MODIFY --
591 
592 DECLARE_LEAF_CLASS(AsmUnarySignedExtend);
593 IS_SERIALIZABLE(AsmUnarySignedExtend);
594 
595 #ifdef DOCUMENTATION
596 
602 #endif // DOCUMENTATION
603 
604  DECLARE_OTHERS(AsmUnarySignedExtend);
605 #if defined(SgAsmUnarySignedExtend_OTHERS) || defined(DOCUMENTATION)
606 
607  //----------------------- Boost serialization for SgAsmUnarySignedExtend -----------------------
608 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
609 private:
610  friend class boost::serialization::access;
611 
612  template<class S>
613  void serialize(S &s, const unsigned /*version*/) {
614  debugSerializationBegin("SgAsmUnarySignedExtend");
615  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmUnaryExpression);
616  debugSerializationEnd("SgAsmUnarySignedExtend");
617  }
618 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
619 
620 public:
622  virtual ~SgAsmUnarySignedExtend();
623 
624 public:
627 
628 public:
630  explicit SgAsmUnarySignedExtend(SgAsmExpression* const& operand);
631 
632 protected:
639  void initializeProperties();
640 #endif // SgAsmUnarySignedExtend_OTHERS
641 #ifdef DOCUMENTATION
642 };
643 #endif // DOCUMENTATION
644 
645 
647 // SgAsmUnaryRrx -- MACHINE GENERATED; DO NOT MODIFY --
649 
650 DECLARE_LEAF_CLASS(AsmUnaryRrx);
651 IS_SERIALIZABLE(AsmUnaryRrx);
652 
653 DECLARE_HEADERS(AsmUnaryRrx);
654 #if defined(SgAsmUnaryRrx_HEADERS) || defined(DOCUMENTATION)
655 // FIXME[Robb P Matzke 2016-10-31]: no idea what this is
656 #endif // SgAsmUnaryRrx_HEADERS
657 
658 #ifdef DOCUMENTATION
660 #endif // DOCUMENTATION
661 
662  DECLARE_OTHERS(AsmUnaryRrx);
663 #if defined(SgAsmUnaryRrx_OTHERS) || defined(DOCUMENTATION)
664 
665  //----------------------- Boost serialization for SgAsmUnaryRrx -----------------------
666 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
667 private:
668  friend class boost::serialization::access;
669 
670  template<class S>
671  void serialize(S &s, const unsigned /*version*/) {
672  debugSerializationBegin("SgAsmUnaryRrx");
673  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmUnaryExpression);
674  debugSerializationEnd("SgAsmUnaryRrx");
675  }
676 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
677 
678 public:
680  virtual ~SgAsmUnaryRrx();
681 
682 public:
684  SgAsmUnaryRrx();
685 
686 public:
688  explicit SgAsmUnaryRrx(SgAsmExpression* const& operand);
689 
690 protected:
697  void initializeProperties();
698 #endif // SgAsmUnaryRrx_OTHERS
699 #ifdef DOCUMENTATION
700 };
701 #endif // DOCUMENTATION
702 
703 
705 // SgAsmUnaryPlus -- MACHINE GENERATED; DO NOT MODIFY --
707 
708 DECLARE_LEAF_CLASS(AsmUnaryPlus);
709 IS_SERIALIZABLE(AsmUnaryPlus);
710 
711 #ifdef DOCUMENTATION
712 
714 #endif // DOCUMENTATION
715 
716  DECLARE_OTHERS(AsmUnaryPlus);
717 #if defined(SgAsmUnaryPlus_OTHERS) || defined(DOCUMENTATION)
718 
719  //----------------------- Boost serialization for SgAsmUnaryPlus -----------------------
720 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
721 private:
722  friend class boost::serialization::access;
723 
724  template<class S>
725  void serialize(S &s, const unsigned /*version*/) {
726  debugSerializationBegin("SgAsmUnaryPlus");
727  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmUnaryExpression);
728  debugSerializationEnd("SgAsmUnaryPlus");
729  }
730 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
731 
732 public:
734  virtual ~SgAsmUnaryPlus();
735 
736 public:
738  SgAsmUnaryPlus();
739 
740 public:
742  explicit SgAsmUnaryPlus(SgAsmExpression* const& operand);
743 
744 protected:
751  void initializeProperties();
752 #endif // SgAsmUnaryPlus_OTHERS
753 #ifdef DOCUMENTATION
754 };
755 #endif // DOCUMENTATION
756 
757 
759 // SgAsmUnaryMinus -- MACHINE GENERATED; DO NOT MODIFY --
761 
762 DECLARE_LEAF_CLASS(AsmUnaryMinus);
763 IS_SERIALIZABLE(AsmUnaryMinus);
764 
765 #ifdef DOCUMENTATION
766 
768 #endif // DOCUMENTATION
769 
770  DECLARE_OTHERS(AsmUnaryMinus);
771 #if defined(SgAsmUnaryMinus_OTHERS) || defined(DOCUMENTATION)
772 
773  //----------------------- Boost serialization for SgAsmUnaryMinus -----------------------
774 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
775 private:
776  friend class boost::serialization::access;
777 
778  template<class S>
779  void serialize(S &s, const unsigned /*version*/) {
780  debugSerializationBegin("SgAsmUnaryMinus");
781  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmUnaryExpression);
782  debugSerializationEnd("SgAsmUnaryMinus");
783  }
784 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
785 
786 public:
788  virtual ~SgAsmUnaryMinus();
789 
790 public:
792  SgAsmUnaryMinus();
793 
794 public:
796  explicit SgAsmUnaryMinus(SgAsmExpression* const& operand);
797 
798 protected:
805  void initializeProperties();
806 #endif // SgAsmUnaryMinus_OTHERS
807 #ifdef DOCUMENTATION
808 };
809 #endif // DOCUMENTATION
810 
811 
813 // SgAsmUnaryExpression -- MACHINE GENERATED; DO NOT MODIFY --
815 
816 #ifndef DOCUMENTATION
817 AstNodeClass& AsmUnaryExpression = nonTerminalConstructor(
818  "AsmUnaryExpression",
819  *this,
820  "AsmUnaryExpression",
821  "AsmUnaryExpressionTag",
822  SubclassListBuilder()
823  | AsmUnaryMinus
824  | AsmUnaryPlus
825  | AsmUnaryRrx
826  | AsmUnarySignedExtend
827  | AsmUnaryTruncate
828  | AsmUnaryUnsignedExtend
829  , false);
830 assert(AsmUnaryExpression.associatedGrammar != nullptr);
831 AsmUnaryExpression.setCppCondition("!defined(DOCUMENTATION)");
832 AsmUnaryExpression.isBoostSerializable(true);
833 AsmUnaryExpression.setAutomaticGenerationOfConstructor(false);
834 AsmUnaryExpression.setAutomaticGenerationOfDestructor(false);
835 #endif // !DOCUMENTATION
836 
837 #ifdef DOCUMENTATION
838 
840 #endif // DOCUMENTATION
841 
842 #ifndef DOCUMENTATION
843  AsmUnaryExpression.setDataPrototype(
844  "SgAsmExpression*", "operand", "= nullptr",
845  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
846 #endif // !DOCUMENTATION
847 
848  DECLARE_OTHERS(AsmUnaryExpression);
849 #if defined(SgAsmUnaryExpression_OTHERS) || defined(DOCUMENTATION)
850 
851  //----------------------- Boost serialization for SgAsmUnaryExpression -----------------------
852 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
853 private:
854  friend class boost::serialization::access;
855 
856  template<class S>
857  void serialize(S &s, const unsigned /*version*/) {
858  debugSerializationBegin("SgAsmUnaryExpression");
859  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExpression);
860  s & BOOST_SERIALIZATION_NVP(p_operand);
861  debugSerializationEnd("SgAsmUnaryExpression");
862  }
863 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
864 
865 public:
869  SgAsmExpression* const& get_operand() const;
870  void set_operand(SgAsmExpression* const&);
873 public:
875  virtual ~SgAsmUnaryExpression();
876 
877 protected:
880 
881 protected:
883  explicit SgAsmUnaryExpression(SgAsmExpression* const& operand);
884 
885 protected:
892  void initializeProperties();
893 #endif // SgAsmUnaryExpression_OTHERS
894 #ifdef DOCUMENTATION
895 };
896 #endif // DOCUMENTATION
897 
898 
900 // SgAsmSynthesizedFieldDeclaration -- MACHINE GENERATED; DO NOT MODIFY --
902 
903 DECLARE_LEAF_CLASS(AsmSynthesizedFieldDeclaration);
904 IS_SERIALIZABLE(AsmSynthesizedFieldDeclaration);
905 
906 DECLARE_HEADERS(AsmSynthesizedFieldDeclaration);
907 #if defined(SgAsmSynthesizedFieldDeclaration_HEADERS) || defined(DOCUMENTATION)
908 // FIXME[Robb P Matzke 2017-02-13]: what is this?
909 #endif // SgAsmSynthesizedFieldDeclaration_HEADERS
910 
911 #ifdef DOCUMENTATION
913 #endif // DOCUMENTATION
914 
915 #ifndef DOCUMENTATION
916  AsmSynthesizedFieldDeclaration.setDataPrototype(
917  "std::string", "name", "",
918  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
919 #endif // !DOCUMENTATION
920 
921 #ifndef DOCUMENTATION
922  AsmSynthesizedFieldDeclaration.setDataPrototype(
923  "uint64_t", "offset", "= 0",
924  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
925 #endif // !DOCUMENTATION
926 
927  DECLARE_OTHERS(AsmSynthesizedFieldDeclaration);
928 #if defined(SgAsmSynthesizedFieldDeclaration_OTHERS) || defined(DOCUMENTATION)
929 
930  //----------------------- Boost serialization for SgAsmSynthesizedFieldDeclaration -----------------------
931 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
932 private:
933  friend class boost::serialization::access;
934 
935  template<class S>
936  void serialize(S &s, const unsigned /*version*/) {
937  debugSerializationBegin("SgAsmSynthesizedFieldDeclaration");
938  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmSynthesizedDeclaration);
939  s & BOOST_SERIALIZATION_NVP(p_name);
940  s & BOOST_SERIALIZATION_NVP(p_offset);
941  debugSerializationEnd("SgAsmSynthesizedFieldDeclaration");
942  }
943 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
944 
945 public:
949  std::string const& get_name() const;
950  void set_name(std::string const&);
952  // FIXME[Robb P Matzke 2017-02-13]: Is this bytes, bits, or what?
953  // Not clear if we want to store the offset explicitly
954 public:
958  uint64_t const& get_offset() const;
959  void set_offset(uint64_t const&);
962 public:
965 
966 public:
969 
970 public:
972  explicit SgAsmSynthesizedFieldDeclaration(rose_addr_t const& address);
973 
974 protected:
981  void initializeProperties();
982 #endif // SgAsmSynthesizedFieldDeclaration_OTHERS
983 #ifdef DOCUMENTATION
984 };
985 #endif // DOCUMENTATION
986 
987 
989 // SgAsmSynthesizedDataStructureDeclaration -- MACHINE GENERATED; DO NOT MODIFY --
991 
992 DECLARE_LEAF_CLASS(AsmSynthesizedDataStructureDeclaration);
993 IS_SERIALIZABLE(AsmSynthesizedDataStructureDeclaration);
994 
995 #ifdef DOCUMENTATION
996 
1007 #endif // DOCUMENTATION
1008 
1009  DECLARE_OTHERS(AsmSynthesizedDataStructureDeclaration);
1010 #if defined(SgAsmSynthesizedDataStructureDeclaration_OTHERS) || defined(DOCUMENTATION)
1011 
1012  //----------------------- Boost serialization for SgAsmSynthesizedDataStructureDeclaration -----------------------
1013 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1014 private:
1015  friend class boost::serialization::access;
1016 
1017  template<class S>
1018  void serialize(S &s, const unsigned /*version*/) {
1019  debugSerializationBegin("SgAsmSynthesizedDataStructureDeclaration");
1020  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmSynthesizedDeclaration);
1021  debugSerializationEnd("SgAsmSynthesizedDataStructureDeclaration");
1022  }
1023 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1024 protected:
1025  SgAsmSynthesizedDeclarationPtrList p_declarationList;
1026 
1027 public:
1030  p_declarationList.push_back(declaration);
1031  }
1032 public:
1035 
1036 public:
1039 
1040 public:
1042  explicit SgAsmSynthesizedDataStructureDeclaration(rose_addr_t const& address);
1043 
1044 protected:
1051  void initializeProperties();
1052 #endif // SgAsmSynthesizedDataStructureDeclaration_OTHERS
1053 #ifdef DOCUMENTATION
1054 };
1055 #endif // DOCUMENTATION
1056 
1057 
1059 // SgAsmStringStorage -- MACHINE GENERATED; DO NOT MODIFY --
1061 
1062 DECLARE_LEAF_CLASS(AsmStringStorage);
1063 IS_SERIALIZABLE(AsmStringStorage);
1064 
1065 #ifdef DOCUMENTATION
1066 
1068 #endif // DOCUMENTATION
1069 
1070 #ifndef DOCUMENTATION
1071  AsmStringStorage.setDataPrototype(
1072  "SgAsmGenericStrtab*", "strtab", "= nullptr",
1073  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1074 #endif // !DOCUMENTATION
1075 
1076 #ifndef DOCUMENTATION
1077  AsmStringStorage.setDataPrototype(
1078  "std::string", "string", "",
1079  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1080 #endif // !DOCUMENTATION
1081 
1082 #ifndef DOCUMENTATION
1083  AsmStringStorage.setDataPrototype(
1084  "rose_addr_t", "offset", "= 0",
1085  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1086 #endif // !DOCUMENTATION
1087 
1088  DECLARE_OTHERS(AsmStringStorage);
1089 #if defined(SgAsmStringStorage_OTHERS) || defined(DOCUMENTATION)
1090 
1091  //----------------------- Boost serialization for SgAsmStringStorage -----------------------
1092 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1093 private:
1094  friend class boost::serialization::access;
1095 
1096  template<class S>
1097  void serialize(S &s, const unsigned /*version*/) {
1098  debugSerializationBegin("SgAsmStringStorage");
1099  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
1100  s & BOOST_SERIALIZATION_NVP(p_strtab);
1101  s & BOOST_SERIALIZATION_NVP(p_string);
1102  s & BOOST_SERIALIZATION_NVP(p_offset);
1103  debugSerializationEnd("SgAsmStringStorage");
1104  }
1105 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1106 
1107 public:
1111  SgAsmGenericStrtab* const& get_strtab() const;
1112  void set_strtab(SgAsmGenericStrtab* const&);
1115 public:
1119  std::string const& get_string() const;
1120  void set_string(std::string const&);
1123 public:
1127  rose_addr_t const& get_offset() const;
1128  void set_offset(rose_addr_t const&);
1130 public:
1131  SgAsmStringStorage(SgAsmGenericStrtab *strtab, const std::string &string, rose_addr_t offset);
1132 
1133  void dump(FILE *s, const char *prefix, ssize_t idx) const;
1134 
1135  /* Accessors. The set_* accessors are private because we don't want anyone messing with them. These data members are
1136  * used to control string allocation in ELF string tables and must only be modified by allocators in closely related
1137  * classes. For instance, to change the value of the string one should call SgAsmGenericString::set_string()
1138  * instead. */
1139 
1140  private:
1141  friend class SgAsmStoredString; /*allowed to set private data members*/
1142  friend class SgAsmStoredStrtab; /*allowed to set private data members*/
1143 public:
1145  virtual ~SgAsmStringStorage();
1146 
1147 public:
1150 
1151 protected:
1158  void initializeProperties();
1159 #endif // SgAsmStringStorage_OTHERS
1160 #ifdef DOCUMENTATION
1161 };
1162 #endif // DOCUMENTATION
1163 
1164 
1166 // SgAsmStoredString -- MACHINE GENERATED; DO NOT MODIFY --
1168 
1169 DECLARE_LEAF_CLASS(AsmStoredString);
1170 IS_SERIALIZABLE(AsmStoredString);
1171 
1172 #ifdef DOCUMENTATION
1173 
1175 #endif // DOCUMENTATION
1176 
1177 #ifndef DOCUMENTATION
1178  AsmStoredString.setDataPrototype(
1179  "SgAsmStringStorage*", "storage", "= nullptr",
1180  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1181 #endif // !DOCUMENTATION
1182 
1183  DECLARE_OTHERS(AsmStoredString);
1184 #if defined(SgAsmStoredString_OTHERS) || defined(DOCUMENTATION)
1185 
1186  //----------------------- Boost serialization for SgAsmStoredString -----------------------
1187 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1188 private:
1189  friend class boost::serialization::access;
1190 
1191  template<class S>
1192  void serialize(S &s, const unsigned /*version*/) {
1193  debugSerializationBegin("SgAsmStoredString");
1194  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericString);
1195  s & BOOST_SERIALIZATION_NVP(p_storage);
1196  debugSerializationEnd("SgAsmStoredString");
1197  }
1198 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1199 
1200 public:
1204  SgAsmStringStorage* const& get_storage() const;
1205  void set_storage(SgAsmStringStorage* const&);
1207 public:
1209  SgAsmStoredString(SgAsmGenericStrtab*, rose_addr_t offset);
1210 
1212  SgAsmStoredString(SgAsmGenericStrtab*, const std::string&);
1213 
1215  explicit SgAsmStoredString(class SgAsmStringStorage*);
1216 
1218  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
1219 
1224 
1226  virtual std::string get_string(bool escape=false) const override;
1227 
1231  virtual void set_string(const std::string&) override;
1232 
1236  virtual void set_string(rose_addr_t) override;
1237 
1241  virtual rose_addr_t get_offset() const override;
1242 public:
1244  virtual ~SgAsmStoredString();
1245 
1246 public:
1249 
1250 protected:
1257  void initializeProperties();
1258 #endif // SgAsmStoredString_OTHERS
1259 #ifdef DOCUMENTATION
1260 };
1261 #endif // DOCUMENTATION
1262 
1263 
1265 // SgAsmStaticData -- MACHINE GENERATED; DO NOT MODIFY --
1267 
1268 DECLARE_LEAF_CLASS(AsmStaticData);
1269 IS_SERIALIZABLE(AsmStaticData);
1270 
1271 #ifdef DOCUMENTATION
1272 
1280 #endif // DOCUMENTATION
1281 
1282 #ifndef DOCUMENTATION
1283  AsmStaticData.setDataPrototype(
1284  "SgUnsignedCharList", "raw_bytes", "",
1285  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1286 #endif // !DOCUMENTATION
1287 
1288  DECLARE_OTHERS(AsmStaticData);
1289 #if defined(SgAsmStaticData_OTHERS) || defined(DOCUMENTATION)
1290 
1291  //----------------------- Boost serialization for SgAsmStaticData -----------------------
1292 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1293 private:
1294  friend class boost::serialization::access;
1295 
1296  template<class S>
1297  void serialize(S &s, const unsigned /*version*/) {
1298  debugSerializationBegin("SgAsmStaticData");
1299  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmStatement);
1300  s & BOOST_SERIALIZATION_NVP(p_raw_bytes);
1301  debugSerializationEnd("SgAsmStaticData");
1302  }
1303 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1304 
1305 public:
1312  SgUnsignedCharList const& get_raw_bytes() const;
1313  void set_raw_bytes(SgUnsignedCharList const&);
1315 public:
1319  size_t get_size() const { return p_raw_bytes.size(); }
1320 public:
1322  virtual ~SgAsmStaticData();
1323 
1324 public:
1326  SgAsmStaticData();
1327 
1328 public:
1330  explicit SgAsmStaticData(rose_addr_t const& address);
1331 
1332 protected:
1339  void initializeProperties();
1340 #endif // SgAsmStaticData_OTHERS
1341 #ifdef DOCUMENTATION
1342 };
1343 #endif // DOCUMENTATION
1344 
1345 
1347 // SgAsmStackExpression -- MACHINE GENERATED; DO NOT MODIFY --
1349 
1350 DECLARE_LEAF_CLASS(AsmStackExpression);
1351 IS_SERIALIZABLE(AsmStackExpression);
1352 
1353 #ifdef DOCUMENTATION
1354 
1356 #endif // DOCUMENTATION
1357 
1358 #ifndef DOCUMENTATION
1359  AsmStackExpression.setDataPrototype(
1360  "int", "stack_position", "= 0",
1361  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1362 #endif // !DOCUMENTATION
1363 
1364  DECLARE_OTHERS(AsmStackExpression);
1365 #if defined(SgAsmStackExpression_OTHERS) || defined(DOCUMENTATION)
1366 
1367  //----------------------- Boost serialization for SgAsmStackExpression -----------------------
1368 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1369 private:
1370  friend class boost::serialization::access;
1371 
1372  template<class S>
1373  void serialize(S &s, const unsigned /*version*/) {
1374  debugSerializationBegin("SgAsmStackExpression");
1375  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExpression);
1376  s & BOOST_SERIALIZATION_NVP(p_stack_position);
1377  debugSerializationEnd("SgAsmStackExpression");
1378  }
1379 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1380 
1381 public:
1388  int const& get_stack_position() const;
1389  void set_stack_position(int const&);
1392 public:
1394  virtual ~SgAsmStackExpression();
1395 
1396 public:
1399 
1400 public:
1402  explicit SgAsmStackExpression(int const& stack_position);
1403 
1404 protected:
1411  void initializeProperties();
1412 #endif // SgAsmStackExpression_OTHERS
1413 #ifdef DOCUMENTATION
1414 };
1415 #endif // DOCUMENTATION
1416 
1417 
1419 // SgAsmRiscOperation -- MACHINE GENERATED; DO NOT MODIFY --
1421 
1422 DECLARE_LEAF_CLASS(AsmRiscOperation);
1423 IS_SERIALIZABLE(AsmRiscOperation);
1424 
1425 #ifdef DOCUMENTATION
1426 
1435 #endif // DOCUMENTATION
1436 
1437 #ifndef DOCUMENTATION
1438  AsmRiscOperation.setDataPrototype(
1439  "SgAsmRiscOperation::RiscOperator", "riscOperator", "= OP_NONE",
1440  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1441 #endif // !DOCUMENTATION
1442 
1443 #ifndef DOCUMENTATION
1444  AsmRiscOperation.setDataPrototype(
1445  "SgAsmExprListExp*", "operands", "= nullptr",
1446  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
1447 #endif // !DOCUMENTATION
1448 
1449  DECLARE_OTHERS(AsmRiscOperation);
1450 #if defined(SgAsmRiscOperation_OTHERS) || defined(DOCUMENTATION)
1451 
1452  //----------------------- Boost serialization for SgAsmRiscOperation -----------------------
1453 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1454 private:
1455  friend class boost::serialization::access;
1456 
1457  template<class S>
1458  void serialize(S &s, const unsigned /*version*/) {
1459  debugSerializationBegin("SgAsmRiscOperation");
1460  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExpression);
1461  s & BOOST_SERIALIZATION_NVP(p_riscOperator);
1462  s & BOOST_SERIALIZATION_NVP(p_operands);
1463  debugSerializationEnd("SgAsmRiscOperation");
1464  }
1465 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1466  // Local types
1469 public:
1476  OP_NONE,
1477  OP_bottom,
1478  OP_undefined,
1479  OP_unspecified,
1480  OP_filterCallTarget,
1481  OP_filterReturnTarget,
1482  OP_filterIndirectJumpTarget,
1483  OP_hlt,
1484  OP_cpuid,
1485  OP_rdtsc,
1486  OP_and_,
1487  OP_or_,
1488  OP_xor_,
1489  OP_invert,
1490  OP_extract,
1491  OP_concat,
1492  OP_leastSignificantSetBit,
1493  OP_mostSignificantSetBit,
1494  OP_rotateLeft,
1495  OP_rotateRight,
1496  OP_shiftLeft,
1497  OP_shiftRight,
1498  OP_shiftRightArithmetic,
1499  OP_equalToZero,
1500  OP_ite,
1501  OP_isEqual,
1502  OP_isNotEqual,
1503  OP_isUnsignedLessThan,
1504  OP_isUnsignedLessThanOrEqual,
1505  OP_isUnsignedGreaterThan,
1506  OP_isUnsignedGreaterThanOrEqual,
1507  OP_isSignedLessThan,
1508  OP_isSignedLessThanOrEqual,
1509  OP_isSignedGreaterThan,
1510  OP_isSignedGreaterThanOrEqual,
1511  OP_unsignedExtend,
1512  OP_signExtend,
1515  OP_subtract,
1516  OP_negate,
1517  OP_signedDivide,
1518  OP_signedModulo,
1519  OP_signedMultiply,
1520  OP_unsignedDivide,
1521  OP_unsignedModulo,
1522  OP_unsignedMultiply,
1523  OP_interrupt,
1524  OP_readRegister,
1525  OP_peekRegister,
1526  OP_writeRegister,
1528  OP_peekMemory,
1530  OP_N_OPERATORS // MUST BE LAST!
1531  };
1532 
1534  // Properties
1536 
1537  // Note that the qualification for the type is necessary only for ROSETTA. Remove it when ROSETTA finally goes away.
1538 public:
1549 public:
1556  SgAsmExprListExp* const& get_operands() const;
1557  void set_operands(SgAsmExprListExp* const&);
1560 public:
1562  virtual ~SgAsmRiscOperation();
1563 
1564 public:
1567 
1568 public:
1570  explicit SgAsmRiscOperation(SgAsmRiscOperation::RiscOperator const& riscOperator);
1571 
1572 protected:
1579  void initializeProperties();
1580 #endif // SgAsmRiscOperation_OTHERS
1581 #ifdef DOCUMENTATION
1582 };
1583 #endif // DOCUMENTATION
1584 
1585 
1587 // SgAsmRegisterNames -- MACHINE GENERATED; DO NOT MODIFY --
1589 
1590 DECLARE_LEAF_CLASS(AsmRegisterNames);
1591 IS_SERIALIZABLE(AsmRegisterNames);
1592 
1593 #ifdef DOCUMENTATION
1594 
1596 #endif // DOCUMENTATION
1597 
1598 #ifndef DOCUMENTATION
1599  AsmRegisterNames.setDataPrototype(
1600  "SgAsmRegisterReferenceExpressionPtrList", "registers", "",
1601  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
1602 #endif // !DOCUMENTATION
1603 
1604 #ifndef DOCUMENTATION
1605  AsmRegisterNames.setDataPrototype(
1606  "unsigned", "mask", "= 0",
1607  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1608 #endif // !DOCUMENTATION
1609 
1610  DECLARE_OTHERS(AsmRegisterNames);
1611 #if defined(SgAsmRegisterNames_OTHERS) || defined(DOCUMENTATION)
1612 
1613  //----------------------- Boost serialization for SgAsmRegisterNames -----------------------
1614 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1615 private:
1616  friend class boost::serialization::access;
1617 
1618  template<class S>
1619  void serialize(S &s, const unsigned /*version*/) {
1620  debugSerializationBegin("SgAsmRegisterNames");
1621  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExpression);
1622  s & BOOST_SERIALIZATION_NVP(p_registers);
1623  s & BOOST_SERIALIZATION_NVP(p_mask);
1624  debugSerializationEnd("SgAsmRegisterNames");
1625  }
1626 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1627 
1628 public:
1635  SgAsmRegisterReferenceExpressionPtrList const& get_registers() const;
1636  SgAsmRegisterReferenceExpressionPtrList& get_registers();
1637  void set_registers(SgAsmRegisterReferenceExpressionPtrList const&);
1640 public:
1647  unsigned const& get_mask() const;
1648  void set_mask(unsigned const&);
1651 public:
1653  virtual ~SgAsmRegisterNames();
1654 
1655 public:
1658 
1659 protected:
1666  void initializeProperties();
1667 #endif // SgAsmRegisterNames_OTHERS
1668 #ifdef DOCUMENTATION
1669 };
1670 #endif // DOCUMENTATION
1671 
1672 
1674 // SgAsmPowerpcInstruction -- MACHINE GENERATED; DO NOT MODIFY --
1676 
1677 DECLARE_LEAF_CLASS(AsmPowerpcInstruction);
1678 IS_SERIALIZABLE(AsmPowerpcInstruction);
1679 
1680 DECLARE_HEADERS(AsmPowerpcInstruction);
1681 #if defined(SgAsmPowerpcInstruction_HEADERS) || defined(DOCUMENTATION)
1682 #include <Rose/BinaryAnalysis/InstructionEnumsPowerpc.h>
1683 #endif // SgAsmPowerpcInstruction_HEADERS
1684 
1685 #ifdef DOCUMENTATION
1686 
1688 #endif // DOCUMENTATION
1689 
1690 #ifndef DOCUMENTATION
1691  AsmPowerpcInstruction.setDataPrototype(
1692  "Rose::BinaryAnalysis::PowerpcInstructionKind", "kind", "= Rose::BinaryAnalysis::powerpc_unknown_instruction",
1693  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1694 #endif // !DOCUMENTATION
1695 
1696  DECLARE_OTHERS(AsmPowerpcInstruction);
1697 #if defined(SgAsmPowerpcInstruction_OTHERS) || defined(DOCUMENTATION)
1698 
1699  //----------------------- Boost serialization for SgAsmPowerpcInstruction -----------------------
1700 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1701 private:
1702  friend class boost::serialization::access;
1703 
1704  template<class S>
1705  void serialize(S &s, const unsigned /*version*/) {
1706  debugSerializationBegin("SgAsmPowerpcInstruction");
1707  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmInstruction);
1708  s & BOOST_SERIALIZATION_NVP(p_kind);
1709  debugSerializationEnd("SgAsmPowerpcInstruction");
1710  }
1711 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1712 public:
1713 public:
1723 public:
1729  std::string conditionalBranchDescription() const;
1730 
1736 
1737  // Overrides are documented in the base class
1738  virtual std::string description() const override;
1739  virtual bool terminatesBasicBlock() override;
1740  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete) override;
1741  virtual bool isUnknown() const override;
1742  virtual unsigned get_anyKind() const override;
1743  virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&,
1744  rose_addr_t *target, rose_addr_t *retva) override;
1745  virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&,
1746  rose_addr_t *target, rose_addr_t *retva) override;
1747  virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) override;
1748  virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*>&) override;
1749 public:
1751  virtual ~SgAsmPowerpcInstruction();
1752 
1753 public:
1756 
1757 public:
1759  SgAsmPowerpcInstruction(rose_addr_t const& address,
1760  std::string const& mnemonic,
1762 
1763 protected:
1770  void initializeProperties();
1771 #endif // SgAsmPowerpcInstruction_OTHERS
1772 #ifdef DOCUMENTATION
1773 };
1774 #endif // DOCUMENTATION
1775 
1776 
1778 // SgAsmPEStringSection -- MACHINE GENERATED; DO NOT MODIFY --
1780 
1781 DECLARE_LEAF_CLASS(AsmPEStringSection);
1782 IS_SERIALIZABLE(AsmPEStringSection);
1783 
1784 #ifdef DOCUMENTATION
1785 
1787 #endif // DOCUMENTATION
1788 
1789 #ifndef DOCUMENTATION
1790  AsmPEStringSection.setDataPrototype(
1791  "SgAsmCoffStrtab*", "strtab", "= nullptr",
1792  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1793 #endif // !DOCUMENTATION
1794 
1795  DECLARE_OTHERS(AsmPEStringSection);
1796 #if defined(SgAsmPEStringSection_OTHERS) || defined(DOCUMENTATION)
1797 
1798  //----------------------- Boost serialization for SgAsmPEStringSection -----------------------
1799 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1800 private:
1801  friend class boost::serialization::access;
1802 
1803  template<class S>
1804  void serialize(S &s, const unsigned /*version*/) {
1805  debugSerializationBegin("SgAsmPEStringSection");
1806  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmPESection);
1807  s & BOOST_SERIALIZATION_NVP(p_strtab);
1808  debugSerializationEnd("SgAsmPEStringSection");
1809  }
1810 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1811 
1812 public:
1818  SgAsmCoffStrtab* const& get_strtab() const;
1819  void set_strtab(SgAsmCoffStrtab* const&);
1821 public:
1823  virtual SgAsmPEStringSection* parse() override;
1824  virtual bool reallocate() override;
1825  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
1826  virtual void set_size(rose_addr_t newsize) override;
1827  virtual void unparse(std::ostream&) const override;
1828 public:
1830  virtual ~SgAsmPEStringSection();
1831 
1832 public:
1835 
1836 protected:
1843  void initializeProperties();
1844 #endif // SgAsmPEStringSection_OTHERS
1845 #ifdef DOCUMENTATION
1846 };
1847 #endif // DOCUMENTATION
1848 
1849 
1851 // SgAsmPESectionTable -- MACHINE GENERATED; DO NOT MODIFY --
1853 
1854 DECLARE_LEAF_CLASS(AsmPESectionTable);
1855 IS_SERIALIZABLE(AsmPESectionTable);
1856 
1857 #ifdef DOCUMENTATION
1858 
1860 #endif // DOCUMENTATION
1861 
1862  DECLARE_OTHERS(AsmPESectionTable);
1863 #if defined(SgAsmPESectionTable_OTHERS) || defined(DOCUMENTATION)
1864 
1865  //----------------------- Boost serialization for SgAsmPESectionTable -----------------------
1866 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1867 private:
1868  friend class boost::serialization::access;
1869 
1870  template<class S>
1871  void serialize(S &s, const unsigned /*version*/) {
1872  debugSerializationBegin("SgAsmPESectionTable");
1873  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
1874  debugSerializationEnd("SgAsmPESectionTable");
1875  }
1876 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
1877 public:
1879  virtual SgAsmPESectionTable* parse() override;
1880 
1885  void add_section(SgAsmPESection *section);
1886  virtual bool reallocate() override;
1887  virtual void unparse(std::ostream&) const override;
1888  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
1889 public:
1891  virtual ~SgAsmPESectionTable();
1892 
1893 public:
1896 
1897 protected:
1904  void initializeProperties();
1905 #endif // SgAsmPESectionTable_OTHERS
1906 #ifdef DOCUMENTATION
1907 };
1908 #endif // DOCUMENTATION
1909 
1910 
1912 // SgAsmPESectionTableEntry -- MACHINE GENERATED; DO NOT MODIFY --
1914 
1915 DECLARE_LEAF_CLASS(AsmPESectionTableEntry);
1916 IS_SERIALIZABLE(AsmPESectionTableEntry);
1917 
1918 #ifdef DOCUMENTATION
1919 
1921 #endif // DOCUMENTATION
1922 
1923 #ifndef DOCUMENTATION
1924  AsmPESectionTableEntry.setDataPrototype(
1925  "std::string", "name", "",
1926  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1927 #endif // !DOCUMENTATION
1928 
1929 #ifndef DOCUMENTATION
1930  AsmPESectionTableEntry.setDataPrototype(
1931  "rose_addr_t", "virtual_size", "= 0",
1932  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1933 #endif // !DOCUMENTATION
1934 
1935 #ifndef DOCUMENTATION
1936  AsmPESectionTableEntry.setDataPrototype(
1937  "rose_addr_t", "rva", "= 0",
1938  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1939 #endif // !DOCUMENTATION
1940 
1941 #ifndef DOCUMENTATION
1942  AsmPESectionTableEntry.setDataPrototype(
1943  "rose_addr_t", "physical_size", "= 0",
1944  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1945 #endif // !DOCUMENTATION
1946 
1947 #ifndef DOCUMENTATION
1948  AsmPESectionTableEntry.setDataPrototype(
1949  "rose_addr_t", "physical_offset", "= 0",
1950  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1951 #endif // !DOCUMENTATION
1952 
1953 #ifndef DOCUMENTATION
1954  AsmPESectionTableEntry.setDataPrototype(
1955  "unsigned", "coff_line_nums", "= 0",
1956  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1957 #endif // !DOCUMENTATION
1958 
1959 #ifndef DOCUMENTATION
1960  AsmPESectionTableEntry.setDataPrototype(
1961  "unsigned", "n_relocs", "= 0",
1962  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1963 #endif // !DOCUMENTATION
1964 
1965 #ifndef DOCUMENTATION
1966  AsmPESectionTableEntry.setDataPrototype(
1967  "unsigned", "n_coff_line_nums", "= 0",
1968  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1969 #endif // !DOCUMENTATION
1970 
1971 #ifndef DOCUMENTATION
1972  AsmPESectionTableEntry.setDataPrototype(
1973  "unsigned", "flags", "= 0",
1974  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
1975 #endif // !DOCUMENTATION
1976 
1977  DECLARE_OTHERS(AsmPESectionTableEntry);
1978 #if defined(SgAsmPESectionTableEntry_OTHERS) || defined(DOCUMENTATION)
1979 
1980  //----------------------- Boost serialization for SgAsmPESectionTableEntry -----------------------
1981 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1982 private:
1983  friend class boost::serialization::access;
1984 
1985  template<class S>
1986  void serialize(S &s, const unsigned /*version*/) {
1987  debugSerializationBegin("SgAsmPESectionTableEntry");
1988  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
1989  s & BOOST_SERIALIZATION_NVP(p_name);
1990  s & BOOST_SERIALIZATION_NVP(p_virtual_size);
1991  s & BOOST_SERIALIZATION_NVP(p_rva);
1992  s & BOOST_SERIALIZATION_NVP(p_physical_size);
1993  s & BOOST_SERIALIZATION_NVP(p_physical_offset);
1994  s & BOOST_SERIALIZATION_NVP(p_coff_line_nums);
1995  s & BOOST_SERIALIZATION_NVP(p_n_relocs);
1996  s & BOOST_SERIALIZATION_NVP(p_n_coff_line_nums);
1997  s & BOOST_SERIALIZATION_NVP(p_flags);
1998  debugSerializationEnd("SgAsmPESectionTableEntry");
1999  }
2000 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2001  // Local types
2004 public:
2005 #ifdef _MSC_VER
2006 # pragma pack (1)
2007 #endif
2008  /* File format of a section table entry. All fields are little endian. Sections are ordered by RVA. */
2010  char name[8]; /* NUL-padded */
2011  uint32_t virtual_size; /* virtual memory size, >= physical_size and difference is zero filled */
2012  uint32_t rva; /* relative virt addr wrt Image Base; multiple of section_align; dense space */
2013  uint32_t physical_size; /* bytes of initialized data on disk; multiple of file_align & <= virtual_size*/
2014  uint32_t physical_offset; /* location of initialized data on disk; multiple of file_align */
2015  uint32_t coff_line_nums; /* file offset of COFF line number info or zero */
2016  uint32_t n_relocs; /* number of relocation entries; should be zero for executables */
2017  uint32_t n_coff_line_nums; /* number of COFF line number entries */
2018  uint32_t flags; /* PESectionFlags bits: code, data, caching, paging, shared, permissions, etc.*/
2019  }
2020 #if !defined(SWIG) && !defined(_MSC_VER)
2021  __attribute__((packed))
2022 #endif
2023  ;
2024 #ifdef _MSC_VER
2025 # pragma pack ()
2026 #endif
2027 
2028  /* These come from the windows PE documentation and
2029  * http://en.wikibooks.org/wiki/X86_Disassembly/Windows_Executable_Files */
2030  enum PESectionFlags {
2031  OF_CODE = 0x00000020, /* section contains code */
2032  OF_IDATA = 0x00000040, /* initialized data */
2033  OF_UDATA = 0x00000080, /* uninitialized data */
2034  OF_INFO = 0x00000200, /* comments or some other type of info */
2035  OF_REMOVE = 0x00000800, /* section will not become part of image */
2036  OF_COMDAT = 0x00001000, /* section contains comdat */
2037  OF_NO_DEFER_SPEC_EXC= 0x00004000, /* reset speculative exception handling bits in the TLB entires for
2038  * this section */
2039  OF_GPREL = 0x00008000, /* section content can be access relative to GP */
2040  OF_ALIGN_1 = 0x00100000, /* no alignment */
2041  OF_ALIGN_2 = 0x00200000, /* 2-byte alignment */
2042  OF_ALIGN_4 = 0x00300000, /* 4-byte alignment */
2043  OF_ALIGN_8 = 0x00400000, /* 8-byte alignment */
2044  OF_ALIGN_16 = 0x00500000, /* 16-byte alignment (default if not other alignment specified) */
2045  OF_ALIGN_32 = 0x00600000, /* 32-byte alignment */
2046  OF_ALIGN_64 = 0x00700000, /* 64-byte alignment */
2047  OF_ALIGN_128 = 0x00800000, /* 128-byte alignment */
2048  OF_ALIGN_256 = 0x00900000, /* 256-byte alignment */
2049  OF_ALIGN_512 = 0x00a00000, /* 512-byte alignment */
2050  OF_ALIGN_1k = 0x00b00000, /* 1024-byte alignment */
2051  OF_ALIGN_2k = 0x00c00000, /* 2048-byte alignment */
2052  OF_ALIGN_4k = 0x00d00000, /* 4096-byte alignment */
2053  OF_ALIGN_8k = 0x00e00000, /* 8192-byte alignment */
2054  OF_ALIGN_MASK = 0x00f00000, /* mask for alignment value */
2055  OF_NRELOC_OVFL = 0x01000000, /* section contains extended relocations */
2056  OF_DISCARDABLE = 0x02000000, /* can be discarded */
2057  OF_NO_CACHE = 0x04000000, /* section must not be cached */
2058  OF_NO_PAGING = 0x08000000, /* section is not pageable */
2059  OF_SHARED = 0x10000000, /* section is shared */
2060  OF_EXECUTABLE = 0x20000000, /* execute permission */
2061  OF_READABLE = 0x40000000, /* read permission */
2062  OF_WRITABLE = 0x80000000 /* write permission */
2063  };
2064 
2066  // Properties
2068 public:
2074  std::string const& get_name() const;
2075  void set_name(std::string const&);
2078 public:
2084  rose_addr_t const& get_virtual_size() const;
2085  void set_virtual_size(rose_addr_t const&);
2088 public:
2094  rose_addr_t const& get_rva() const;
2095  void set_rva(rose_addr_t const&);
2098 public:
2104  rose_addr_t const& get_physical_size() const;
2105  void set_physical_size(rose_addr_t const&);
2108 public:
2114  rose_addr_t const& get_physical_offset() const;
2115  void set_physical_offset(rose_addr_t const&);
2118 public:
2124  unsigned const& get_coff_line_nums() const;
2125  void set_coff_line_nums(unsigned const&);
2128 public:
2134  unsigned const& get_n_relocs() const;
2135  void set_n_relocs(unsigned const&);
2138 public:
2144  unsigned const& get_n_coff_line_nums() const;
2145  void set_n_coff_line_nums(unsigned const&);
2148 public:
2154  unsigned const& get_flags() const;
2155  void set_flags(unsigned const&);
2157  // Functions
2160 public:
2162 
2164  void update_from_section(SgAsmPESection *section);
2166  virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
2167 public:
2169  virtual ~SgAsmPESectionTableEntry();
2170 
2171 public:
2174 
2175 protected:
2182  void initializeProperties();
2183 #endif // SgAsmPESectionTableEntry_OTHERS
2184 #ifdef DOCUMENTATION
2185 };
2186 #endif // DOCUMENTATION
2187 
2188 
2190 // SgAsmPERVASizePairList -- MACHINE GENERATED; DO NOT MODIFY --
2192 
2193 DECLARE_LEAF_CLASS(AsmPERVASizePairList);
2194 IS_SERIALIZABLE(AsmPERVASizePairList);
2195 
2196 #ifdef DOCUMENTATION
2197 
2202 #endif // DOCUMENTATION
2203 
2204 #ifndef DOCUMENTATION
2205  AsmPERVASizePairList.setDataPrototype(
2206  "SgAsmPERVASizePairPtrList", "pairs", "",
2207  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
2208 #endif // !DOCUMENTATION
2209 
2210  DECLARE_OTHERS(AsmPERVASizePairList);
2211 #if defined(SgAsmPERVASizePairList_OTHERS) || defined(DOCUMENTATION)
2212 
2213  //----------------------- Boost serialization for SgAsmPERVASizePairList -----------------------
2214 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
2215 private:
2216  friend class boost::serialization::access;
2217 
2218  template<class S>
2219  void serialize(S &s, const unsigned /*version*/) {
2220  debugSerializationBegin("SgAsmPERVASizePairList");
2221  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
2222  s & BOOST_SERIALIZATION_NVP(p_pairs);
2223  debugSerializationEnd("SgAsmPERVASizePairList");
2224  }
2225 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2226 
2227 public:
2231  SgAsmPERVASizePairPtrList const& get_pairs() const;
2232  SgAsmPERVASizePairPtrList& get_pairs();
2233  void set_pairs(SgAsmPERVASizePairPtrList const&);
2235 public:
2236  explicit SgAsmPERVASizePairList(SgAsmPEFileHeader *parent);
2237 public:
2239  virtual ~SgAsmPERVASizePairList();
2240 
2241 public:
2244 
2245 protected:
2252  void initializeProperties();
2253 #endif // SgAsmPERVASizePairList_OTHERS
2254 #ifdef DOCUMENTATION
2255 };
2256 #endif // DOCUMENTATION
2257 
2258 
2260 // SgAsmPERVASizePair -- MACHINE GENERATED; DO NOT MODIFY --
2262 
2263 DECLARE_LEAF_CLASS(AsmPERVASizePair);
2264 IS_SERIALIZABLE(AsmPERVASizePair);
2265 
2266 #ifdef DOCUMENTATION
2267 
2269 #endif // DOCUMENTATION
2270 
2271 #ifndef DOCUMENTATION
2272  AsmPERVASizePair.setDataPrototype(
2273  "rose_rva_t", "e_rva", "= 0",
2274  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2275 #endif // !DOCUMENTATION
2276 
2277 #ifndef DOCUMENTATION
2278  AsmPERVASizePair.setDataPrototype(
2279  "rose_addr_t", "e_size", "= 0",
2280  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2281 #endif // !DOCUMENTATION
2282 
2283 #ifndef DOCUMENTATION
2284  AsmPERVASizePair.setDataPrototype(
2285  "SgAsmGenericSection*", "section", "= nullptr",
2286  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2287 #endif // !DOCUMENTATION
2288 
2289  DECLARE_OTHERS(AsmPERVASizePair);
2290 #if defined(SgAsmPERVASizePair_OTHERS) || defined(DOCUMENTATION)
2291 
2292  //----------------------- Boost serialization for SgAsmPERVASizePair -----------------------
2293 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
2294 private:
2295  friend class boost::serialization::access;
2296 
2297  template<class S>
2298  void serialize(S &s, const unsigned /*version*/) {
2299  debugSerializationBegin("SgAsmPERVASizePair");
2300  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
2301  s & BOOST_SERIALIZATION_NVP(p_e_rva);
2302  s & BOOST_SERIALIZATION_NVP(p_e_size);
2303  s & BOOST_SERIALIZATION_NVP(p_section);
2304  debugSerializationEnd("SgAsmPERVASizePair");
2305  }
2306 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2307  // Local types
2310 public:
2311 #ifdef _MSC_VER
2312 # pragma pack (1)
2313 #endif
2314 
2318  uint32_t e_rva;
2319  uint32_t e_size;
2320  }
2321 #if !defined(SWIG) && !defined(_MSC_VER)
2322  __attribute__((packed))
2323 #endif
2324  ;
2325 #ifdef _MSC_VER
2326 # pragma pack ()
2327 #endif
2328 
2330  // Properties
2332 public:
2338  rose_rva_t const& get_e_rva() const;
2339  rose_rva_t& get_e_rva();
2340  void set_e_rva(rose_rva_t const&);
2343 public:
2349  rose_addr_t const& get_e_size() const;
2350  void set_e_size(rose_addr_t const&);
2353 public:
2360  // Functions
2363 public:
2365  SgAsmPERVASizePair(SgAsmPERVASizePairList *parent, rose_addr_t rva, rose_addr_t size);
2366 
2371  void set_section(SgAsmGenericSection *section);
2372 
2377 
2378  void *encode(SgAsmPERVASizePair::RVASizePair_disk *disk) const;
2379 public:
2381  virtual ~SgAsmPERVASizePair();
2382 
2383 public:
2386 
2387 protected:
2394  void initializeProperties();
2395 #endif // SgAsmPERVASizePair_OTHERS
2396 #ifdef DOCUMENTATION
2397 };
2398 #endif // DOCUMENTATION
2399 
2400 
2402 // SgAsmPEImportSection -- MACHINE GENERATED; DO NOT MODIFY --
2404 
2405 DECLARE_LEAF_CLASS(AsmPEImportSection);
2406 IS_SERIALIZABLE(AsmPEImportSection);
2407 
2408 #ifdef DOCUMENTATION
2409 
2552 #endif // DOCUMENTATION
2553 
2554 #ifndef DOCUMENTATION
2555  AsmPEImportSection.setDataPrototype(
2556  "SgAsmPEImportDirectoryList*", "import_directories", "= createAndParent<SgAsmPEImportDirectoryList>(this)",
2557  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
2558 #endif // !DOCUMENTATION
2559 
2560  DECLARE_OTHERS(AsmPEImportSection);
2561 #if defined(SgAsmPEImportSection_OTHERS) || defined(DOCUMENTATION)
2562 
2563  //----------------------- Boost serialization for SgAsmPEImportSection -----------------------
2564 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
2565 private:
2566  friend class boost::serialization::access;
2567 
2568  template<class S>
2569  void serialize(S &s, const unsigned /*version*/) {
2570  debugSerializationBegin("SgAsmPEImportSection");
2571  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmPESection);
2572  s & BOOST_SERIALIZATION_NVP(p_import_directories);
2573  debugSerializationEnd("SgAsmPEImportSection");
2574  }
2575 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2576 
2577 public:
2586 public:
2588  virtual SgAsmPEImportSection *parse() override;
2589  virtual bool reallocate() override;
2590  virtual void unparse(std::ostream&) const override;
2591  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
2592 
2595 
2598  static bool show_import_mesg();
2599  static void import_mesg_reset() { mesg_nprinted=0; }
2600 
2608  size_t reallocate_iats(rose_rva_t start_at);
2609 
2610 private:
2611  static size_t mesg_nprinted; //counter for import_mesg()
2612 public:
2614  virtual ~SgAsmPEImportSection();
2615 
2616 public:
2619 
2620 protected:
2627  void initializeProperties();
2628 #endif // SgAsmPEImportSection_OTHERS
2629 #ifdef DOCUMENTATION
2630 };
2631 #endif // DOCUMENTATION
2632 
2633 
2635 // SgAsmPEImportItemList -- MACHINE GENERATED; DO NOT MODIFY --
2637 
2638 DECLARE_LEAF_CLASS(AsmPEImportItemList);
2639 IS_SERIALIZABLE(AsmPEImportItemList);
2640 
2641 #ifdef DOCUMENTATION
2642 
2647 #endif // DOCUMENTATION
2648 
2649 #ifndef DOCUMENTATION
2650  AsmPEImportItemList.setDataPrototype(
2651  "SgAsmPEImportItemPtrList", "vector", "",
2652  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
2653 #endif // !DOCUMENTATION
2654 
2655  DECLARE_OTHERS(AsmPEImportItemList);
2656 #if defined(SgAsmPEImportItemList_OTHERS) || defined(DOCUMENTATION)
2657 
2658  //----------------------- Boost serialization for SgAsmPEImportItemList -----------------------
2659 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
2660 private:
2661  friend class boost::serialization::access;
2662 
2663  template<class S>
2664  void serialize(S &s, const unsigned /*version*/) {
2665  debugSerializationBegin("SgAsmPEImportItemList");
2666  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
2667  s & BOOST_SERIALIZATION_NVP(p_vector);
2668  debugSerializationEnd("SgAsmPEImportItemList");
2669  }
2670 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2671 
2672 public:
2676  SgAsmPEImportItemPtrList const& get_vector() const;
2677  SgAsmPEImportItemPtrList& get_vector();
2678  void set_vector(SgAsmPEImportItemPtrList const&);
2681 public:
2683  virtual ~SgAsmPEImportItemList();
2684 
2685 public:
2688 
2689 protected:
2696  void initializeProperties();
2697 #endif // SgAsmPEImportItemList_OTHERS
2698 #ifdef DOCUMENTATION
2699 };
2700 #endif // DOCUMENTATION
2701 
2702 
2704 // SgAsmPEImportItem -- MACHINE GENERATED; DO NOT MODIFY --
2706 
2707 DECLARE_LEAF_CLASS(AsmPEImportItem);
2708 IS_SERIALIZABLE(AsmPEImportItem);
2709 
2710 #ifdef DOCUMENTATION
2711 
2719 #endif // DOCUMENTATION
2720 
2721 #ifndef DOCUMENTATION
2722  AsmPEImportItem.setDataPrototype(
2723  "bool", "by_ordinal", "= true",
2724  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2725 #endif // !DOCUMENTATION
2726 
2727 #ifndef DOCUMENTATION
2728  AsmPEImportItem.setDataPrototype(
2729  "unsigned", "ordinal", "= 0",
2730  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2731 #endif // !DOCUMENTATION
2732 
2733 #ifndef DOCUMENTATION
2734  AsmPEImportItem.setDataPrototype(
2735  "unsigned", "hint", "= 0",
2736  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2737 #endif // !DOCUMENTATION
2738 
2739 #ifndef DOCUMENTATION
2740  AsmPEImportItem.setDataPrototype(
2741  "SgAsmGenericString*", "name", "= createAndParent<SgAsmBasicString>(this)",
2742  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
2743 #endif // !DOCUMENTATION
2744 
2745 #ifndef DOCUMENTATION
2746  AsmPEImportItem.setDataPrototype(
2747  "rose_rva_t", "hintname_rva", "= 0",
2748  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2749 #endif // !DOCUMENTATION
2750 
2751 #ifndef DOCUMENTATION
2752  AsmPEImportItem.setDataPrototype(
2753  "size_t", "hintname_nalloc", "= 0",
2754  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2755 #endif // !DOCUMENTATION
2756 
2757 #ifndef DOCUMENTATION
2758  AsmPEImportItem.setDataPrototype(
2759  "rose_rva_t", "bound_rva", "= 0",
2760  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2761 #endif // !DOCUMENTATION
2762 
2763 #ifndef DOCUMENTATION
2764  AsmPEImportItem.setDataPrototype(
2765  "bool", "iat_written", "= false",
2766  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
2767 #endif // !DOCUMENTATION
2768 
2769  DECLARE_OTHERS(AsmPEImportItem);
2770 #if defined(SgAsmPEImportItem_OTHERS) || defined(DOCUMENTATION)
2771 
2772  //----------------------- Boost serialization for SgAsmPEImportItem -----------------------
2773 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
2774 private:
2775  friend class boost::serialization::access;
2776 
2777  template<class S>
2778  void serialize(S &s, const unsigned /*version*/) {
2779  debugSerializationBegin("SgAsmPEImportItem");
2780  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
2781  s & BOOST_SERIALIZATION_NVP(p_by_ordinal);
2782  s & BOOST_SERIALIZATION_NVP(p_ordinal);
2783  s & BOOST_SERIALIZATION_NVP(p_hint);
2784  s & BOOST_SERIALIZATION_NVP(p_name);
2785  s & BOOST_SERIALIZATION_NVP(p_hintname_rva);
2786  s & BOOST_SERIALIZATION_NVP(p_hintname_nalloc);
2787  s & BOOST_SERIALIZATION_NVP(p_bound_rva);
2788  s & BOOST_SERIALIZATION_NVP(p_iat_written);
2789  debugSerializationEnd("SgAsmPEImportItem");
2790  }
2791 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2792 
2793 public:
2799  bool const& get_by_ordinal() const;
2800  void set_by_ordinal(bool const&);
2803 public:
2809  unsigned const& get_ordinal() const;
2810  void set_ordinal(unsigned const&);
2813 public:
2819  unsigned const& get_hint() const;
2820  void set_hint(unsigned const&);
2823 public:
2829  SgAsmGenericString* const& get_name() const;
2830  void set_name(SgAsmGenericString* const&);
2833 public:
2839  rose_rva_t const& get_hintname_rva() const;
2841  void set_hintname_rva(rose_rva_t const&);
2844 public:
2850  size_t const& get_hintname_nalloc() const;
2851  void set_hintname_nalloc(size_t const&);
2854 public:
2860  rose_rva_t const& get_bound_rva() const;
2862  void set_bound_rva(rose_rva_t const&);
2865 public:
2871  bool const& get_iat_written() const;
2872  void set_iat_written(bool const&);
2874 public:
2875  explicit SgAsmPEImportItem(SgAsmPEImportItemList *parent);
2877  SgAsmPEImportItem(SgAsmPEImportDirectory*, const std::string &name, unsigned hint=0);
2878  SgAsmPEImportItem(SgAsmPEImportDirectory*, const unsigned ordinal);
2879 
2880  virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
2881 
2887  size_t hintname_required_size() const;
2888 
2893  rose_addr_t get_iat_entry_va() const;
2894 
2895 private:
2896  void initFromParent(SgAsmPEImportItemList *parent);
2897 public:
2899  virtual ~SgAsmPEImportItem();
2900 
2901 public:
2904 
2905 protected:
2912  void initializeProperties();
2913 #endif // SgAsmPEImportItem_OTHERS
2914 #ifdef DOCUMENTATION
2915 };
2916 #endif // DOCUMENTATION
2917 
2918 
2920 // SgAsmPEImportDirectoryList -- MACHINE GENERATED; DO NOT MODIFY --
2922 
2923 DECLARE_LEAF_CLASS(AsmPEImportDirectoryList);
2924 IS_SERIALIZABLE(AsmPEImportDirectoryList);
2925 
2926 #ifdef DOCUMENTATION
2927 
2932 #endif // DOCUMENTATION
2933 
2934 #ifndef DOCUMENTATION
2935  AsmPEImportDirectoryList.setDataPrototype(
2936  "SgAsmPEImportDirectoryPtrList", "vector", "",
2937  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
2938 #endif // !DOCUMENTATION
2939 
2940  DECLARE_OTHERS(AsmPEImportDirectoryList);
2941 #if defined(SgAsmPEImportDirectoryList_OTHERS) || defined(DOCUMENTATION)
2942 
2943  //----------------------- Boost serialization for SgAsmPEImportDirectoryList -----------------------
2944 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
2945 private:
2946  friend class boost::serialization::access;
2947 
2948  template<class S>
2949  void serialize(S &s, const unsigned /*version*/) {
2950  debugSerializationBegin("SgAsmPEImportDirectoryList");
2951  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
2952  s & BOOST_SERIALIZATION_NVP(p_vector);
2953  debugSerializationEnd("SgAsmPEImportDirectoryList");
2954  }
2955 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
2956 
2957 public:
2963  SgAsmPEImportDirectoryPtrList const& get_vector() const;
2964  SgAsmPEImportDirectoryPtrList& get_vector();
2965  void set_vector(SgAsmPEImportDirectoryPtrList const&);
2968 public:
2970  virtual ~SgAsmPEImportDirectoryList();
2971 
2972 public:
2975 
2976 protected:
2983  void initializeProperties();
2984 #endif // SgAsmPEImportDirectoryList_OTHERS
2985 #ifdef DOCUMENTATION
2986 };
2987 #endif // DOCUMENTATION
2988 
2989 
2991 // SgAsmPEImportDirectory -- MACHINE GENERATED; DO NOT MODIFY --
2993 
2994 DECLARE_LEAF_CLASS(AsmPEImportDirectory);
2995 IS_SERIALIZABLE(AsmPEImportDirectory);
2996 
2997 #ifdef DOCUMENTATION
2998 
3003 #endif // DOCUMENTATION
3004 
3005 #ifndef DOCUMENTATION
3006  AsmPEImportDirectory.setDataPrototype(
3007  "SgAsmGenericString*", "dll_name", "= 0",
3008  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
3009 #endif // !DOCUMENTATION
3010 
3011 #ifndef DOCUMENTATION
3012  AsmPEImportDirectory.setDataPrototype(
3013  "rose_rva_t", "dll_name_rva", "= 0",
3014  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3015 #endif // !DOCUMENTATION
3016 
3017 #ifndef DOCUMENTATION
3018  AsmPEImportDirectory.setDataPrototype(
3019  "size_t", "dll_name_nalloc", "= 0",
3020  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3021 #endif // !DOCUMENTATION
3022 
3023 #ifndef DOCUMENTATION
3024  AsmPEImportDirectory.setDataPrototype(
3025  "time_t", "time", "= 0",
3026  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3027 #endif // !DOCUMENTATION
3028 
3029 #ifndef DOCUMENTATION
3030  AsmPEImportDirectory.setDataPrototype(
3031  "unsigned", "forwarder_chain", "= 0",
3032  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3033 #endif // !DOCUMENTATION
3034 
3035 #ifndef DOCUMENTATION
3036  AsmPEImportDirectory.setDataPrototype(
3037  "rose_rva_t", "ilt_rva", "= 0",
3038  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3039 #endif // !DOCUMENTATION
3040 
3041 #ifndef DOCUMENTATION
3042  AsmPEImportDirectory.setDataPrototype(
3043  "size_t", "ilt_nalloc", "= 0",
3044  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3045 #endif // !DOCUMENTATION
3046 
3047 #ifndef DOCUMENTATION
3048  AsmPEImportDirectory.setDataPrototype(
3049  "rose_rva_t", "iat_rva", "= 0",
3050  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3051 #endif // !DOCUMENTATION
3052 
3053 #ifndef DOCUMENTATION
3054  AsmPEImportDirectory.setDataPrototype(
3055  "size_t", "iat_nalloc", "= 0",
3056  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3057 #endif // !DOCUMENTATION
3058 
3059 #ifndef DOCUMENTATION
3060  AsmPEImportDirectory.setDataPrototype(
3061  "SgAsmPEImportItemList*", "imports", "= createAndParent<SgAsmPEImportItemList>(this)",
3062  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
3063 #endif // !DOCUMENTATION
3064 
3065  DECLARE_OTHERS(AsmPEImportDirectory);
3066 #if defined(SgAsmPEImportDirectory_OTHERS) || defined(DOCUMENTATION)
3067 
3068  //----------------------- Boost serialization for SgAsmPEImportDirectory -----------------------
3069 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
3070 private:
3071  friend class boost::serialization::access;
3072 
3073  template<class S>
3074  void serialize(S &s, const unsigned /*version*/) {
3075  debugSerializationBegin("SgAsmPEImportDirectory");
3076  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
3077  s & BOOST_SERIALIZATION_NVP(p_dll_name);
3078  s & BOOST_SERIALIZATION_NVP(p_dll_name_rva);
3079  s & BOOST_SERIALIZATION_NVP(p_dll_name_nalloc);
3080  s & BOOST_SERIALIZATION_NVP(p_time);
3081  s & BOOST_SERIALIZATION_NVP(p_forwarder_chain);
3082  s & BOOST_SERIALIZATION_NVP(p_ilt_rva);
3083  s & BOOST_SERIALIZATION_NVP(p_ilt_nalloc);
3084  s & BOOST_SERIALIZATION_NVP(p_iat_rva);
3085  s & BOOST_SERIALIZATION_NVP(p_iat_nalloc);
3086  s & BOOST_SERIALIZATION_NVP(p_imports);
3087  debugSerializationEnd("SgAsmPEImportDirectory");
3088  }
3089 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
3090  // Local types
3093 public:
3094 #ifdef _MSC_VER
3095 # pragma pack (1)
3096 #endif
3098  uint32_t ilt_rva; /* 0x00 Import Lookup Table RVA */
3099  uint32_t time; /* 0x04 Zero until the image is bound, then time stamp of the DLL */
3100  uint32_t forwarder_chain; /* 0x08 Index of the first forwarder chain */
3101  uint32_t dll_name_rva; /* 0x0c address of NUL-terminated DLL name */
3102  uint32_t iat_rva; /* 0x10 Import Address Table (Thunk Table) RVA */
3103  } /* 0x14 */
3104 #if !defined(SWIG) && !defined(_MSC_VER)
3105  __attribute__((packed))
3106 #endif
3107  ;
3108 #ifdef _MSC_VER
3109 # pragma pack ()
3110 #endif
3111 
3113  // Properties
3115 public:
3121  SgAsmGenericString* const& get_dll_name() const;
3122  void set_dll_name(SgAsmGenericString* const&);
3125 public:
3131  rose_rva_t const& get_dll_name_rva() const;
3133  void set_dll_name_rva(rose_rva_t const&);
3136 public:
3142  size_t const& get_dll_name_nalloc() const;
3143  void set_dll_name_nalloc(size_t const&);
3146 public:
3152  time_t const& get_time() const;
3153  void set_time(time_t const&);
3156 public:
3162  unsigned const& get_forwarder_chain() const;
3163  void set_forwarder_chain(unsigned const&);
3166 public:
3172  rose_rva_t const& get_ilt_rva() const;
3174  void set_ilt_rva(rose_rva_t const&);
3177 public:
3183  size_t const& get_ilt_nalloc() const;
3184  void set_ilt_nalloc(size_t const&);
3187 public:
3193  rose_rva_t const& get_iat_rva() const;
3195  void set_iat_rva(rose_rva_t const&);
3198 public:
3204  size_t const& get_iat_nalloc() const;
3205  void set_iat_nalloc(size_t const&);
3208 public:
3214  SgAsmPEImportItemList* const& get_imports() const;
3215  void set_imports(SgAsmPEImportItemList* const&);
3217  // Functions
3220 public:
3221  explicit SgAsmPEImportDirectory(SgAsmPEImportSection *isec, const std::string &dll_name="");
3222 
3228  SgAsmPEImportDirectory *parse(rose_addr_t va, bool isLastEntry);
3229 
3237  size_t reallocate(rose_rva_t starting_rva);
3238 
3241  virtual void unparse(std::ostream&, const SgAsmPEImportSection*, size_t idx) const;
3242  virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
3243 
3249  size_t iat_required_size() const;
3250 
3255  int find_import_item(const SgAsmPEImportItem *item, int hint=0) const;
3256 
3268  size_t hintname_table_extent(AddressIntervalSet &extent/*in,out*/) const;
3269 
3270 private:
3271  void parse_ilt_iat(const rose_rva_t &table_start, bool assume_bound);
3272  void unparse_ilt_iat(std::ostream&,const rose_rva_t &table_start, bool assume_bound, size_t nalloc) const;
3273 public:
3275  virtual ~SgAsmPEImportDirectory();
3276 
3277 public:
3280 
3281 protected:
3288  void initializeProperties();
3289 #endif // SgAsmPEImportDirectory_OTHERS
3290 #ifdef DOCUMENTATION
3291 };
3292 #endif // DOCUMENTATION
3293 
3294 
3296 // SgAsmPEFileHeader -- MACHINE GENERATED; DO NOT MODIFY --
3298 
3299 DECLARE_LEAF_CLASS(AsmPEFileHeader);
3300 IS_SERIALIZABLE(AsmPEFileHeader);
3301 
3302 #ifdef DOCUMENTATION
3303 
3307 #endif // DOCUMENTATION
3308 
3309 #ifndef DOCUMENTATION
3310  AsmPEFileHeader.setDataPrototype(
3311  "unsigned", "e_cpu_type", "= 0",
3312  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3313 #endif // !DOCUMENTATION
3314 
3315 #ifndef DOCUMENTATION
3316  AsmPEFileHeader.setDataPrototype(
3317  "unsigned", "e_nsections", "= 0",
3318  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3319 #endif // !DOCUMENTATION
3320 
3321 #ifndef DOCUMENTATION
3322  AsmPEFileHeader.setDataPrototype(
3323  "unsigned", "e_time", "= 0",
3324  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3325 #endif // !DOCUMENTATION
3326 
3327 #ifndef DOCUMENTATION
3328  AsmPEFileHeader.setDataPrototype(
3329  "rose_addr_t", "e_coff_symtab", "= 0",
3330  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3331 #endif // !DOCUMENTATION
3332 
3333 #ifndef DOCUMENTATION
3334  AsmPEFileHeader.setDataPrototype(
3335  "rose_addr_t", "e_nt_hdr_size", "= 0",
3336  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3337 #endif // !DOCUMENTATION
3338 
3339 #ifndef DOCUMENTATION
3340  AsmPEFileHeader.setDataPrototype(
3341  "unsigned", "e_coff_nsyms", "= 0",
3342  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3343 #endif // !DOCUMENTATION
3344 
3345 #ifndef DOCUMENTATION
3346  AsmPEFileHeader.setDataPrototype(
3347  "unsigned", "e_flags", "= 0",
3348  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3349 #endif // !DOCUMENTATION
3350 
3351 #ifndef DOCUMENTATION
3352  AsmPEFileHeader.setDataPrototype(
3353  "unsigned", "e_opt_magic", "= 0",
3354  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3355 #endif // !DOCUMENTATION
3356 
3357 #ifndef DOCUMENTATION
3358  AsmPEFileHeader.setDataPrototype(
3359  "unsigned", "e_lmajor", "= 0",
3360  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3361 #endif // !DOCUMENTATION
3362 
3363 #ifndef DOCUMENTATION
3364  AsmPEFileHeader.setDataPrototype(
3365  "unsigned", "e_lminor", "= 0",
3366  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3367 #endif // !DOCUMENTATION
3368 
3369 #ifndef DOCUMENTATION
3370  AsmPEFileHeader.setDataPrototype(
3371  "unsigned", "e_code_size", "= 0",
3372  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3373 #endif // !DOCUMENTATION
3374 
3375 #ifndef DOCUMENTATION
3376  AsmPEFileHeader.setDataPrototype(
3377  "unsigned", "e_data_size", "= 0",
3378  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3379 #endif // !DOCUMENTATION
3380 
3381 #ifndef DOCUMENTATION
3382  AsmPEFileHeader.setDataPrototype(
3383  "unsigned", "e_bss_size", "= 0",
3384  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3385 #endif // !DOCUMENTATION
3386 
3387 #ifndef DOCUMENTATION
3388  AsmPEFileHeader.setDataPrototype(
3389  "rose_rva_t", "e_code_rva", "= 0",
3390  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3391 #endif // !DOCUMENTATION
3392 
3393 #ifndef DOCUMENTATION
3394  AsmPEFileHeader.setDataPrototype(
3395  "rose_rva_t", "e_data_rva", "= 0",
3396  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3397 #endif // !DOCUMENTATION
3398 
3399 #ifndef DOCUMENTATION
3400  AsmPEFileHeader.setDataPrototype(
3401  "unsigned", "e_section_align", "= 0",
3402  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3403 #endif // !DOCUMENTATION
3404 
3405 #ifndef DOCUMENTATION
3406  AsmPEFileHeader.setDataPrototype(
3407  "unsigned", "e_file_align", "= 0",
3408  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3409 #endif // !DOCUMENTATION
3410 
3411 #ifndef DOCUMENTATION
3412  AsmPEFileHeader.setDataPrototype(
3413  "unsigned", "e_os_major", "= 0",
3414  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3415 #endif // !DOCUMENTATION
3416 
3417 #ifndef DOCUMENTATION
3418  AsmPEFileHeader.setDataPrototype(
3419  "unsigned", "e_os_minor", "= 0",
3420  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3421 #endif // !DOCUMENTATION
3422 
3423 #ifndef DOCUMENTATION
3424  AsmPEFileHeader.setDataPrototype(
3425  "unsigned", "e_user_major", "= 0",
3426  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3427 #endif // !DOCUMENTATION
3428 
3429 #ifndef DOCUMENTATION
3430  AsmPEFileHeader.setDataPrototype(
3431  "unsigned", "e_user_minor", "= 0",
3432  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3433 #endif // !DOCUMENTATION
3434 
3435 #ifndef DOCUMENTATION
3436  AsmPEFileHeader.setDataPrototype(
3437  "unsigned", "e_subsys_major", "= 0",
3438  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3439 #endif // !DOCUMENTATION
3440 
3441 #ifndef DOCUMENTATION
3442  AsmPEFileHeader.setDataPrototype(
3443  "unsigned", "e_subsys_minor", "= 0",
3444  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3445 #endif // !DOCUMENTATION
3446 
3447 #ifndef DOCUMENTATION
3448  AsmPEFileHeader.setDataPrototype(
3449  "unsigned", "e_reserved9", "= 0",
3450  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3451 #endif // !DOCUMENTATION
3452 
3453 #ifndef DOCUMENTATION
3454  AsmPEFileHeader.setDataPrototype(
3455  "unsigned", "e_image_size", "= 0",
3456  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3457 #endif // !DOCUMENTATION
3458 
3459 #ifndef DOCUMENTATION
3460  AsmPEFileHeader.setDataPrototype(
3461  "unsigned", "e_header_size", "= 0",
3462  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3463 #endif // !DOCUMENTATION
3464 
3465 #ifndef DOCUMENTATION
3466  AsmPEFileHeader.setDataPrototype(
3467  "unsigned", "e_file_checksum", "= 0",
3468  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3469 #endif // !DOCUMENTATION
3470 
3471 #ifndef DOCUMENTATION
3472  AsmPEFileHeader.setDataPrototype(
3473  "unsigned", "e_subsystem", "= 0",
3474  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3475 #endif // !DOCUMENTATION
3476 
3477 #ifndef DOCUMENTATION
3478  AsmPEFileHeader.setDataPrototype(
3479  "unsigned", "e_dll_flags", "= 0",
3480  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3481 #endif // !DOCUMENTATION
3482 
3483 #ifndef DOCUMENTATION
3484  AsmPEFileHeader.setDataPrototype(
3485  "unsigned", "e_stack_reserve_size", "= 0",
3486  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3487 #endif // !DOCUMENTATION
3488 
3489 #ifndef DOCUMENTATION
3490  AsmPEFileHeader.setDataPrototype(
3491  "unsigned", "e_stack_commit_size", "= 0",
3492  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3493 #endif // !DOCUMENTATION
3494 
3495 #ifndef DOCUMENTATION
3496  AsmPEFileHeader.setDataPrototype(
3497  "unsigned", "e_heap_reserve_size", "= 0",
3498  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3499 #endif // !DOCUMENTATION
3500 
3501 #ifndef DOCUMENTATION
3502  AsmPEFileHeader.setDataPrototype(
3503  "unsigned", "e_heap_commit_size", "= 0",
3504  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3505 #endif // !DOCUMENTATION
3506 
3507 #ifndef DOCUMENTATION
3508  AsmPEFileHeader.setDataPrototype(
3509  "unsigned", "e_loader_flags", "= 0",
3510  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3511 #endif // !DOCUMENTATION
3512 
3513 #ifndef DOCUMENTATION
3514  AsmPEFileHeader.setDataPrototype(
3515  "unsigned", "e_num_rvasize_pairs", "= 0",
3516  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3517 #endif // !DOCUMENTATION
3518 
3519 #ifndef DOCUMENTATION
3520  AsmPEFileHeader.setDataPrototype(
3521  "SgAsmPERVASizePairList*", "rvasize_pairs", "= nullptr",
3522  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
3523 #endif // !DOCUMENTATION
3524 
3525 #ifndef DOCUMENTATION
3526  AsmPEFileHeader.setDataPrototype(
3527  "SgAsmPESectionTable*", "section_table", "= NULL",
3528  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3529 #endif // !DOCUMENTATION
3530 
3531 #ifndef DOCUMENTATION
3532  AsmPEFileHeader.setDataPrototype(
3533  "SgAsmCoffSymbolTable*", "coff_symtab", "= NULL",
3534  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
3535 #endif // !DOCUMENTATION
3536 
3537  DECLARE_OTHERS(AsmPEFileHeader);
3538 #if defined(SgAsmPEFileHeader_OTHERS) || defined(DOCUMENTATION)
3539 
3540  //----------------------- Boost serialization for SgAsmPEFileHeader -----------------------
3541 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
3542 private:
3543  friend class boost::serialization::access;
3544 
3545  template<class S>
3546  void serialize(S &s, const unsigned /*version*/) {
3547  debugSerializationBegin("SgAsmPEFileHeader");
3548  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
3549  s & BOOST_SERIALIZATION_NVP(p_e_cpu_type);
3550  s & BOOST_SERIALIZATION_NVP(p_e_nsections);
3551  s & BOOST_SERIALIZATION_NVP(p_e_time);
3552  s & BOOST_SERIALIZATION_NVP(p_e_coff_symtab);
3553  s & BOOST_SERIALIZATION_NVP(p_e_nt_hdr_size);
3554  s & BOOST_SERIALIZATION_NVP(p_e_coff_nsyms);
3555  s & BOOST_SERIALIZATION_NVP(p_e_flags);
3556  s & BOOST_SERIALIZATION_NVP(p_e_opt_magic);
3557  s & BOOST_SERIALIZATION_NVP(p_e_lmajor);
3558  s & BOOST_SERIALIZATION_NVP(p_e_lminor);
3559  s & BOOST_SERIALIZATION_NVP(p_e_code_size);
3560  s & BOOST_SERIALIZATION_NVP(p_e_data_size);
3561  s & BOOST_SERIALIZATION_NVP(p_e_bss_size);
3562  s & BOOST_SERIALIZATION_NVP(p_e_code_rva);
3563  s & BOOST_SERIALIZATION_NVP(p_e_data_rva);
3564  s & BOOST_SERIALIZATION_NVP(p_e_section_align);
3565  s & BOOST_SERIALIZATION_NVP(p_e_file_align);
3566  s & BOOST_SERIALIZATION_NVP(p_e_os_major);
3567  s & BOOST_SERIALIZATION_NVP(p_e_os_minor);
3568  s & BOOST_SERIALIZATION_NVP(p_e_user_major);
3569  s & BOOST_SERIALIZATION_NVP(p_e_user_minor);
3570  s & BOOST_SERIALIZATION_NVP(p_e_subsys_major);
3571  s & BOOST_SERIALIZATION_NVP(p_e_subsys_minor);
3572  s & BOOST_SERIALIZATION_NVP(p_e_reserved9);
3573  s & BOOST_SERIALIZATION_NVP(p_e_image_size);
3574  s & BOOST_SERIALIZATION_NVP(p_e_header_size);
3575  s & BOOST_SERIALIZATION_NVP(p_e_file_checksum);
3576  s & BOOST_SERIALIZATION_NVP(p_e_subsystem);
3577  s & BOOST_SERIALIZATION_NVP(p_e_dll_flags);
3578  s & BOOST_SERIALIZATION_NVP(p_e_stack_reserve_size);
3579  s & BOOST_SERIALIZATION_NVP(p_e_stack_commit_size);
3580  s & BOOST_SERIALIZATION_NVP(p_e_heap_reserve_size);
3581  s & BOOST_SERIALIZATION_NVP(p_e_heap_commit_size);
3582  s & BOOST_SERIALIZATION_NVP(p_e_loader_flags);
3583  s & BOOST_SERIALIZATION_NVP(p_e_num_rvasize_pairs);
3584  s & BOOST_SERIALIZATION_NVP(p_rvasize_pairs);
3585  s & BOOST_SERIALIZATION_NVP(p_section_table);
3586  s & BOOST_SERIALIZATION_NVP(p_coff_symtab);
3587  debugSerializationEnd("SgAsmPEFileHeader");
3588  }
3589 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
3590  // Local types
3593 public:
3594 #ifdef _MSC_VER
3595 # pragma pack (1)
3596 #endif
3597  /* File format of a PE File Header. All fields are little endian. */
3599  unsigned char e_magic[4]; /* 0x00 magic number "PE\0\0" */
3600  uint16_t e_cpu_type; /* 0x04 e.g., 0x014c = Intel 386 */
3601  uint16_t e_nsections; /* 0x06 number of sections defined in the Section Table */
3602  uint32_t e_time; /* 0x08 time and date file was created or modified by the linker */
3603  uint32_t e_coff_symtab; /* 0x0c offset to COFF symbol table */
3604  uint32_t e_coff_nsyms; /* 0x10 number of symbols in COFF symbol table */
3605  uint16_t e_nt_hdr_size; /* 0x14 num remaining bytes in the header following the 'flags' field */
3606  uint16_t e_flags; /* 0x16 Bit flags: exe file, program/library image, fixed address, etc. */
3607  } /* 0x18 */
3608 #if !defined(SWIG) && !defined(_MSC_VER)
3609  __attribute__((packed))
3610 #endif
3611  ;
3612 
3614  uint16_t e_opt_magic; /* 0x18 magic number */
3615  uint16_t e_lmajor; /* 0x1a linker version */
3616  uint16_t e_lminor; /* 0x1c */
3617  uint16_t e_code_size; /* 0x1e Size of .text or sum of all code sections */
3618  uint32_t e_data_size; /* 0x20 Sum size of initialized data */
3619  uint32_t e_bss_size; /* 0x24 Sum size of uninitialized data */
3620  uint32_t e_entrypoint_rva; /* 0x28 RVA="relative virtual address"; relative to 'image_base', below */
3621  uint32_t e_code_rva; /* 0x2c Addr relative to image base for code section when memory mapped */
3622  uint32_t e_data_rva; /* 0x30 Address relative to image base for data section */
3623  uint32_t e_image_base; /* 0x34 Virt base of image (first byte of file, DOS header). 64k aligned */
3624  uint32_t e_section_align; /* 0x38 Alignment of sections in memory. Power of two 512<=x<=256M */
3625  uint32_t e_file_align; /* 0x3c Alignment factor (in bytes) for image pages */
3626  uint16_t e_os_major; /* 0x40 OS version number required to run this image */
3627  uint16_t e_os_minor; /* 0x42 */
3628  uint16_t e_user_major; /* 0x44 User-specified for differentiating between image revs */
3629  uint16_t e_user_minor; /* 0x46 */
3630  uint16_t e_subsys_major; /* 0x48 Subsystem version number */
3631  uint16_t e_subsys_minor; /* 0x4a */
3632  uint32_t e_reserved9; /* 0x4c */
3633  uint32_t e_image_size; /* 0x50 Virtual size of the image inc. all headers; section_align */
3634  uint32_t e_header_size; /* 0x54 Total header size (DOS Header + PE Header + Section table */
3635  uint32_t e_file_checksum; /* 0x58 Checksum for entire file; Set to zero by the linker */
3636  uint16_t e_subsystem; /* 0x5c Native, WindowsGUI, WindowsCharacter, OS/2 Character, etc. */
3637  uint16_t e_dll_flags; /* 0x5e Bit flags for library init/terminate per process or thread */
3638  uint32_t e_stack_reserve_size;/*0x60 Virtual mem reserved for stack; non-committed pages are guards */
3639  uint32_t e_stack_commit_size;/* 0x64 Size of valid stack; other pages are guards; <=stack_reserve_size*/
3640  uint32_t e_heap_reserve_size;/* 0x68 Size (bytes) of local heap to reserve */
3641  uint32_t e_heap_commit_size; /* 0x6c Size (bytes) of valid local heap */
3642  uint32_t e_loader_flags; /* 0x70 Reserved, must be zero */
3643  uint32_t e_num_rvasize_pairs;/* 0x74 Num RVASizePair entries that follow this member; part of header */
3644  } /* 0x78 */
3645 #if !defined(SWIG) && !defined(_MSC_VER)
3646  __attribute__((packed))
3647 #endif
3648  ;
3649 
3651  uint16_t e_opt_magic; /* 0x18 */
3652  uint16_t e_lmajor; /* 0x1a */
3653  uint16_t e_lminor; /* 0x1c */
3654  uint16_t e_code_size; /* 0x1e */
3655  uint32_t e_data_size; /* 0x20 */
3656  uint32_t e_bss_size; /* 0x24 */
3657  uint32_t e_entrypoint_rva; /* 0x28 */
3658  uint32_t e_code_rva; /* 0x2c */
3659  // uint32_t e_data_rva; /* Not present in PE32+ */
3660  uint64_t e_image_base; /* 0x30 */
3661  uint32_t e_section_align; /* 0x38 */
3662  uint32_t e_file_align; /* 0x3c */
3663  uint16_t e_os_major; /* 0x40 */
3664  uint16_t e_os_minor; /* 0x42 */
3665  uint16_t e_user_major; /* 0x44 */
3666  uint16_t e_user_minor; /* 0x46 */
3667  uint16_t e_subsys_major; /* 0x48 */
3668  uint16_t e_subsys_minor; /* 0x4a */
3669  uint32_t e_reserved9; /* 0x4c */
3670  uint32_t e_image_size; /* 0x50 */
3671  uint32_t e_header_size; /* 0x54 */
3672  uint32_t e_file_checksum; /* 0x58 */
3673  uint16_t e_subsystem; /* 0x5c */
3674  uint16_t e_dll_flags; /* 0x5e */
3675  uint64_t e_stack_reserve_size;/*0x60 */
3676  uint64_t e_stack_commit_size;/* 0x68 */
3677  uint64_t e_heap_reserve_size;/* 0x70 */
3678  uint64_t e_heap_commit_size; /* 0x78 */
3679  uint32_t e_loader_flags; /* 0x80 */
3680  uint32_t e_num_rvasize_pairs;/* 0x84 */
3681  } /* 0x88 */
3682 #if !defined(SWIG) && !defined(_MSC_VER)
3683  __attribute__((packed))
3684 #endif
3685  ;
3686 #ifdef _MSC_VER
3687 # pragma pack ()
3688 #endif
3689 
3690  /* Bit flags for the PE header 'flags' member */
3691  enum HeaderFlags {
3692  HF_PROGRAM = 0x0000, /* Program image (no non-reserved bits set) */
3693  HF_EXECUTABLE = 0x0002, /* Clear indicates can't load: link errors or incrementally linked */
3694  HF_FIXED = 0x0200, /* Image *must* be loaded at image_base address or error */
3695  HF_LIBRARY = 0x2000, /* Library image */
3696  HF_RESERVED_MASK = 0xddfd /* Reserved bits */
3697  };
3698 
3699  /* Values for the PE header 'subsystem' member */
3700  enum Subsystem {
3701  HF_SPEC_UNKNOWN = 0x0000, /* Specified as 'unknown' in the file */
3702  HF_NATIVE = 0x0001, /* Native */
3703  HF_WINGUI = 0x0002, /* Windows GUI */
3704  HF_WINCHAR = 0x0003, /* Windows character */
3705  HF_OS2CHAR = 0x0005, /* OS/2 character */
3706  HF_POSIX = 0x0007 /* POSIX character */
3707  };
3708 
3709  /* Bit flags for the PE header 'dll_flags' member */
3710  enum DLLFlags {
3711  DLL_PROC_INIT = 0x0001, /* Per-process library initialization */
3712  DLL_PROC_TERM = 0x0002, /* Per-process library termination */
3713  DLL_THRD_INIT = 0x0004, /* Per-thread library initialization */
3714  DLL_THRD_TERM = 0x0008, /* Per-thread library termination */
3715  DLL_RESERVED_MASK = 0xfff0 /* Reserved bits */
3716  };
3717 
3719  enum PairPurpose { // Values are important
3720  PAIR_EXPORTS = 0,
3721  PAIR_IMPORTS = 1,
3722  PAIR_RESOURCES = 2,
3723  PAIR_EXCEPTIONS = 3,
3724  PAIR_CERTIFICATES = 4,
3725  PAIR_BASERELOCS = 5,
3726  PAIR_DEBUG = 6,
3727  PAIR_ARCHITECTURE = 7,
3728  PAIR_GLOBALPTR = 8,
3729  PAIR_TLS = 9, // Thread local storage
3730  PAIR_LOADCONFIG = 10,
3731  PAIR_BOUNDIMPORT = 11,
3732  PAIR_IAT = 12, // Import address table
3733  PAIR_DELAYIMPORT = 13, // Delay import descriptor
3734  PAIR_CLRRUNTIME = 14, // CLR(?) runtime header
3735  PAIR_RESERVED15 = 15 // Reserved (always zero according to specification)
3736  };
3737 
3739  // Properties
3741 public:
3747  unsigned const& get_e_cpu_type() const;
3748  void set_e_cpu_type(unsigned const&);
3751 public:
3757  unsigned const& get_e_nsections() const;
3758  void set_e_nsections(unsigned const&);
3761 public:
3767  unsigned const& get_e_time() const;
3768  void set_e_time(unsigned const&);
3771 public:
3777  rose_addr_t const& get_e_coff_symtab() const;
3778  void set_e_coff_symtab(rose_addr_t const&);
3781 public:
3787  rose_addr_t const& get_e_nt_hdr_size() const;
3788  void set_e_nt_hdr_size(rose_addr_t const&);
3791 public:
3797  unsigned const& get_e_coff_nsyms() const;
3798  void set_e_coff_nsyms(unsigned const&);
3801 public:
3807  unsigned const& get_e_flags() const;
3808  void set_e_flags(unsigned const&);
3811 public:
3817  unsigned const& get_e_opt_magic() const;
3818  void set_e_opt_magic(unsigned const&);
3821 public:
3827  unsigned const& get_e_lmajor() const;
3828  void set_e_lmajor(unsigned const&);
3831 public:
3837  unsigned const& get_e_lminor() const;
3838  void set_e_lminor(unsigned const&);
3841 public:
3847  unsigned const& get_e_code_size() const;
3848  void set_e_code_size(unsigned const&);
3851 public:
3857  unsigned const& get_e_data_size() const;
3858  void set_e_data_size(unsigned const&);
3861 public:
3867  unsigned const& get_e_bss_size() const;
3868  void set_e_bss_size(unsigned const&);
3871 public:
3877  rose_rva_t const& get_e_code_rva() const;
3879  void set_e_code_rva(rose_rva_t const&);
3882 public:
3888  rose_rva_t const& get_e_data_rva() const;
3890  void set_e_data_rva(rose_rva_t const&);
3893 public:
3899  unsigned const& get_e_section_align() const;
3900  void set_e_section_align(unsigned const&);
3903 public:
3909  unsigned const& get_e_file_align() const;
3910  void set_e_file_align(unsigned const&);
3913 public:
3919  unsigned const& get_e_os_major() const;
3920  void set_e_os_major(unsigned const&);
3923 public:
3929  unsigned const& get_e_os_minor() const;
3930  void set_e_os_minor(unsigned const&);
3933 public:
3939  unsigned const& get_e_user_major() const;
3940  void set_e_user_major(unsigned const&);
3943 public:
3949  unsigned const& get_e_user_minor() const;
3950  void set_e_user_minor(unsigned const&);
3953 public:
3959  unsigned const& get_e_subsys_major() const;
3960  void set_e_subsys_major(unsigned const&);
3963 public:
3969  unsigned const& get_e_subsys_minor() const;
3970  void set_e_subsys_minor(unsigned const&);
3973 public:
3979  unsigned const& get_e_reserved9() const;
3980  void set_e_reserved9(unsigned const&);
3983 public:
3989  unsigned const& get_e_image_size() const;
3990  void set_e_image_size(unsigned const&);
3993 public:
3999  unsigned const& get_e_header_size() const;
4000  void set_e_header_size(unsigned const&);
4003 public:
4009  unsigned const& get_e_file_checksum() const;
4010  void set_e_file_checksum(unsigned const&);
4013 public:
4019  unsigned const& get_e_subsystem() const;
4020  void set_e_subsystem(unsigned const&);
4023 public:
4029  unsigned const& get_e_dll_flags() const;
4030  void set_e_dll_flags(unsigned const&);
4033 public:
4039  unsigned const& get_e_stack_reserve_size() const;
4040  void set_e_stack_reserve_size(unsigned const&);
4043 public:
4049  unsigned const& get_e_stack_commit_size() const;
4050  void set_e_stack_commit_size(unsigned const&);
4053 public:
4059  unsigned const& get_e_heap_reserve_size() const;
4060  void set_e_heap_reserve_size(unsigned const&);
4063 public:
4069  unsigned const& get_e_heap_commit_size() const;
4070  void set_e_heap_commit_size(unsigned const&);
4073 public:
4079  unsigned const& get_e_loader_flags() const;
4080  void set_e_loader_flags(unsigned const&);
4083 public:
4089  unsigned const& get_e_num_rvasize_pairs() const;
4090  void set_e_num_rvasize_pairs(unsigned const&);
4093 public:
4099  SgAsmPERVASizePairList* const& get_rvasize_pairs() const;
4103 public:
4109  SgAsmPESectionTable* const& get_section_table() const;
4110  void set_section_table(SgAsmPESectionTable* const&);
4113 public:
4119  SgAsmCoffSymbolTable* const& get_coff_symtab() const;
4120  void set_coff_symtab(SgAsmCoffSymbolTable* const&);
4122  // Functions
4125 public:
4127 
4128  virtual const char *format_name() const override {return "PE";}
4129 
4135  static bool is_PE (SgAsmGenericFile*);
4136 
4141  std::string rvasize_pair_name(PairPurpose, const char **short_name);
4142 
4145 
4147  void update_rvasize_pairs();
4148 
4149  void add_rvasize_pairs();
4150 
4151  virtual SgAsmPEFileHeader *parse() override;
4152  virtual bool reallocate() override;
4153  virtual void unparse(std::ostream&) const override;
4154  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
4155  void create_table_sections();
4156 
4157  /* Loader memory maps */
4158  Rose::BinaryAnalysis::MemoryMap::Ptr get_loader_map() const {return p_loader_map;}
4159  void set_loader_map(const Rose::BinaryAnalysis::MemoryMap::Ptr &map) {p_loader_map=map;}
4160 
4161 private:
4162  void *encode(SgAsmPEFileHeader::PEFileHeader_disk*) const;
4163  void *encode(SgAsmPEFileHeader::PE32OptHeader_disk*) const;
4164  void *encode(SgAsmPEFileHeader::PE64OptHeader_disk*) const;
4166 public:
4168  virtual ~SgAsmPEFileHeader();
4169 
4170 public:
4173 
4174 protected:
4181  void initializeProperties();
4182 #endif // SgAsmPEFileHeader_OTHERS
4183 #ifdef DOCUMENTATION
4184 };
4185 #endif // DOCUMENTATION
4186 
4187 
4189 // SgAsmPEExportSection -- MACHINE GENERATED; DO NOT MODIFY --
4191 
4192 DECLARE_LEAF_CLASS(AsmPEExportSection);
4193 IS_SERIALIZABLE(AsmPEExportSection);
4194 
4195 #ifdef DOCUMENTATION
4196 
4198 #endif // DOCUMENTATION
4199 
4200 #ifndef DOCUMENTATION
4201  AsmPEExportSection.setDataPrototype(
4202  "SgAsmPEExportDirectory*", "export_dir", "= nullptr",
4203  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4204 #endif // !DOCUMENTATION
4205 
4206 #ifndef DOCUMENTATION
4207  AsmPEExportSection.setDataPrototype(
4208  "SgAsmPEExportEntryList*", "exports", "= createAndParent<SgAsmPEExportEntryList>(this)",
4209  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4210 #endif // !DOCUMENTATION
4211 
4212  DECLARE_OTHERS(AsmPEExportSection);
4213 #if defined(SgAsmPEExportSection_OTHERS) || defined(DOCUMENTATION)
4214 
4215  //----------------------- Boost serialization for SgAsmPEExportSection -----------------------
4216 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4217 private:
4218  friend class boost::serialization::access;
4219 
4220  template<class S>
4221  void serialize(S &s, const unsigned /*version*/) {
4222  debugSerializationBegin("SgAsmPEExportSection");
4223  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmPESection);
4224  s & BOOST_SERIALIZATION_NVP(p_export_dir);
4225  s & BOOST_SERIALIZATION_NVP(p_exports);
4226  debugSerializationEnd("SgAsmPEExportSection");
4227  }
4228 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4229 
4230 public:
4236  SgAsmPEExportDirectory* const& get_export_dir() const;
4237  void set_export_dir(SgAsmPEExportDirectory* const&);
4240 public:
4246  SgAsmPEExportEntryList* const& get_exports() const;
4247  void set_exports(SgAsmPEExportEntryList* const&);
4249 public:
4255  typedef uint32_t ExportAddress_disk;
4256 
4260  typedef uint32_t ExportNamePtr_disk;
4261 
4265  typedef uint16_t ExportOrdinal_disk;
4266 
4268  virtual SgAsmPEExportSection *parse() override;
4269  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
4270  void add_entry(SgAsmPEExportEntry*);
4271 public:
4273  virtual ~SgAsmPEExportSection();
4274 
4275 public:
4278 
4279 protected:
4286  void initializeProperties();
4287 #endif // SgAsmPEExportSection_OTHERS
4288 #ifdef DOCUMENTATION
4289 };
4290 #endif // DOCUMENTATION
4291 
4292 
4294 // SgAsmPESection -- MACHINE GENERATED; DO NOT MODIFY --
4296 
4297 #ifndef DOCUMENTATION
4298 AstNodeClass& AsmPESection = nonTerminalConstructor(
4299  "AsmPESection",
4300  *this,
4301  "AsmPESection",
4302  "AsmPESectionTag",
4303  SubclassListBuilder()
4304  | AsmPEExportSection
4305  | AsmPEImportSection
4306  | AsmPEStringSection
4307  , true);
4308 assert(AsmPESection.associatedGrammar != nullptr);
4309 AsmPESection.setCppCondition("!defined(DOCUMENTATION)");
4310 AsmPESection.isBoostSerializable(true);
4311 AsmPESection.setAutomaticGenerationOfConstructor(false);
4312 AsmPESection.setAutomaticGenerationOfDestructor(false);
4313 #endif // !DOCUMENTATION
4314 
4315 #ifdef DOCUMENTATION
4316 
4318 #endif // DOCUMENTATION
4319 
4320 #ifndef DOCUMENTATION
4321  AsmPESection.setDataPrototype(
4322  "SgAsmPESectionTableEntry*", "section_entry", "= nullptr",
4323  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4324 #endif // !DOCUMENTATION
4325 
4326  DECLARE_OTHERS(AsmPESection);
4327 #if defined(SgAsmPESection_OTHERS) || defined(DOCUMENTATION)
4328 
4329  //----------------------- Boost serialization for SgAsmPESection -----------------------
4330 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4331 private:
4332  friend class boost::serialization::access;
4333 
4334  template<class S>
4335  void serialize(S &s, const unsigned /*version*/) {
4336  debugSerializationBegin("SgAsmPESection");
4337  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
4338  s & BOOST_SERIALIZATION_NVP(p_section_entry);
4339  debugSerializationEnd("SgAsmPESection");
4340  }
4341 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4342 
4343 public:
4352 public:
4353  explicit SgAsmPESection(SgAsmPEFileHeader*);
4354 
4361  virtual bool reallocate() override;
4362  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
4363 public:
4365  virtual ~SgAsmPESection();
4366 
4367 public:
4369  SgAsmPESection();
4370 
4371 protected:
4378  void initializeProperties();
4379 #endif // SgAsmPESection_OTHERS
4380 #ifdef DOCUMENTATION
4381 };
4382 #endif // DOCUMENTATION
4383 
4384 
4386 // SgAsmPEExportEntryList -- MACHINE GENERATED; DO NOT MODIFY --
4388 
4389 DECLARE_LEAF_CLASS(AsmPEExportEntryList);
4390 IS_SERIALIZABLE(AsmPEExportEntryList);
4391 
4392 #ifdef DOCUMENTATION
4393 
4398 #endif // DOCUMENTATION
4399 
4400 #ifndef DOCUMENTATION
4401  AsmPEExportEntryList.setDataPrototype(
4402  "SgAsmPEExportEntryPtrList", "exports", "",
4403  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4404 #endif // !DOCUMENTATION
4405 
4406  DECLARE_OTHERS(AsmPEExportEntryList);
4407 #if defined(SgAsmPEExportEntryList_OTHERS) || defined(DOCUMENTATION)
4408 
4409  //----------------------- Boost serialization for SgAsmPEExportEntryList -----------------------
4410 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4411 private:
4412  friend class boost::serialization::access;
4413 
4414  template<class S>
4415  void serialize(S &s, const unsigned /*version*/) {
4416  debugSerializationBegin("SgAsmPEExportEntryList");
4417  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
4418  s & BOOST_SERIALIZATION_NVP(p_exports);
4419  debugSerializationEnd("SgAsmPEExportEntryList");
4420  }
4421 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4422 
4423 public:
4427  SgAsmPEExportEntryPtrList const& get_exports() const;
4428  SgAsmPEExportEntryPtrList& get_exports();
4429  void set_exports(SgAsmPEExportEntryPtrList const&);
4432 public:
4434  virtual ~SgAsmPEExportEntryList();
4435 
4436 public:
4439 
4440 protected:
4447  void initializeProperties();
4448 #endif // SgAsmPEExportEntryList_OTHERS
4449 #ifdef DOCUMENTATION
4450 };
4451 #endif // DOCUMENTATION
4452 
4453 
4455 // SgAsmPEExportEntry -- MACHINE GENERATED; DO NOT MODIFY --
4457 
4458 DECLARE_LEAF_CLASS(AsmPEExportEntry);
4459 IS_SERIALIZABLE(AsmPEExportEntry);
4460 
4461 #ifdef DOCUMENTATION
4462 
4464 #endif // DOCUMENTATION
4465 
4466 #ifndef DOCUMENTATION
4467  AsmPEExportEntry.setDataPrototype(
4468  "SgAsmGenericString*", "name", "= nullptr",
4469  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4470 #endif // !DOCUMENTATION
4471 
4472 #ifndef DOCUMENTATION
4473  AsmPEExportEntry.setDataPrototype(
4474  "unsigned", "ordinal", "= 0",
4475  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4476 #endif // !DOCUMENTATION
4477 
4478 #ifndef DOCUMENTATION
4479  AsmPEExportEntry.setDataPrototype(
4480  "rose_rva_t", "export_rva", "= 0",
4481  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4482 #endif // !DOCUMENTATION
4483 
4484 #ifndef DOCUMENTATION
4485  AsmPEExportEntry.setDataPrototype(
4486  "SgAsmGenericString*", "forwarder", "= nullptr",
4487  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4488 #endif // !DOCUMENTATION
4489 
4490  DECLARE_OTHERS(AsmPEExportEntry);
4491 #if defined(SgAsmPEExportEntry_OTHERS) || defined(DOCUMENTATION)
4492 
4493  //----------------------- Boost serialization for SgAsmPEExportEntry -----------------------
4494 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4495 private:
4496  friend class boost::serialization::access;
4497 
4498  template<class S>
4499  void serialize(S &s, const unsigned /*version*/) {
4500  debugSerializationBegin("SgAsmPEExportEntry");
4501  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
4502  s & BOOST_SERIALIZATION_NVP(p_name);
4503  s & BOOST_SERIALIZATION_NVP(p_ordinal);
4504  s & BOOST_SERIALIZATION_NVP(p_export_rva);
4505  s & BOOST_SERIALIZATION_NVP(p_forwarder);
4506  debugSerializationEnd("SgAsmPEExportEntry");
4507  }
4508 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4509 
4510 public:
4516  SgAsmGenericString* const& get_name() const;
4519 public:
4525  unsigned const& get_ordinal() const;
4526  void set_ordinal(unsigned const&);
4529 public:
4535  rose_rva_t const& get_export_rva() const;
4537  void set_export_rva(rose_rva_t const&);
4540 public:
4546  SgAsmGenericString* const& get_forwarder() const;
4550 public:
4551  SgAsmPEExportEntry(SgAsmGenericString *name, unsigned ordinal, rose_rva_t export_rva, SgAsmGenericString *forwarder);
4552  void dump(FILE *f,const char *prefix,ssize_t idx) const;
4553  /* Accessors. Override ROSETTA because we adjust parents. */
4554 
4560  Sawyer::Result<unsigned /*ordinal*/, std::string /*reason*/> biasedOrdinal() const;
4561 public:
4563  virtual ~SgAsmPEExportEntry();
4564 
4565 public:
4568 
4569 protected:
4576  void initializeProperties();
4577 #endif // SgAsmPEExportEntry_OTHERS
4578 #ifdef DOCUMENTATION
4579 };
4580 #endif // DOCUMENTATION
4581 
4582 
4584 // SgAsmPEExportDirectory -- MACHINE GENERATED; DO NOT MODIFY --
4586 
4587 DECLARE_LEAF_CLASS(AsmPEExportDirectory);
4588 IS_SERIALIZABLE(AsmPEExportDirectory);
4589 
4590 #ifdef DOCUMENTATION
4591 
4593 #endif // DOCUMENTATION
4594 
4595 #ifndef DOCUMENTATION
4596  AsmPEExportDirectory.setDataPrototype(
4597  "unsigned", "res1", "= 0",
4598  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4599 #endif // !DOCUMENTATION
4600 
4601 #ifndef DOCUMENTATION
4602  AsmPEExportDirectory.setDataPrototype(
4603  "time_t", "timestamp", "= 0",
4604  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4605 #endif // !DOCUMENTATION
4606 
4607 #ifndef DOCUMENTATION
4608  AsmPEExportDirectory.setDataPrototype(
4609  "unsigned", "vmajor", "= 0",
4610  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4611 #endif // !DOCUMENTATION
4612 
4613 #ifndef DOCUMENTATION
4614  AsmPEExportDirectory.setDataPrototype(
4615  "unsigned", "vminor", "= 0",
4616  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4617 #endif // !DOCUMENTATION
4618 
4619 #ifndef DOCUMENTATION
4620  AsmPEExportDirectory.setDataPrototype(
4621  "rose_rva_t", "name_rva", "= 0",
4622  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4623 #endif // !DOCUMENTATION
4624 
4625 #ifndef DOCUMENTATION
4626  AsmPEExportDirectory.setDataPrototype(
4627  "unsigned", "ord_base", "= 0",
4628  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4629 #endif // !DOCUMENTATION
4630 
4631 #ifndef DOCUMENTATION
4632  AsmPEExportDirectory.setDataPrototype(
4633  "size_t", "expaddr_n", "= 0",
4634  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4635 #endif // !DOCUMENTATION
4636 
4637 #ifndef DOCUMENTATION
4638  AsmPEExportDirectory.setDataPrototype(
4639  "size_t", "nameptr_n", "= 0",
4640  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4641 #endif // !DOCUMENTATION
4642 
4643 #ifndef DOCUMENTATION
4644  AsmPEExportDirectory.setDataPrototype(
4645  "rose_rva_t", "expaddr_rva", "= 0",
4646  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4647 #endif // !DOCUMENTATION
4648 
4649 #ifndef DOCUMENTATION
4650  AsmPEExportDirectory.setDataPrototype(
4651  "rose_rva_t", "nameptr_rva", "= 0",
4652  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4653 #endif // !DOCUMENTATION
4654 
4655 #ifndef DOCUMENTATION
4656  AsmPEExportDirectory.setDataPrototype(
4657  "rose_rva_t", "ordinals_rva", "= 0",
4658  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
4659 #endif // !DOCUMENTATION
4660 
4661 #ifndef DOCUMENTATION
4662  AsmPEExportDirectory.setDataPrototype(
4663  "SgAsmGenericString*", "name", "= NULL",
4664  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4665 #endif // !DOCUMENTATION
4666 
4667  DECLARE_OTHERS(AsmPEExportDirectory);
4668 #if defined(SgAsmPEExportDirectory_OTHERS) || defined(DOCUMENTATION)
4669 
4670  //----------------------- Boost serialization for SgAsmPEExportDirectory -----------------------
4671 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4672 private:
4673  friend class boost::serialization::access;
4674 
4675  template<class S>
4676  void serialize(S &s, const unsigned /*version*/) {
4677  debugSerializationBegin("SgAsmPEExportDirectory");
4678  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
4679  s & BOOST_SERIALIZATION_NVP(p_res1);
4680  s & BOOST_SERIALIZATION_NVP(p_timestamp);
4681  s & BOOST_SERIALIZATION_NVP(p_vmajor);
4682  s & BOOST_SERIALIZATION_NVP(p_vminor);
4683  s & BOOST_SERIALIZATION_NVP(p_name_rva);
4684  s & BOOST_SERIALIZATION_NVP(p_ord_base);
4685  s & BOOST_SERIALIZATION_NVP(p_expaddr_n);
4686  s & BOOST_SERIALIZATION_NVP(p_nameptr_n);
4687  s & BOOST_SERIALIZATION_NVP(p_expaddr_rva);
4688  s & BOOST_SERIALIZATION_NVP(p_nameptr_rva);
4689  s & BOOST_SERIALIZATION_NVP(p_ordinals_rva);
4690  s & BOOST_SERIALIZATION_NVP(p_name);
4691  debugSerializationEnd("SgAsmPEExportDirectory");
4692  }
4693 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4694  // Local types
4697 public:
4698 #ifdef _MSC_VER
4699 # pragma pack (1)
4700 #endif
4701  /* An Export Section begins with the Export Directory */
4703  uint32_t res1; /* 0x00 Reserved, must be zero */
4704  uint32_t timestamp; /* 0x04 Time that export data was created */
4705  uint16_t vmajor; /* 0x08 Major version number (user defined) */
4706  uint16_t vminor; /* 0x0a Minor version number (user defined) */
4707  uint32_t name_rva; /* 0x0c Location of name of DLL */
4708  uint32_t ord_base; /* 0x10 Starting ordinal for exports in this image (usually 1) */
4709  uint32_t expaddr_n; /* 0x14 Number of entries in the export address table */
4710  uint32_t nameptr_n; /* 0x18 Number of entries in the name pointer table and ordinal table */
4711  uint32_t expaddr_rva; /* 0x1c Location of Export Address Table */
4712  uint32_t nameptr_rva; /* 0x20 Location of Export Name Pointer Table */
4713  uint32_t ordinals_rva; /* 0x24 Location of Ordinal Table */
4714  } /* 0x28 */
4715 #if !defined(SWIG) && !defined(_MSC_VER)
4716  __attribute__((packed))
4717 #endif
4718  ;
4719 #ifdef _MSC_VER
4720 # pragma pack ()
4721 #endif
4722 
4724  // Properties
4726 public:
4732  unsigned const& get_res1() const;
4733  void set_res1(unsigned const&);
4736 public:
4742  time_t const& get_timestamp() const;
4743  void set_timestamp(time_t const&);
4746 public:
4752  unsigned const& get_vmajor() const;
4753  void set_vmajor(unsigned const&);
4756 public:
4762  unsigned const& get_vminor() const;
4763  void set_vminor(unsigned const&);
4766 public:
4772  rose_rva_t const& get_name_rva() const;
4774  void set_name_rva(rose_rva_t const&);
4777 public:
4783  unsigned const& get_ord_base() const;
4784  void set_ord_base(unsigned const&);
4787 public:
4793  size_t const& get_expaddr_n() const;
4794  void set_expaddr_n(size_t const&);
4797 public:
4803  size_t const& get_nameptr_n() const;
4804  void set_nameptr_n(size_t const&);
4807 public:
4813  rose_rva_t const& get_expaddr_rva() const;
4815  void set_expaddr_rva(rose_rva_t const&);
4818 public:
4824  rose_rva_t const& get_nameptr_rva() const;
4826  void set_nameptr_rva(rose_rva_t const&);
4829 public:
4835  rose_rva_t const& get_ordinals_rva() const;
4837  void set_ordinals_rva(rose_rva_t const&);
4840 public:
4846  SgAsmGenericString* const& get_name() const;
4847  void set_name(SgAsmGenericString* const&);
4849  // Functions
4852 public:
4854  void dump(FILE *f, const char *prefix, ssize_t idx) const;
4855 public:
4857  virtual ~SgAsmPEExportDirectory();
4858 
4859 public:
4862 
4863 protected:
4870  void initializeProperties();
4871 #endif // SgAsmPEExportDirectory_OTHERS
4872 #ifdef DOCUMENTATION
4873 };
4874 #endif // DOCUMENTATION
4875 
4876 
4878 // SgAsmOperandList -- MACHINE GENERATED; DO NOT MODIFY --
4880 
4881 DECLARE_LEAF_CLASS(AsmOperandList);
4882 IS_SERIALIZABLE(AsmOperandList);
4883 
4884 #ifdef DOCUMENTATION
4885 
4887 #endif // DOCUMENTATION
4888 
4889 #ifndef DOCUMENTATION
4890  AsmOperandList.setDataPrototype(
4891  "SgAsmExpressionPtrList", "operands", "",
4892  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
4893 #endif // !DOCUMENTATION
4894 
4895  DECLARE_OTHERS(AsmOperandList);
4896 #if defined(SgAsmOperandList_OTHERS) || defined(DOCUMENTATION)
4897 
4898  //----------------------- Boost serialization for SgAsmOperandList -----------------------
4899 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4900 private:
4901  friend class boost::serialization::access;
4902 
4903  template<class S>
4904  void serialize(S &s, const unsigned /*version*/) {
4905  debugSerializationBegin("SgAsmOperandList");
4906  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmNode);
4907  s & BOOST_SERIALIZATION_NVP(p_operands);
4908  debugSerializationEnd("SgAsmOperandList");
4909  }
4910 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4911 
4912 public:
4919  SgAsmExpressionPtrList const& get_operands() const;
4920  SgAsmExpressionPtrList& get_operands();
4921  void set_operands(SgAsmExpressionPtrList const&);
4923 public:
4925  void append_operand(SgAsmExpression* operand);
4926 public:
4928  virtual ~SgAsmOperandList();
4929 
4930 public:
4932  SgAsmOperandList();
4933 
4934 protected:
4941  void initializeProperties();
4942 #endif // SgAsmOperandList_OTHERS
4943 #ifdef DOCUMENTATION
4944 };
4945 #endif // DOCUMENTATION
4946 
4947 
4949 // SgAsmNullInstruction -- MACHINE GENERATED; DO NOT MODIFY --
4951 
4952 DECLARE_LEAF_CLASS(AsmNullInstruction);
4953 IS_SERIALIZABLE(AsmNullInstruction);
4954 
4955 #ifdef DOCUMENTATION
4957 #endif // DOCUMENTATION
4958 
4959  DECLARE_OTHERS(AsmNullInstruction);
4960 #if defined(SgAsmNullInstruction_OTHERS) || defined(DOCUMENTATION)
4961 
4962  //----------------------- Boost serialization for SgAsmNullInstruction -----------------------
4963 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
4964 private:
4965  friend class boost::serialization::access;
4966 
4967  template<class S>
4968  void serialize(S &s, const unsigned /*version*/) {
4969  debugSerializationBegin("SgAsmNullInstruction");
4970  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmInstruction);
4971  debugSerializationEnd("SgAsmNullInstruction");
4972  }
4973 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
4974 public:
4975  // there's only one kind of null instruction
4976  enum Kind { null_unknown };
4977 
4978 public: // overrides
4979  virtual bool terminatesBasicBlock() override;
4980  virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*> &insns,
4981  rose_addr_t *target/*out*/, rose_addr_t *ret/*out*/) override;
4982  virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&,
4983  rose_addr_t *target, rose_addr_t *ret) override;
4984  virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*> &insns) override;
4985  virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*> &insns) override;
4986  virtual Sawyer::Optional<rose_addr_t> branchTarget() override;
4987  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete) override;
4988  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(const std::vector<SgAsmInstruction*>&,
4989  bool &complete,
4990  const Rose::BinaryAnalysis::MemoryMap::Ptr &initial_memory =
4992  virtual bool isUnknown() const override;
4993  virtual unsigned get_anyKind() const override;
4994 public:
4996  virtual ~SgAsmNullInstruction();
4997 
4998 public:
5001 
5002 public:
5004  SgAsmNullInstruction(rose_addr_t const& address,
5005  std::string const& mnemonic);
5006 
5007 protected:
5014  void initializeProperties();
5015 #endif // SgAsmNullInstruction_OTHERS
5016 #ifdef DOCUMENTATION
5017 };
5018 #endif // DOCUMENTATION
5019 
5020 
5022 // SgAsmNEStringTable -- MACHINE GENERATED; DO NOT MODIFY --
5024 
5025 DECLARE_LEAF_CLASS(AsmNEStringTable);
5026 IS_SERIALIZABLE(AsmNEStringTable);
5027 
5028 #ifdef DOCUMENTATION
5030 #endif // DOCUMENTATION
5031 
5032  DECLARE_OTHERS(AsmNEStringTable);
5033 #if defined(SgAsmNEStringTable_OTHERS) || defined(DOCUMENTATION)
5034 
5035  //----------------------- Boost serialization for SgAsmNEStringTable -----------------------
5036 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5037 private:
5038  friend class boost::serialization::access;
5039 
5040  template<class S>
5041  void serialize(S &s, const unsigned /*version*/) {
5042  debugSerializationBegin("SgAsmNEStringTable");
5043  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
5044  debugSerializationEnd("SgAsmNEStringTable");
5045  }
5046 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5047 public:
5048  SgAsmNEStringTable(SgAsmNEFileHeader *fhdr, rose_addr_t offset, rose_addr_t size);
5049  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
5050  std::string get_string(rose_addr_t offset);
5051 public:
5053  virtual ~SgAsmNEStringTable();
5054 
5055 public:
5058 
5059 protected:
5066  void initializeProperties();
5067 #endif // SgAsmNEStringTable_OTHERS
5068 #ifdef DOCUMENTATION
5069 };
5070 #endif // DOCUMENTATION
5071 
5072 
5074 // SgAsmNESectionTable -- MACHINE GENERATED; DO NOT MODIFY --
5076 
5077 DECLARE_LEAF_CLASS(AsmNESectionTable);
5078 IS_SERIALIZABLE(AsmNESectionTable);
5079 
5080 #ifdef DOCUMENTATION
5082 #endif // DOCUMENTATION
5083 
5084 #ifndef DOCUMENTATION
5085  AsmNESectionTable.setDataPrototype(
5086  "unsigned", "flags", "= 0",
5087  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5088 #endif // !DOCUMENTATION
5089 
5090 #ifndef DOCUMENTATION
5091  AsmNESectionTable.setDataPrototype(
5092  "unsigned", "sector", "= 0",
5093  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5094 #endif // !DOCUMENTATION
5095 
5096 #ifndef DOCUMENTATION
5097  AsmNESectionTable.setDataPrototype(
5098  "rose_addr_t", "physical_size", "= 0",
5099  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5100 #endif // !DOCUMENTATION
5101 
5102 #ifndef DOCUMENTATION
5103  AsmNESectionTable.setDataPrototype(
5104  "rose_addr_t", "virtual_size", "= 0",
5105  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5106 #endif // !DOCUMENTATION
5107 
5108  DECLARE_OTHERS(AsmNESectionTable);
5109 #if defined(SgAsmNESectionTable_OTHERS) || defined(DOCUMENTATION)
5110 
5111  //----------------------- Boost serialization for SgAsmNESectionTable -----------------------
5112 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5113 private:
5114  friend class boost::serialization::access;
5115 
5116  template<class S>
5117  void serialize(S &s, const unsigned /*version*/) {
5118  debugSerializationBegin("SgAsmNESectionTable");
5119  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
5120  s & BOOST_SERIALIZATION_NVP(p_flags);
5121  s & BOOST_SERIALIZATION_NVP(p_sector);
5122  s & BOOST_SERIALIZATION_NVP(p_physical_size);
5123  s & BOOST_SERIALIZATION_NVP(p_virtual_size);
5124  debugSerializationEnd("SgAsmNESectionTable");
5125  }
5126 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5127 
5128 public:
5129  unsigned const& get_flags() const;
5130  void set_flags(unsigned const&);
5131 
5132 public:
5133  unsigned const& get_sector() const;
5134  void set_sector(unsigned const&);
5135 
5136 public:
5137  rose_addr_t const& get_physical_size() const;
5138  void set_physical_size(rose_addr_t const&);
5139 
5140 public:
5141  rose_addr_t const& get_virtual_size() const;
5142  void set_virtual_size(rose_addr_t const&);
5143 public:
5145  virtual void unparse(std::ostream&) const override;
5146  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
5147 public:
5149  virtual ~SgAsmNESectionTable();
5150 
5151 public:
5154 
5155 protected:
5162  void initializeProperties();
5163 #endif // SgAsmNESectionTable_OTHERS
5164 #ifdef DOCUMENTATION
5165 };
5166 #endif // DOCUMENTATION
5167 
5168 
5170 // SgAsmNESectionTableEntry -- MACHINE GENERATED; DO NOT MODIFY --
5172 
5173 DECLARE_LEAF_CLASS(AsmNESectionTableEntry);
5174 IS_SERIALIZABLE(AsmNESectionTableEntry);
5175 
5176 #ifdef DOCUMENTATION
5178 #endif // DOCUMENTATION
5179 
5180 #ifndef DOCUMENTATION
5181  AsmNESectionTableEntry.setDataPrototype(
5182  "unsigned", "flags", "= 0",
5183  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5184 #endif // !DOCUMENTATION
5185 
5186 #ifndef DOCUMENTATION
5187  AsmNESectionTableEntry.setDataPrototype(
5188  "unsigned", "sector", "= 0",
5189  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5190 #endif // !DOCUMENTATION
5191 
5192 #ifndef DOCUMENTATION
5193  AsmNESectionTableEntry.setDataPrototype(
5194  "rose_addr_t", "physical_size", "= 0",
5195  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5196 #endif // !DOCUMENTATION
5197 
5198 #ifndef DOCUMENTATION
5199  AsmNESectionTableEntry.setDataPrototype(
5200  "rose_addr_t", "virtual_size", "= 0",
5201  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5202 #endif // !DOCUMENTATION
5203 
5204  DECLARE_OTHERS(AsmNESectionTableEntry);
5205 #if defined(SgAsmNESectionTableEntry_OTHERS) || defined(DOCUMENTATION)
5206 
5207  //----------------------- Boost serialization for SgAsmNESectionTableEntry -----------------------
5208 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5209 private:
5210  friend class boost::serialization::access;
5211 
5212  template<class S>
5213  void serialize(S &s, const unsigned /*version*/) {
5214  debugSerializationBegin("SgAsmNESectionTableEntry");
5215  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
5216  s & BOOST_SERIALIZATION_NVP(p_flags);
5217  s & BOOST_SERIALIZATION_NVP(p_sector);
5218  s & BOOST_SERIALIZATION_NVP(p_physical_size);
5219  s & BOOST_SERIALIZATION_NVP(p_virtual_size);
5220  debugSerializationEnd("SgAsmNESectionTableEntry");
5221  }
5222 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5223  // Local types
5226 public:
5227 #ifdef _MSC_VER
5228 # pragma pack (1)
5229 #endif
5230  /* File format of a section table entry. All fields are little endian. */
5232  uint16_t sector; /* 0x00 File offset (sector size defined in hdr); zero means no file data */
5233  uint16_t physical_size; /* 0x02 Length of segment in file; zero means 64k if sector is non-zero */
5234  uint16_t flags; /* 0x04 Segment bit flags */
5235  uint16_t virtual_size; /* 0x06 Total size of segment when mapped to memory; zero means 64k */
5236  } /* 0x08 */
5237 // DQ (3/7/2013): Adding support to restrict visability to SWIG.
5238 #ifndef SWIG
5239 #ifndef _MSC_VER
5240  __attribute__((packed))
5241 #endif
5242 #endif
5243  ;
5244 #ifdef _MSC_VER
5245 # pragma pack ()
5246 #endif
5247 
5248  enum NESectionFlags {
5249  SF_RESERVED = 0x0e08, /* these bits are reserved */
5250 
5251  SF_TYPE_MASK = 0x0007, /* segment-type field */
5252  SF_CODE = 0x0000, /* code-segment type */
5253  SF_DATA = 0x0001, /* data-segment (otherwise segment is code) */
5254  SF_ALLOC = 0x0002, /* loader allocates memory */
5255  SF_LOAD = 0x0004, /* load the segment */
5256 
5257  SF_MOVABLE = 0x0010, /* segment is not fixed */
5258  SF_PURE = 0x0020, /* segment is pure, or sharable; otherwise impure or non-sharable */
5259  SF_PRELOAD = 0x0040, /* segment will be preloaded; read-only if this is a data segment */
5260  SF_NOT_WRITABLE = 0x0080, /* code segment is execute only; data segment is read-only */
5261  SF_RELOCINFO = 0x0100, /* segment has relocation records */
5262  SF_DISCARDABLE = 0x1000, /* discardable */
5263  SF_DISCARD = 0xf000 /* discard priority */
5264  };
5265 
5267  // Properties
5269 public:
5270  unsigned const& get_flags() const;
5271  void set_flags(unsigned const&);
5272 
5273 public:
5274  unsigned const& get_sector() const;
5275  void set_sector(unsigned const&);
5276 
5277 public:
5278  rose_addr_t const& get_physical_size() const;
5279  void set_physical_size(rose_addr_t const&);
5280 
5281 public:
5282  rose_addr_t const& get_virtual_size() const;
5283  void set_virtual_size(rose_addr_t const&);
5285  // Functions
5287 public:
5290  virtual void dump(FILE *f, const char *prefix, ssize_t idx) const {dump(f, prefix, idx, NULL);}
5291  void dump(FILE*, const char *prefix, ssize_t idx, SgAsmNEFileHeader *fhdr) const;
5292 public:
5294  virtual ~SgAsmNESectionTableEntry();
5295 
5296 public:
5299 
5300 protected:
5307  void initializeProperties();
5308 #endif // SgAsmNESectionTableEntry_OTHERS
5309 #ifdef DOCUMENTATION
5310 };
5311 #endif // DOCUMENTATION
5312 
5313 
5315 // SgAsmNESection -- MACHINE GENERATED; DO NOT MODIFY --
5317 
5318 DECLARE_LEAF_CLASS(AsmNESection);
5319 IS_SERIALIZABLE(AsmNESection);
5320 
5321 #ifdef DOCUMENTATION
5323 #endif // DOCUMENTATION
5324 
5325 #ifndef DOCUMENTATION
5326  AsmNESection.setDataPrototype(
5327  "SgAsmNESectionTableEntry*", "st_entry", "= nullptr",
5328  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
5329 #endif // !DOCUMENTATION
5330 
5331 #ifndef DOCUMENTATION
5332  AsmNESection.setDataPrototype(
5333  "SgAsmNERelocTable*", "reloc_table", "= nullptr",
5334  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
5335 #endif // !DOCUMENTATION
5336 
5337  DECLARE_OTHERS(AsmNESection);
5338 #if defined(SgAsmNESection_OTHERS) || defined(DOCUMENTATION)
5339 
5340  //----------------------- Boost serialization for SgAsmNESection -----------------------
5341 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5342 private:
5343  friend class boost::serialization::access;
5344 
5345  template<class S>
5346  void serialize(S &s, const unsigned /*version*/) {
5347  debugSerializationBegin("SgAsmNESection");
5348  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
5349  s & BOOST_SERIALIZATION_NVP(p_st_entry);
5350  s & BOOST_SERIALIZATION_NVP(p_reloc_table);
5351  debugSerializationEnd("SgAsmNESection");
5352  }
5353 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5354 
5355 public:
5356  SgAsmNESectionTableEntry* const& get_st_entry() const;
5357  void set_st_entry(SgAsmNESectionTableEntry* const&);
5358 
5359 public:
5360  SgAsmNERelocTable* const& get_reloc_table() const;
5361  void set_reloc_table(SgAsmNERelocTable* const&);
5362 public:
5363  explicit SgAsmNESection(SgAsmNEFileHeader *fhdr);
5364  virtual void unparse(std::ostream&) const override;
5365  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
5366 public:
5368  virtual ~SgAsmNESection();
5369 
5370 public:
5372  SgAsmNESection();
5373 
5374 protected:
5381  void initializeProperties();
5382 #endif // SgAsmNESection_OTHERS
5383 #ifdef DOCUMENTATION
5384 };
5385 #endif // DOCUMENTATION
5386 
5387 
5389 // SgAsmNERelocTable -- MACHINE GENERATED; DO NOT MODIFY --
5391 
5392 DECLARE_LEAF_CLASS(AsmNERelocTable);
5393 IS_SERIALIZABLE(AsmNERelocTable);
5394 
5395 #ifdef DOCUMENTATION
5397 #endif // DOCUMENTATION
5398 
5399 #ifndef DOCUMENTATION
5400  AsmNERelocTable.setDataPrototype(
5401  "SgAsmNERelocEntryPtrList", "entries", "",
5402  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
5403 #endif // !DOCUMENTATION
5404 
5405  DECLARE_OTHERS(AsmNERelocTable);
5406 #if defined(SgAsmNERelocTable_OTHERS) || defined(DOCUMENTATION)
5407 
5408  //----------------------- Boost serialization for SgAsmNERelocTable -----------------------
5409 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5410 private:
5411  friend class boost::serialization::access;
5412 
5413  template<class S>
5414  void serialize(S &s, const unsigned /*version*/) {
5415  debugSerializationBegin("SgAsmNERelocTable");
5416  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
5417  s & BOOST_SERIALIZATION_NVP(p_entries);
5418  debugSerializationEnd("SgAsmNERelocTable");
5419  }
5420 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5421 
5422 public:
5423  SgAsmNERelocEntryPtrList const& get_entries() const;
5424  SgAsmNERelocEntryPtrList& get_entries();
5425  void set_entries(SgAsmNERelocEntryPtrList const&);
5426 public:
5427  explicit SgAsmNERelocTable(SgAsmNEFileHeader *fhdr, SgAsmNESection *section);
5428  virtual void unparse(std::ostream&) const override;
5429  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
5430 public:
5432  virtual ~SgAsmNERelocTable();
5433 
5434 public:
5437 
5438 protected:
5445  void initializeProperties();
5446 #endif // SgAsmNERelocTable_OTHERS
5447 #ifdef DOCUMENTATION
5448 };
5449 #endif // DOCUMENTATION
5450 
5451 
5453 // SgAsmNERelocEntry -- MACHINE GENERATED; DO NOT MODIFY --
5455 
5456 DECLARE_LEAF_CLASS(AsmNERelocEntry);
5457 IS_SERIALIZABLE(AsmNERelocEntry);
5458 
5459 #ifdef DOCUMENTATION
5461 #endif // DOCUMENTATION
5462 
5463 #ifndef DOCUMENTATION
5464  AsmNERelocEntry.setDataPrototype(
5465  "SgAsmNERelocEntry::NERelocSrcType", "src_type", "= SgAsmNERelocEntry::RF_SRCTYPE_8OFF",
5466  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5467 #endif // !DOCUMENTATION
5468 
5469 #ifndef DOCUMENTATION
5470  AsmNERelocEntry.setDataPrototype(
5471  "SgAsmNERelocEntry::NERelocModifiers", "modifier", "= SgAsmNERelocEntry::RF_MODIFIER_SINGLE",
5472  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5473 #endif // !DOCUMENTATION
5474 
5475 #ifndef DOCUMENTATION
5476  AsmNERelocEntry.setDataPrototype(
5477  "SgAsmNERelocEntry::NERelocTgtType", "tgt_type", "= SgAsmNERelocEntry::RF_TGTTYPE_IREF",
5478  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5479 #endif // !DOCUMENTATION
5480 
5481 #ifndef DOCUMENTATION
5482  AsmNERelocEntry.setDataPrototype(
5483  "SgAsmNERelocEntry::NERelocFlags", "flags", "= SgAsmNERelocEntry::RF_ADDITIVE",
5484  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5485 #endif // !DOCUMENTATION
5486 
5487 #ifndef DOCUMENTATION
5488  AsmNERelocEntry.setDataPrototype(
5489  "rose_addr_t", "src_offset", "= 0",
5490  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5491 #endif // !DOCUMENTATION
5492 
5493 #ifndef DOCUMENTATION
5494  AsmNERelocEntry.setDataPrototype(
5495  "SgAsmNERelocEntry::iref_type", "iref", "",
5496  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5497 #endif // !DOCUMENTATION
5498 
5499 #ifndef DOCUMENTATION
5500  AsmNERelocEntry.setDataPrototype(
5501  "SgAsmNERelocEntry::iord_type", "iord", "",
5502  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5503 #endif // !DOCUMENTATION
5504 
5505 #ifndef DOCUMENTATION
5506  AsmNERelocEntry.setDataPrototype(
5507  "SgAsmNERelocEntry::iname_type", "iname", "",
5508  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5509 #endif // !DOCUMENTATION
5510 
5511 #ifndef DOCUMENTATION
5512  AsmNERelocEntry.setDataPrototype(
5513  "SgAsmNERelocEntry::osfixup_type", "osfixup", "",
5514  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5515 #endif // !DOCUMENTATION
5516 
5517  DECLARE_OTHERS(AsmNERelocEntry);
5518 #if defined(SgAsmNERelocEntry_OTHERS) || defined(DOCUMENTATION)
5519 
5520  //----------------------- Boost serialization for SgAsmNERelocEntry -----------------------
5521 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5522 private:
5523  friend class boost::serialization::access;
5524 
5525  template<class S>
5526  void serialize(S &s, const unsigned /*version*/) {
5527  debugSerializationBegin("SgAsmNERelocEntry");
5528  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
5529  s & BOOST_SERIALIZATION_NVP(p_src_type);
5530  s & BOOST_SERIALIZATION_NVP(p_modifier);
5531  s & BOOST_SERIALIZATION_NVP(p_tgt_type);
5532  s & BOOST_SERIALIZATION_NVP(p_flags);
5533  s & BOOST_SERIALIZATION_NVP(p_src_offset);
5534  s & BOOST_SERIALIZATION_NVP(p_iref);
5535  s & BOOST_SERIALIZATION_NVP(p_iord);
5536  s & BOOST_SERIALIZATION_NVP(p_iname);
5537  s & BOOST_SERIALIZATION_NVP(p_osfixup);
5538  debugSerializationEnd("SgAsmNERelocEntry");
5539  }
5540 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5541  // Local types
5544 public:
5545  /* NERelocEntry_disk -- variable size with multiple levels of 'union'. It's easier to just parse it in NERelocEntry::ctor()
5546  * than defining it here as a struct. */
5547  enum NERelocSrcType {
5548  RF_SRCTYPE_8OFF = 0, /* Byte offset */
5549  RF_SRCTYPE_WORDSEG = 2, /* Word segment, 16-bit selector */
5550  RF_SRCTYPE_16PTR = 3, /* 16-bit far pointer */
5551  RF_SRCTYPE_16OFF = 5, /* 16-bit offset */
5552  RF_SRCTYPE_32PTR = 6, /* 32-bit far pointer */
5553  RF_SRCTYPE_32OFF = 7, /* 32-bit offset */
5554  RF_SRCTYPE_NEARCALL = 8, /* near call or jump, WORD/DWROD based on section attribute */
5555  RF_SRCTYPE_48PTR = 11, /* 48-bit pointer */
5556  RF_SRCTYPE_32OFF_b = 13 /* 32-bit offset (not sure how this differs from case 7) */
5557  };
5558 
5559  enum NERelocTgtType {
5560  RF_TGTTYPE_IREF = 0, /* Internal reference */
5561  RF_TGTTYPE_IORD = 1, /* Imported (extern) ordinal */
5562  RF_TGTTYPE_INAME = 2, /* Imported (extern) name */
5563  RF_TGTTYPE_OSFIXUP = 3 /* Operating system fixup */
5564  };
5565 
5566  enum NERelocModifiers {
5567  RF_MODIFIER_SINGLE = 1,
5568  RF_MODIFIER_MULTI = 3
5569  };
5570 
5571  enum NERelocFlags {
5572  RF_ADDITIVE = 0x01, /* add target to source rather than replace source with target */
5573  RF_RESERVED = 0x02, /* reserved bits */
5574  RF_2EXTRA = 0x04, /* relocation info has size with new two bytes at end */
5575  RF_32ADD = 0x08, /* addition with 32-bits rather than 16 */
5576  RF_16SECTION = 0x10, /* 16-bit object number & module name rather than 8-bit */
5577  RF_8ORDINAL = 0x20 /* Ordinal is 8-bits rather than 16 */
5578  };
5579 
5580  // DQ (8/7/2008): At only (I hope) the risk of using more memory that required, break the union so that we can better support
5581  // this in ROSETTA. One solution might be to implement a common base class of unsigned, unsigned, rose_addr_t; and then use
5582  // member functions to access the data in the base class.
5583  struct iref_type { /*tgt_type==0x00: internal reference*/
5584  unsigned sect_idx; /* section index (1-origin) */
5585  unsigned res1; /* reserved */
5586  rose_addr_t tgt_offset;
5587 
5588 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5589  template<class S>
5590  void serialize(S &s, const unsigned /*version*/) {
5591  s & BOOST_SERIALIZATION_NVP(sect_idx);
5592  s & BOOST_SERIALIZATION_NVP(res1);
5593  s & BOOST_SERIALIZATION_NVP(tgt_offset);
5594  }
5595 #endif
5596 
5597  // Added to support RTI support in ROSE
5598  friend std::ostream & operator<< ( std::ostream & os, const iref_type & x );
5599 
5600  iref_type();
5601  };
5602 
5603  struct iord_type { /*tgt_type==0x01: imported ordinal*/
5604  unsigned modref; /* 1-based index into import module table */
5605  unsigned ordinal;
5606  rose_addr_t addend; /* value to add (only present for flags & RF_2EXTRA) */
5607 
5608 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5609  template<class S>
5610  void serialize(S &s, const unsigned /*version*/) {
5611  s & BOOST_SERIALIZATION_NVP(modref);
5612  s & BOOST_SERIALIZATION_NVP(ordinal);
5613  s & BOOST_SERIALIZATION_NVP(addend);
5614  }
5615 #endif
5616 
5617  // Added to support RTI support in ROSE
5618  friend std::ostream & operator<< ( std::ostream & os, const iord_type & x );
5619 
5620  iord_type();
5621  };
5622 
5623  struct iname_type { /*tgt_type==0x02: imported name*/
5624  unsigned modref; /* 1-based index into import module table */
5625  unsigned nm_off; /* offset into import procedure names */
5626  rose_addr_t addend; /* value to add (only present for flags & RF_2EXTRA) */
5627 
5628 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5629  template<class S>
5630  void serialize(S &s, const unsigned /*version*/) {
5631  s & BOOST_SERIALIZATION_NVP(modref);
5632  s & BOOST_SERIALIZATION_NVP(nm_off);
5633  s & BOOST_SERIALIZATION_NVP(addend);
5634  }
5635 #endif
5636 
5637  // Added to support RTI support in ROSE
5638  friend std::ostream & operator<< ( std::ostream & os, const iname_type & x );
5639 
5640  iname_type();
5641  };
5642 
5643  struct osfixup_type { /*tgt_type==0x03: operating system fixup*/
5644  unsigned type;
5645  unsigned res3;
5646 
5647 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5648  template<class S>
5649  void serialize(S &s, const unsigned /*version*/) {
5650  s & BOOST_SERIALIZATION_NVP(type);
5651  s & BOOST_SERIALIZATION_NVP(res3);
5652  }
5653 #endif
5654 
5655  // Added to support RTI support in ROSE
5656  friend std::ostream & operator<< ( std::ostream & os, const osfixup_type & x );
5657 
5658  osfixup_type();
5659  };
5660 
5662  // Properties
5664 public:
5665  SgAsmNERelocEntry::NERelocSrcType const& get_src_type() const;
5666  void set_src_type(SgAsmNERelocEntry::NERelocSrcType const&);
5667 
5668 public:
5669  SgAsmNERelocEntry::NERelocModifiers const& get_modifier() const;
5670  void set_modifier(SgAsmNERelocEntry::NERelocModifiers const&);
5671 
5672 public:
5673  SgAsmNERelocEntry::NERelocTgtType const& get_tgt_type() const;
5674  void set_tgt_type(SgAsmNERelocEntry::NERelocTgtType const&);
5675 
5676 public:
5677  SgAsmNERelocEntry::NERelocFlags const& get_flags() const;
5678  void set_flags(SgAsmNERelocEntry::NERelocFlags const&);
5679 
5680 public:
5681  rose_addr_t const& get_src_offset() const;
5682  void set_src_offset(rose_addr_t const&);
5683 
5684 public:
5685  SgAsmNERelocEntry::iref_type const& get_iref() const;
5686  void set_iref(SgAsmNERelocEntry::iref_type const&);
5687 
5688 public:
5689  SgAsmNERelocEntry::iord_type const& get_iord() const;
5690  void set_iord(SgAsmNERelocEntry::iord_type const&);
5691 
5692 public:
5693  SgAsmNERelocEntry::iname_type const& get_iname() const;
5694  void set_iname(SgAsmNERelocEntry::iname_type const&);
5695 
5696 public:
5697  SgAsmNERelocEntry::osfixup_type const& get_osfixup() const;
5698  void set_osfixup(SgAsmNERelocEntry::osfixup_type const&);
5700  // Functions
5702 public:
5703  SgAsmNERelocEntry(SgAsmGenericSection *relocs, rose_addr_t at, rose_addr_t *rec_size);
5704  rose_addr_t unparse(std::ostream&, const SgAsmGenericSection*, rose_addr_t spos) const;
5705  void dump(FILE*, const char *prefix, ssize_t idx) const;
5706 public:
5708  virtual ~SgAsmNERelocEntry();
5709 
5710 public:
5713 
5714 protected:
5721  void initializeProperties();
5722 #endif // SgAsmNERelocEntry_OTHERS
5723 #ifdef DOCUMENTATION
5724 };
5725 #endif // DOCUMENTATION
5726 
5727 
5729 // SgAsmNENameTable -- MACHINE GENERATED; DO NOT MODIFY --
5731 
5732 DECLARE_LEAF_CLASS(AsmNENameTable);
5733 IS_SERIALIZABLE(AsmNENameTable);
5734 
5735 #ifdef DOCUMENTATION
5737 #endif // DOCUMENTATION
5738 
5739 #ifndef DOCUMENTATION
5740  AsmNENameTable.setDataPrototype(
5741  "SgStringList", "names", "",
5742  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5743 #endif // !DOCUMENTATION
5744 
5745 #ifndef DOCUMENTATION
5746  AsmNENameTable.setDataPrototype(
5747  "SgUnsignedList", "ordinals", "",
5748  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5749 #endif // !DOCUMENTATION
5750 
5751  DECLARE_OTHERS(AsmNENameTable);
5752 #if defined(SgAsmNENameTable_OTHERS) || defined(DOCUMENTATION)
5753 
5754  //----------------------- Boost serialization for SgAsmNENameTable -----------------------
5755 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5756 private:
5757  friend class boost::serialization::access;
5758 
5759  template<class S>
5760  void serialize(S &s, const unsigned /*version*/) {
5761  debugSerializationBegin("SgAsmNENameTable");
5762  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
5763  s & BOOST_SERIALIZATION_NVP(p_names);
5764  s & BOOST_SERIALIZATION_NVP(p_ordinals);
5765  debugSerializationEnd("SgAsmNENameTable");
5766  }
5767 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5768 
5769 public:
5770  SgStringList const& get_names() const;
5771  void set_names(SgStringList const&);
5772 
5773 public:
5774  SgUnsignedList const& get_ordinals() const;
5775  void set_ordinals(SgUnsignedList const&);
5776 public:
5777  SgAsmNENameTable(SgAsmNEFileHeader *fhdr, rose_addr_t offset);
5778  virtual void unparse(std::ostream&) const override;
5779  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
5780  std::vector<std::string> get_names_by_ordinal(unsigned ordinal);
5781 public:
5783  virtual ~SgAsmNENameTable();
5784 
5785 public:
5787  SgAsmNENameTable();
5788 
5789 protected:
5796  void initializeProperties();
5797 #endif // SgAsmNENameTable_OTHERS
5798 #ifdef DOCUMENTATION
5799 };
5800 #endif // DOCUMENTATION
5801 
5802 
5804 // SgAsmNEModuleTable -- MACHINE GENERATED; DO NOT MODIFY --
5806 
5807 DECLARE_LEAF_CLASS(AsmNEModuleTable);
5808 IS_SERIALIZABLE(AsmNEModuleTable);
5809 
5810 #ifdef DOCUMENTATION
5812 #endif // DOCUMENTATION
5813 
5814 #ifndef DOCUMENTATION
5815  AsmNEModuleTable.setDataPrototype(
5816  "SgAsmNEStringTable*", "strtab", "= nullptr",
5817  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
5818 #endif // !DOCUMENTATION
5819 
5820 #ifndef DOCUMENTATION
5821  AsmNEModuleTable.setDataPrototype(
5822  "SgAddressList", "name_offsets", "",
5823  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5824 #endif // !DOCUMENTATION
5825 
5826 #ifndef DOCUMENTATION
5827  AsmNEModuleTable.setDataPrototype(
5828  "SgStringList", "names", "",
5829  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5830 #endif // !DOCUMENTATION
5831 
5832  DECLARE_OTHERS(AsmNEModuleTable);
5833 #if defined(SgAsmNEModuleTable_OTHERS) || defined(DOCUMENTATION)
5834 
5835  //----------------------- Boost serialization for SgAsmNEModuleTable -----------------------
5836 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
5837 private:
5838  friend class boost::serialization::access;
5839 
5840  template<class S>
5841  void serialize(S &s, const unsigned /*version*/) {
5842  debugSerializationBegin("SgAsmNEModuleTable");
5843  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
5844  s & BOOST_SERIALIZATION_NVP(p_strtab);
5845  s & BOOST_SERIALIZATION_NVP(p_name_offsets);
5846  s & BOOST_SERIALIZATION_NVP(p_names);
5847  debugSerializationEnd("SgAsmNEModuleTable");
5848  }
5849 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
5850 
5851 public:
5852  SgAsmNEStringTable* const& get_strtab() const;
5853  void set_strtab(SgAsmNEStringTable* const&);
5854 
5855 public:
5856  SgAddressList const& get_name_offsets() const;
5857  void set_name_offsets(SgAddressList const&);
5858 
5859 public:
5860  SgStringList const& get_names() const;
5861  void set_names(SgStringList const&);
5862 public:
5863  SgAsmNEModuleTable(SgAsmNEFileHeader *fhdr, SgAsmNEStringTable *strtab, rose_addr_t offset, rose_addr_t size);
5864  virtual void unparse(std::ostream&) const override;
5865  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
5866 public:
5868  virtual ~SgAsmNEModuleTable();
5869 
5870 public:
5873 
5874 protected:
5881  void initializeProperties();
5882 #endif // SgAsmNEModuleTable_OTHERS
5883 #ifdef DOCUMENTATION
5884 };
5885 #endif // DOCUMENTATION
5886 
5887 
5889 // SgAsmNEFileHeader -- MACHINE GENERATED; DO NOT MODIFY --
5891 
5892 DECLARE_LEAF_CLASS(AsmNEFileHeader);
5893 IS_SERIALIZABLE(AsmNEFileHeader);
5894 
5895 #ifdef DOCUMENTATION
5897 #endif // DOCUMENTATION
5898 
5899 #ifndef DOCUMENTATION
5900  AsmNEFileHeader.setDataPrototype(
5901  "unsigned", "e_linker_major", "= 0",
5902  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5903 #endif // !DOCUMENTATION
5904 
5905 #ifndef DOCUMENTATION
5906  AsmNEFileHeader.setDataPrototype(
5907  "unsigned", "e_linker_minor", "= 0",
5908  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5909 #endif // !DOCUMENTATION
5910 
5911 #ifndef DOCUMENTATION
5912  AsmNEFileHeader.setDataPrototype(
5913  "unsigned", "e_checksum", "= 0",
5914  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5915 #endif // !DOCUMENTATION
5916 
5917 #ifndef DOCUMENTATION
5918  AsmNEFileHeader.setDataPrototype(
5919  "unsigned", "e_flags1", "= 0",
5920  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5921 #endif // !DOCUMENTATION
5922 
5923 #ifndef DOCUMENTATION
5924  AsmNEFileHeader.setDataPrototype(
5925  "unsigned", "e_autodata_sn", "= 0",
5926  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5927 #endif // !DOCUMENTATION
5928 
5929 #ifndef DOCUMENTATION
5930  AsmNEFileHeader.setDataPrototype(
5931  "unsigned", "e_bss_size", "= 0",
5932  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5933 #endif // !DOCUMENTATION
5934 
5935 #ifndef DOCUMENTATION
5936  AsmNEFileHeader.setDataPrototype(
5937  "unsigned", "e_stack_size", "= 0",
5938  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5939 #endif // !DOCUMENTATION
5940 
5941 #ifndef DOCUMENTATION
5942  AsmNEFileHeader.setDataPrototype(
5943  "unsigned", "e_csip", "= 0",
5944  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5945 #endif // !DOCUMENTATION
5946 
5947 #ifndef DOCUMENTATION
5948  AsmNEFileHeader.setDataPrototype(
5949  "unsigned", "e_sssp", "= 0",
5950  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5951 #endif // !DOCUMENTATION
5952 
5953 #ifndef DOCUMENTATION
5954  AsmNEFileHeader.setDataPrototype(
5955  "unsigned", "e_nsections", "= 0",
5956  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5957 #endif // !DOCUMENTATION
5958 
5959 #ifndef DOCUMENTATION
5960  AsmNEFileHeader.setDataPrototype(
5961  "unsigned", "e_nmodrefs", "= 0",
5962  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5963 #endif // !DOCUMENTATION
5964 
5965 #ifndef DOCUMENTATION
5966  AsmNEFileHeader.setDataPrototype(
5967  "unsigned", "e_nnonresnames", "= 0",
5968  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5969 #endif // !DOCUMENTATION
5970 
5971 #ifndef DOCUMENTATION
5972  AsmNEFileHeader.setDataPrototype(
5973  "unsigned", "e_nmovable_entries", "= 0",
5974  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5975 #endif // !DOCUMENTATION
5976 
5977 #ifndef DOCUMENTATION
5978  AsmNEFileHeader.setDataPrototype(
5979  "unsigned", "e_sector_align", "= 0",
5980  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5981 #endif // !DOCUMENTATION
5982 
5983 #ifndef DOCUMENTATION
5984  AsmNEFileHeader.setDataPrototype(
5985  "unsigned", "e_nresources", "= 0",
5986  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5987 #endif // !DOCUMENTATION
5988 
5989 #ifndef DOCUMENTATION
5990  AsmNEFileHeader.setDataPrototype(
5991  "unsigned", "e_exetype", "= 0",
5992  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5993 #endif // !DOCUMENTATION
5994 
5995 #ifndef DOCUMENTATION
5996  AsmNEFileHeader.setDataPrototype(
5997  "unsigned", "e_flags2", "= 0",
5998  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
5999 #endif // !DOCUMENTATION
6000 
6001 #ifndef DOCUMENTATION
6002  AsmNEFileHeader.setDataPrototype(
6003  "unsigned", "e_res1", "= 0",
6004  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6005 #endif // !DOCUMENTATION
6006 
6007 #ifndef DOCUMENTATION
6008  AsmNEFileHeader.setDataPrototype(
6009  "unsigned", "e_winvers", "= 0",
6010  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6011 #endif // !DOCUMENTATION
6012 
6013 #ifndef DOCUMENTATION
6014  AsmNEFileHeader.setDataPrototype(
6015  "rose_addr_t", "e_entrytab_rfo", "= 0",
6016  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6017 #endif // !DOCUMENTATION
6018 
6019 #ifndef DOCUMENTATION
6020  AsmNEFileHeader.setDataPrototype(
6021  "rose_addr_t", "e_entrytab_size", "= 0",
6022  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6023 #endif // !DOCUMENTATION
6024 
6025 #ifndef DOCUMENTATION
6026  AsmNEFileHeader.setDataPrototype(
6027  "rose_addr_t", "e_sectab_rfo", "= 0",
6028  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6029 #endif // !DOCUMENTATION
6030 
6031 #ifndef DOCUMENTATION
6032  AsmNEFileHeader.setDataPrototype(
6033  "rose_addr_t", "e_rsrctab_rfo", "= 0",
6034  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6035 #endif // !DOCUMENTATION
6036 
6037 #ifndef DOCUMENTATION
6038  AsmNEFileHeader.setDataPrototype(
6039  "rose_addr_t", "e_resnametab_rfo", "= 0",
6040  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6041 #endif // !DOCUMENTATION
6042 
6043 #ifndef DOCUMENTATION
6044  AsmNEFileHeader.setDataPrototype(
6045  "rose_addr_t", "e_modreftab_rfo", "= 0",
6046  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6047 #endif // !DOCUMENTATION
6048 
6049 #ifndef DOCUMENTATION
6050  AsmNEFileHeader.setDataPrototype(
6051  "rose_addr_t", "e_importnametab_rfo", "= 0",
6052  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6053 #endif // !DOCUMENTATION
6054 
6055 #ifndef DOCUMENTATION
6056  AsmNEFileHeader.setDataPrototype(
6057  "rose_addr_t", "e_nonresnametab_offset", "= 0",
6058  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6059 #endif // !DOCUMENTATION
6060 
6061 #ifndef DOCUMENTATION
6062  AsmNEFileHeader.setDataPrototype(
6063  "rose_addr_t", "e_fastload_sector", "= 0",
6064  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6065 #endif // !DOCUMENTATION
6066 
6067 #ifndef DOCUMENTATION
6068  AsmNEFileHeader.setDataPrototype(
6069  "rose_addr_t", "e_fastload_nsectors", "= 0",
6070  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6071 #endif // !DOCUMENTATION
6072 
6073 #ifndef DOCUMENTATION
6074  AsmNEFileHeader.setDataPrototype(
6075  "SgAsmDOSExtendedHeader*", "dos2_header", "= nullptr",
6076  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6077 #endif // !DOCUMENTATION
6078 
6079 #ifndef DOCUMENTATION
6080  AsmNEFileHeader.setDataPrototype(
6081  "SgAsmNESectionTable*", "section_table", "= nullptr",
6082  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6083 #endif // !DOCUMENTATION
6084 
6085 #ifndef DOCUMENTATION
6086  AsmNEFileHeader.setDataPrototype(
6087  "SgAsmNENameTable*", "resname_table", "= nullptr",
6088  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6089 #endif // !DOCUMENTATION
6090 
6091 #ifndef DOCUMENTATION
6092  AsmNEFileHeader.setDataPrototype(
6093  "SgAsmNENameTable*", "nonresname_table", "= nullptr",
6094  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6095 #endif // !DOCUMENTATION
6096 
6097 #ifndef DOCUMENTATION
6098  AsmNEFileHeader.setDataPrototype(
6099  "SgAsmNEModuleTable*", "module_table", "= nullptr",
6100  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6101 #endif // !DOCUMENTATION
6102 
6103 #ifndef DOCUMENTATION
6104  AsmNEFileHeader.setDataPrototype(
6105  "SgAsmNEEntryTable*", "entry_table", "= nullptr",
6106  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6107 #endif // !DOCUMENTATION
6108 
6109  DECLARE_OTHERS(AsmNEFileHeader);
6110 #if defined(SgAsmNEFileHeader_OTHERS) || defined(DOCUMENTATION)
6111 
6112  //----------------------- Boost serialization for SgAsmNEFileHeader -----------------------
6113 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6114 private:
6115  friend class boost::serialization::access;
6116 
6117  template<class S>
6118  void serialize(S &s, const unsigned /*version*/) {
6119  debugSerializationBegin("SgAsmNEFileHeader");
6120  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
6121  s & BOOST_SERIALIZATION_NVP(p_e_linker_major);
6122  s & BOOST_SERIALIZATION_NVP(p_e_linker_minor);
6123  s & BOOST_SERIALIZATION_NVP(p_e_checksum);
6124  s & BOOST_SERIALIZATION_NVP(p_e_flags1);
6125  s & BOOST_SERIALIZATION_NVP(p_e_autodata_sn);
6126  s & BOOST_SERIALIZATION_NVP(p_e_bss_size);
6127  s & BOOST_SERIALIZATION_NVP(p_e_stack_size);
6128  s & BOOST_SERIALIZATION_NVP(p_e_csip);
6129  s & BOOST_SERIALIZATION_NVP(p_e_sssp);
6130  s & BOOST_SERIALIZATION_NVP(p_e_nsections);
6131  s & BOOST_SERIALIZATION_NVP(p_e_nmodrefs);
6132  s & BOOST_SERIALIZATION_NVP(p_e_nnonresnames);
6133  s & BOOST_SERIALIZATION_NVP(p_e_nmovable_entries);
6134  s & BOOST_SERIALIZATION_NVP(p_e_sector_align);
6135  s & BOOST_SERIALIZATION_NVP(p_e_nresources);
6136  s & BOOST_SERIALIZATION_NVP(p_e_exetype);
6137  s & BOOST_SERIALIZATION_NVP(p_e_flags2);
6138  s & BOOST_SERIALIZATION_NVP(p_e_res1);
6139  s & BOOST_SERIALIZATION_NVP(p_e_winvers);
6140  s & BOOST_SERIALIZATION_NVP(p_e_entrytab_rfo);
6141  s & BOOST_SERIALIZATION_NVP(p_e_entrytab_size);
6142  s & BOOST_SERIALIZATION_NVP(p_e_sectab_rfo);
6143  s & BOOST_SERIALIZATION_NVP(p_e_rsrctab_rfo);
6144  s & BOOST_SERIALIZATION_NVP(p_e_resnametab_rfo);
6145  s & BOOST_SERIALIZATION_NVP(p_e_modreftab_rfo);
6146  s & BOOST_SERIALIZATION_NVP(p_e_importnametab_rfo);
6147  s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_offset);
6148  s & BOOST_SERIALIZATION_NVP(p_e_fastload_sector);
6149  s & BOOST_SERIALIZATION_NVP(p_e_fastload_nsectors);
6150  s & BOOST_SERIALIZATION_NVP(p_dos2_header);
6151  s & BOOST_SERIALIZATION_NVP(p_section_table);
6152  s & BOOST_SERIALIZATION_NVP(p_resname_table);
6153  s & BOOST_SERIALIZATION_NVP(p_nonresname_table);
6154  s & BOOST_SERIALIZATION_NVP(p_module_table);
6155  s & BOOST_SERIALIZATION_NVP(p_entry_table);
6156  debugSerializationEnd("SgAsmNEFileHeader");
6157  }
6158 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6159  // Local types
6162 public:
6163 #ifdef _MSC_VER
6164 # pragma pack (1)
6165 #endif
6166  /* File format of an NE File Header. All fields are little endian.
6167  *
6168  * NOTES
6169  *
6170  * e_sssp: The value specified in SS is an index (1-origin) into the segment table. If SS addresses the automatic data segment
6171  * and SP is zero then SP is set to the address obtained by adding the size of the automatic data segment to the size
6172  * of the stack. */
6174  unsigned char e_magic[2]; /* 0x00 magic number "NE" */
6175  unsigned char e_linker_major; /* 0x02 linker major version number */
6176  unsigned char e_linker_minor; /* 0x03 linker minor version number */
6177  uint16_t e_entrytab_rfo; /* 0x04 entry table offset relative to start of header */
6178  uint16_t e_entrytab_size; /* 0x06 size of entry table in bytes */
6179  uint32_t e_checksum; /* 0x08 32-bit CRC of entire file (this word is taken a zero during the calculation) */
6180  uint16_t e_flags1; /* 0x0c file-level bit flags (see HeaderFlags1) */
6181  uint16_t e_autodata_sn; /* 0x0e auto data section number if (flags & 0x3)==0; else zero */
6182  uint16_t e_bss_size; /* 0x10 num bytes added to data segment for BSS */
6183  uint16_t e_stack_size; /* 0x12 num bytes added to data segment for stack (zero of SS!=DS registers) */
6184  uint32_t e_csip; /* 0x14 section number:offset of CS:IP */
6185  uint32_t e_sssp; /* 0x18 section number:offset of SS:SP (see note 1 above) */
6186  uint16_t e_nsections; /* 0x1c number of entries in the section table */
6187  uint16_t e_nmodrefs; /* 0x1e number of entries in the module reference table */
6188  uint16_t e_nnonresnames; /* 0x20 number of entries in the non-resident name table */
6189  uint16_t e_sectab_rfo; /* 0x22 offset of section table relative to start of header */
6190  uint16_t e_rsrctab_rfo; /* 0x24 offset of resource table relative to start of header */
6191  uint16_t e_resnametab_rfo; /* 0x26 offset of resident name table relative to start of header */
6192  uint16_t e_modreftab_rfo; /* 0x28 offset of module reference table relative to start of header */
6193  uint16_t e_importnametab_rfo; /* 0x2a offset of imported names table relative to start of header */
6194  uint32_t e_nonresnametab_offset; /* 0x2c file offset of non-resident name table */
6195  uint16_t e_nmovable_entries; /* 0x30 number of movable entries in Entry Table */
6196  uint16_t e_sector_align; /* 0x32 sector alignment shift count (log2 of segment sector size) */
6197  uint16_t e_nresources; /* 0x34 number of resource entries */
6198  unsigned char e_exetype; /* 0x36 executable type (2==windows) */
6199  unsigned char e_flags2; /* 0x37 additional flags (see HeaderFlags2) */
6200  uint16_t e_fastload_sector; /* 0x38 sector offset to fast-load area (only for Windows) */
6201  uint16_t e_fastload_nsectors; /* 0x3a size of fast-load area in sectors (only for Windows) */
6202  uint16_t e_res1; /* 0x3c reserved */
6203  uint16_t e_winvers; /* 0x3e expected version number for Windows (only for Windows) */
6204  } /* 0x40 */
6205 // DQ (3/7/2013): Adding support to restrict visability to SWIG.
6206 #ifndef SWIG
6207 #ifndef _MSC_VER
6208  __attribute__((packed))
6209 #endif
6210 #endif
6211  ;
6212 #ifdef _MSC_VER
6213 # pragma pack ()
6214 #endif
6215 
6216  /* Bit flags for the NE header 'e_flags' member.
6217  *
6218  * If HF_LIBRARY (bit 15) is set then the CS:IP registers point to an initialization procedure called with the value in the AX
6219  * register equal to the module handle. The initialization procedure must execute a far return to the caller. The resulting
6220  * value in AX is a status indicator (non-zero for success, zero for failure). */
6221  enum HeaderFlags1 {
6222  HF1_RESERVED = 0x57f4, /* Reserved bits */
6223  HF1_NO_DATA = 0x0000, /* (flags&0x03==0) => an exe not containing a data segment */
6224  HF1_SINGLE_DATA = 0x0001, /* Executable contains one data segment; set if file is a DLL */
6225  HF1_MULTIPLE_DATA = 0x0002, /* Exe with multiple data segments; set if a windows application */
6226  HF1_LOADER_SEGMENT = 0x0800, /* First segment contains code that loads the application */
6227  HF1_FATAL_ERRORS = 0x2000, /* Errors detected at link time; module will not load */
6228  HF1_LIBRARY = 0x8000 /* Module is a library */
6229  };
6230 
6231  /* Bit flags for the NE header 'e_flags2' member. */
6232  enum HeaderFlags2 {
6233  HF2_RESERVED = 0xf1, /* Reserved bits */
6234  HF2_PROTECTED_MODE = 0x02, /* Windows 2.x application that runs in 3.x protected mode */
6235  HF2_PFONTS = 0x04, /* Windows 2.x application that supports proportional fonts */
6236  HF2_FASTLOAD = 0x08 /* Executable contains a fast-load area */
6237  };
6238 
6240  // Properties
6242 public:
6243  unsigned const& get_e_linker_major() const;
6244  void set_e_linker_major(unsigned const&);
6245 
6246 public:
6247  unsigned const& get_e_linker_minor() const;
6248  void set_e_linker_minor(unsigned const&);
6249 
6250 public:
6251  unsigned const& get_e_checksum() const;
6252  void set_e_checksum(unsigned const&);
6253 
6254 public:
6255  unsigned const& get_e_flags1() const;
6256  void set_e_flags1(unsigned const&);
6257 
6258 public:
6259  unsigned const& get_e_autodata_sn() const;
6260  void set_e_autodata_sn(unsigned const&);
6261 
6262 public:
6263  unsigned const& get_e_bss_size() const;
6264  void set_e_bss_size(unsigned const&);
6265 
6266 public:
6267  unsigned const& get_e_stack_size() const;
6268  void set_e_stack_size(unsigned const&);
6269 
6270 public:
6271  unsigned const& get_e_csip() const;
6272  void set_e_csip(unsigned const&);
6273 
6274 public:
6275  unsigned const& get_e_sssp() const;
6276  void set_e_sssp(unsigned const&);
6277 
6278 public:
6279  unsigned const& get_e_nsections() const;
6280  void set_e_nsections(unsigned const&);
6281 
6282 public:
6283  unsigned const& get_e_nmodrefs() const;
6284  void set_e_nmodrefs(unsigned const&);
6285 
6286 public:
6287  unsigned const& get_e_nnonresnames() const;
6288  void set_e_nnonresnames(unsigned const&);
6289 
6290 public:
6291  unsigned const& get_e_nmovable_entries() const;
6292  void set_e_nmovable_entries(unsigned const&);
6293 
6294 public:
6295  unsigned const& get_e_sector_align() const;
6296  void set_e_sector_align(unsigned const&);
6297 
6298 public:
6299  unsigned const& get_e_nresources() const;
6300  void set_e_nresources(unsigned const&);
6301 
6302 public:
6303  unsigned const& get_e_exetype() const;
6304  void set_e_exetype(unsigned const&);
6305 
6306 public:
6307  unsigned const& get_e_flags2() const;
6308  void set_e_flags2(unsigned const&);
6309 
6310 public:
6311  unsigned const& get_e_res1() const;
6312  void set_e_res1(unsigned const&);
6313 
6314 public:
6315  unsigned const& get_e_winvers() const;
6316  void set_e_winvers(unsigned const&);
6317 
6318 public:
6319  rose_addr_t const& get_e_entrytab_rfo() const;
6320  void set_e_entrytab_rfo(rose_addr_t const&);
6321 
6322 public:
6323  rose_addr_t const& get_e_entrytab_size() const;
6324  void set_e_entrytab_size(rose_addr_t const&);
6325 
6326 public:
6327  rose_addr_t const& get_e_sectab_rfo() const;
6328  void set_e_sectab_rfo(rose_addr_t const&);
6329 
6330 public:
6331  rose_addr_t const& get_e_rsrctab_rfo() const;
6332  void set_e_rsrctab_rfo(rose_addr_t const&);
6333 
6334 public:
6335  rose_addr_t const& get_e_resnametab_rfo() const;
6336  void set_e_resnametab_rfo(rose_addr_t const&);
6337 
6338 public:
6339  rose_addr_t const& get_e_modreftab_rfo() const;
6340  void set_e_modreftab_rfo(rose_addr_t const&);
6341 
6342 public:
6343  rose_addr_t const& get_e_importnametab_rfo() const;
6344  void set_e_importnametab_rfo(rose_addr_t const&);
6345 
6346 public:
6347  rose_addr_t const& get_e_nonresnametab_offset() const;
6348  void set_e_nonresnametab_offset(rose_addr_t const&);
6349 
6350 public:
6351  rose_addr_t const& get_e_fastload_sector() const;
6352  void set_e_fastload_sector(rose_addr_t const&);
6353 
6354 public:
6355  rose_addr_t const& get_e_fastload_nsectors() const;
6356  void set_e_fastload_nsectors(rose_addr_t const&);
6357 
6358 public:
6359  SgAsmDOSExtendedHeader* const& get_dos2_header() const;
6360  void set_dos2_header(SgAsmDOSExtendedHeader* const&);
6361 
6362 public:
6363  SgAsmNESectionTable* const& get_section_table() const;
6364  void set_section_table(SgAsmNESectionTable* const&);
6365 
6366 public:
6367  SgAsmNENameTable* const& get_resname_table() const;
6368  void set_resname_table(SgAsmNENameTable* const&);
6369 
6370 public:
6371  SgAsmNENameTable* const& get_nonresname_table() const;
6372  void set_nonresname_table(SgAsmNENameTable* const&);
6373 
6374 public:
6375  SgAsmNEModuleTable* const& get_module_table() const;
6376  void set_module_table(SgAsmNEModuleTable* const&);
6377 
6378 public:
6379  SgAsmNEEntryTable* const& get_entry_table() const;
6380  void set_entry_table(SgAsmNEEntryTable* const&);
6382  // Functions
6384 public:
6385  SgAsmNEFileHeader(SgAsmGenericFile *f, rose_addr_t offset);
6386 
6387  static bool is_NE (SgAsmGenericFile*);
6388  static SgAsmNEFileHeader *parse(SgAsmDOSFileHeader*);
6389  virtual void unparse(std::ostream&) const override;
6390  virtual const char *format_name() const override {return "NE";}
6391  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
6392 
6393 private:
6394  void *encode(SgAsmNEFileHeader::NEFileHeader_disk*) const;
6395 public:
6397  virtual ~SgAsmNEFileHeader();
6398 
6399 public:
6402 
6403 protected:
6410  void initializeProperties();
6411 #endif // SgAsmNEFileHeader_OTHERS
6412 #ifdef DOCUMENTATION
6413 };
6414 #endif // DOCUMENTATION
6415 
6416 
6418 // SgAsmNEEntryTable -- MACHINE GENERATED; DO NOT MODIFY --
6420 
6421 DECLARE_LEAF_CLASS(AsmNEEntryTable);
6422 IS_SERIALIZABLE(AsmNEEntryTable);
6423 
6424 #ifdef DOCUMENTATION
6426 #endif // DOCUMENTATION
6427 
6428 #ifndef DOCUMENTATION
6429  AsmNEEntryTable.setDataPrototype(
6430  "SgSizeTList", "bundle_sizes", "",
6431  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6432 #endif // !DOCUMENTATION
6433 
6434 #ifndef DOCUMENTATION
6435  AsmNEEntryTable.setDataPrototype(
6436  "SgAsmNEEntryPointPtrList", "entries", "",
6437  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6438 #endif // !DOCUMENTATION
6439 
6440  DECLARE_OTHERS(AsmNEEntryTable);
6441 #if defined(SgAsmNEEntryTable_OTHERS) || defined(DOCUMENTATION)
6442 
6443  //----------------------- Boost serialization for SgAsmNEEntryTable -----------------------
6444 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6445 private:
6446  friend class boost::serialization::access;
6447 
6448  template<class S>
6449  void serialize(S &s, const unsigned /*version*/) {
6450  debugSerializationBegin("SgAsmNEEntryTable");
6451  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
6452  s & BOOST_SERIALIZATION_NVP(p_bundle_sizes);
6453  s & BOOST_SERIALIZATION_NVP(p_entries);
6454  debugSerializationEnd("SgAsmNEEntryTable");
6455  }
6456 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6457 
6458 public:
6459  SgSizeTList const& get_bundle_sizes() const;
6460  void set_bundle_sizes(SgSizeTList const&);
6461 
6462 public:
6463  SgAsmNEEntryPointPtrList const& get_entries() const;
6464  SgAsmNEEntryPointPtrList& get_entries();
6465  void set_entries(SgAsmNEEntryPointPtrList const&);
6466 public:
6467  SgAsmNEEntryTable(SgAsmNEFileHeader *fhdr, rose_addr_t offset, rose_addr_t size);
6468  void populate_entries();
6469  virtual void unparse(std::ostream&) const override;
6470  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
6471 public:
6473  virtual ~SgAsmNEEntryTable();
6474 
6475 public:
6478 
6479 protected:
6486  void initializeProperties();
6487 #endif // SgAsmNEEntryTable_OTHERS
6488 #ifdef DOCUMENTATION
6489 };
6490 #endif // DOCUMENTATION
6491 
6492 
6494 // SgAsmNEEntryPoint -- MACHINE GENERATED; DO NOT MODIFY --
6496 
6497 DECLARE_LEAF_CLASS(AsmNEEntryPoint);
6498 IS_SERIALIZABLE(AsmNEEntryPoint);
6499 
6500 #ifdef DOCUMENTATION
6502 #endif // DOCUMENTATION
6503 
6504 #ifndef DOCUMENTATION
6505  AsmNEEntryPoint.setDataPrototype(
6506  "SgAsmNEEntryPoint::NEEntryFlags", "flags", "= SgAsmNEEntryPoint::EF_ZERO",
6507  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6508 #endif // !DOCUMENTATION
6509 
6510 #ifndef DOCUMENTATION
6511  AsmNEEntryPoint.setDataPrototype(
6512  "unsigned", "int3f", "= 0",
6513  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6514 #endif // !DOCUMENTATION
6515 
6516 #ifndef DOCUMENTATION
6517  AsmNEEntryPoint.setDataPrototype(
6518  "unsigned", "section_idx", "= 0",
6519  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6520 #endif // !DOCUMENTATION
6521 
6522 #ifndef DOCUMENTATION
6523  AsmNEEntryPoint.setDataPrototype(
6524  "unsigned", "section_offset", "= 0",
6525  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6526 #endif // !DOCUMENTATION
6527 
6528  DECLARE_OTHERS(AsmNEEntryPoint);
6529 #if defined(SgAsmNEEntryPoint_OTHERS) || defined(DOCUMENTATION)
6530 
6531  //----------------------- Boost serialization for SgAsmNEEntryPoint -----------------------
6532 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6533 private:
6534  friend class boost::serialization::access;
6535 
6536  template<class S>
6537  void serialize(S &s, const unsigned /*version*/) {
6538  debugSerializationBegin("SgAsmNEEntryPoint");
6539  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
6540  s & BOOST_SERIALIZATION_NVP(p_flags);
6541  s & BOOST_SERIALIZATION_NVP(p_int3f);
6542  s & BOOST_SERIALIZATION_NVP(p_section_idx);
6543  s & BOOST_SERIALIZATION_NVP(p_section_offset);
6544  debugSerializationEnd("SgAsmNEEntryPoint");
6545  }
6546 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6547  // Local types
6550 public:
6551  enum NEEntryFlags {
6552  EF_ZERO = 0x00, /* No flags set */
6553  EF_RESERVED = 0xfc, /* Reserved bits */
6554  EF_EXPORTED = 0x01, /* Exported */
6555  EF_GLOBAL = 0x02 /* Uses a global (shared) data section */
6556  };
6557 
6559  // Properties
6561 public:
6562  SgAsmNEEntryPoint::NEEntryFlags const& get_flags() const;
6563  void set_flags(SgAsmNEEntryPoint::NEEntryFlags const&);
6564 
6565 public:
6566  unsigned const& get_int3f() const;
6567  void set_int3f(unsigned const&);
6568 
6569 public:
6570  unsigned const& get_section_idx() const;
6571  void set_section_idx(unsigned const&);
6572 
6573 public:
6574  unsigned const& get_section_offset() const;
6575  void set_section_offset(unsigned const&);
6577  // Functions
6579 public:
6580  SgAsmNEEntryPoint(SgAsmNEEntryPoint::NEEntryFlags flags, unsigned int3f, unsigned s_idx, unsigned s_off);
6581  void dump(FILE*, const char *prefix, ssize_t idx) const;
6582 public:
6584  virtual ~SgAsmNEEntryPoint();
6585 
6586 public:
6589 
6590 protected:
6597  void initializeProperties();
6598 #endif // SgAsmNEEntryPoint_OTHERS
6599 #ifdef DOCUMENTATION
6600 };
6601 #endif // DOCUMENTATION
6602 
6603 
6605 // SgAsmMipsInstruction -- MACHINE GENERATED; DO NOT MODIFY --
6607 
6608 DECLARE_LEAF_CLASS(AsmMipsInstruction);
6609 IS_SERIALIZABLE(AsmMipsInstruction);
6610 
6611 DECLARE_HEADERS(AsmMipsInstruction);
6612 #if defined(SgAsmMipsInstruction_HEADERS) || defined(DOCUMENTATION)
6613 #include <Rose/BinaryAnalysis/InstructionEnumsMips.h>
6614 #endif // SgAsmMipsInstruction_HEADERS
6615 
6616 #ifdef DOCUMENTATION
6617 
6619 #endif // DOCUMENTATION
6620 
6621 #ifndef DOCUMENTATION
6622  AsmMipsInstruction.setDataPrototype(
6623  "Rose::BinaryAnalysis::MipsInstructionKind", "kind", "= Rose::BinaryAnalysis::mips_unknown_instruction",
6624  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6625 #endif // !DOCUMENTATION
6626 
6627  DECLARE_OTHERS(AsmMipsInstruction);
6628 #if defined(SgAsmMipsInstruction_OTHERS) || defined(DOCUMENTATION)
6629 
6630  //----------------------- Boost serialization for SgAsmMipsInstruction -----------------------
6631 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6632 private:
6633  friend class boost::serialization::access;
6634 
6635  template<class S>
6636  void serialize(S &s, const unsigned /*version*/) {
6637  debugSerializationBegin("SgAsmMipsInstruction");
6638  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmInstruction);
6639  s & BOOST_SERIALIZATION_NVP(p_kind);
6640  debugSerializationEnd("SgAsmMipsInstruction");
6641  }
6642 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6643 
6644 public:
6654 public:
6655  // Overrides are documented in the base class
6656  virtual std::string description() const override;
6657  virtual bool terminatesBasicBlock() override;
6658  virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*> &insns,
6659  rose_addr_t *target/*out*/, rose_addr_t *ret/*out*/) override;
6660  virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&,
6661  rose_addr_t *target, rose_addr_t *ret) override;
6662  virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*> &insns) override;
6663  virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*> &insns) override;
6664  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete) override;
6665  virtual bool isUnknown() const override;
6666  virtual Sawyer::Optional<rose_addr_t> branchTarget() override;
6667  virtual unsigned get_anyKind() const override;
6668 public:
6670  virtual ~SgAsmMipsInstruction();
6671 
6672 public:
6675 
6676 public:
6678  SgAsmMipsInstruction(rose_addr_t const& address,
6679  std::string const& mnemonic,
6681 
6682 protected:
6689  void initializeProperties();
6690 #endif // SgAsmMipsInstruction_OTHERS
6691 #ifdef DOCUMENTATION
6692 };
6693 #endif // DOCUMENTATION
6694 
6695 
6697 // SgAsmMemoryReferenceExpression -- MACHINE GENERATED; DO NOT MODIFY --
6699 
6700 DECLARE_LEAF_CLASS(AsmMemoryReferenceExpression);
6701 IS_SERIALIZABLE(AsmMemoryReferenceExpression);
6702 
6703 #ifdef DOCUMENTATION
6704 
6706 #endif // DOCUMENTATION
6707 
6708 #ifndef DOCUMENTATION
6709  AsmMemoryReferenceExpression.setDataPrototype(
6710  "SgAsmExpression*", "address", "= nullptr",
6711  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6712 #endif // !DOCUMENTATION
6713 
6714 #ifndef DOCUMENTATION
6715  AsmMemoryReferenceExpression.setDataPrototype(
6716  "SgAsmExpression*", "segment", "= nullptr",
6717  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
6718 #endif // !DOCUMENTATION
6719 
6720  DECLARE_OTHERS(AsmMemoryReferenceExpression);
6721 #if defined(SgAsmMemoryReferenceExpression_OTHERS) || defined(DOCUMENTATION)
6722 
6723  //----------------------- Boost serialization for SgAsmMemoryReferenceExpression -----------------------
6724 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6725 private:
6726  friend class boost::serialization::access;
6727 
6728  template<class S>
6729  void serialize(S &s, const unsigned /*version*/) {
6730  debugSerializationBegin("SgAsmMemoryReferenceExpression");
6731  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExpression);
6732  s & BOOST_SERIALIZATION_NVP(p_address);
6733  s & BOOST_SERIALIZATION_NVP(p_segment);
6734  debugSerializationEnd("SgAsmMemoryReferenceExpression");
6735  }
6736 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6737 
6738 public:
6746  SgAsmExpression* const& get_address() const;
6747  void set_address(SgAsmExpression* const&);
6750 public:
6758  SgAsmExpression* const& get_segment() const;
6759  void set_segment(SgAsmExpression* const&);
6762 public:
6765 
6766 public:
6769 
6770 public:
6773  SgAsmExpression* const& segment);
6774 
6775 protected:
6782  void initializeProperties();
6783 #endif // SgAsmMemoryReferenceExpression_OTHERS
6784 #ifdef DOCUMENTATION
6785 };
6786 #endif // DOCUMENTATION
6787 
6788 
6790 // SgAsmM68kInstruction -- MACHINE GENERATED; DO NOT MODIFY --
6792 
6793 DECLARE_LEAF_CLASS(AsmM68kInstruction);
6794 IS_SERIALIZABLE(AsmM68kInstruction);
6795 
6796 DECLARE_HEADERS(AsmM68kInstruction);
6797 #if defined(SgAsmM68kInstruction_HEADERS) || defined(DOCUMENTATION)
6798 #include <Rose/BinaryAnalysis/InstructionEnumsM68k.h>
6799 #endif // SgAsmM68kInstruction_HEADERS
6800 
6801 #ifdef DOCUMENTATION
6803 #endif // DOCUMENTATION
6804 
6805 #ifndef DOCUMENTATION
6806  AsmM68kInstruction.setDataPrototype(
6807  "Rose::BinaryAnalysis::M68kInstructionKind", "kind", "= Rose::BinaryAnalysis::m68k_unknown_instruction",
6808  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6809 #endif // !DOCUMENTATION
6810 
6811  DECLARE_OTHERS(AsmM68kInstruction);
6812 #if defined(SgAsmM68kInstruction_OTHERS) || defined(DOCUMENTATION)
6813 
6814  //----------------------- Boost serialization for SgAsmM68kInstruction -----------------------
6815 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6816 private:
6817  friend class boost::serialization::access;
6818 
6819  template<class S>
6820  void serialize(S &s, const unsigned /*version*/) {
6821  debugSerializationBegin("SgAsmM68kInstruction");
6822  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmInstruction);
6823  s & BOOST_SERIALIZATION_NVP(p_kind);
6824  debugSerializationEnd("SgAsmM68kInstruction");
6825  }
6826 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6827 public:
6828 public:
6838 public:
6839  // Overrides are documented in the base class
6840  virtual std::string description() const override;
6841  virtual bool terminatesBasicBlock() override;
6842  virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*> &insns,
6843  rose_addr_t *target/*out*/, rose_addr_t *ret/*out*/) override;
6844  virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&,
6845  rose_addr_t *target, rose_addr_t *ret) override;
6846  virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*> &insns) override;
6847  virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*> &insns) override;
6848  virtual Sawyer::Optional<rose_addr_t> branchTarget() override;
6849  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete) override;
6850  virtual Rose::BinaryAnalysis::AddressSet getSuccessors(const std::vector<SgAsmInstruction*>&,
6851  bool &complete,
6852  const Rose::BinaryAnalysis::MemoryMap::Ptr &initial_memory =
6854  virtual bool isUnknown() const override;
6855  virtual unsigned get_anyKind() const override;
6856 public:
6858  virtual ~SgAsmM68kInstruction();
6859 
6860 public:
6863 
6864 public:
6866  SgAsmM68kInstruction(rose_addr_t const& address,
6867  std::string const& mnemonic,
6869 
6870 protected:
6877  void initializeProperties();
6878 #endif // SgAsmM68kInstruction_OTHERS
6879 #ifdef DOCUMENTATION
6880 };
6881 #endif // DOCUMENTATION
6882 
6883 
6885 // SgAsmLESectionTable -- MACHINE GENERATED; DO NOT MODIFY --
6887 
6888 DECLARE_LEAF_CLASS(AsmLESectionTable);
6889 IS_SERIALIZABLE(AsmLESectionTable);
6890 
6891 #ifdef DOCUMENTATION
6893 #endif // DOCUMENTATION
6894 
6895  DECLARE_OTHERS(AsmLESectionTable);
6896 #if defined(SgAsmLESectionTable_OTHERS) || defined(DOCUMENTATION)
6897 
6898  //----------------------- Boost serialization for SgAsmLESectionTable -----------------------
6899 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6900 private:
6901  friend class boost::serialization::access;
6902 
6903  template<class S>
6904  void serialize(S &s, const unsigned /*version*/) {
6905  debugSerializationBegin("SgAsmLESectionTable");
6906  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
6907  debugSerializationEnd("SgAsmLESectionTable");
6908  }
6909 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
6910 public:
6911  SgAsmLESectionTable(SgAsmLEFileHeader *fhdr, rose_addr_t offset, rose_addr_t size);
6912  virtual void unparse(std::ostream&) const override;
6913  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
6914 public:
6916  virtual ~SgAsmLESectionTable();
6917 
6918 public:
6921 
6922 protected:
6929  void initializeProperties();
6930 #endif // SgAsmLESectionTable_OTHERS
6931 #ifdef DOCUMENTATION
6932 };
6933 #endif // DOCUMENTATION
6934 
6935 
6937 // SgAsmLESectionTableEntry -- MACHINE GENERATED; DO NOT MODIFY --
6939 
6940 DECLARE_LEAF_CLASS(AsmLESectionTableEntry);
6941 IS_SERIALIZABLE(AsmLESectionTableEntry);
6942 
6943 DECLARE_HEADERS(AsmLESectionTableEntry);
6944 #if defined(SgAsmLESectionTableEntry_HEADERS) || defined(DOCUMENTATION)
6945 #include <Rose/BinaryAnalysis/ByteOrder.h>
6946 #endif // SgAsmLESectionTableEntry_HEADERS
6947 
6948 #ifdef DOCUMENTATION
6950 #endif // DOCUMENTATION
6951 
6952 #ifndef DOCUMENTATION
6953  AsmLESectionTableEntry.setDataPrototype(
6954  "unsigned", "flags", "= 0",
6955  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6956 #endif // !DOCUMENTATION
6957 
6958 #ifndef DOCUMENTATION
6959  AsmLESectionTableEntry.setDataPrototype(
6960  "unsigned", "pagemap_index", "= 0",
6961  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6962 #endif // !DOCUMENTATION
6963 
6964 #ifndef DOCUMENTATION
6965  AsmLESectionTableEntry.setDataPrototype(
6966  "unsigned", "pagemap_nentries", "= 0",
6967  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6968 #endif // !DOCUMENTATION
6969 
6970 #ifndef DOCUMENTATION
6971  AsmLESectionTableEntry.setDataPrototype(
6972  "unsigned", "res1", "= 0",
6973  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6974 #endif // !DOCUMENTATION
6975 
6976 #ifndef DOCUMENTATION
6977  AsmLESectionTableEntry.setDataPrototype(
6978  "rose_addr_t", "mapped_size", "= 0",
6979  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6980 #endif // !DOCUMENTATION
6981 
6982 #ifndef DOCUMENTATION
6983  AsmLESectionTableEntry.setDataPrototype(
6984  "rose_addr_t", "base_addr", "= 0",
6985  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
6986 #endif // !DOCUMENTATION
6987 
6988  DECLARE_OTHERS(AsmLESectionTableEntry);
6989 #if defined(SgAsmLESectionTableEntry_OTHERS) || defined(DOCUMENTATION)
6990 
6991  //----------------------- Boost serialization for SgAsmLESectionTableEntry -----------------------
6992 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
6993 private:
6994  friend class boost::serialization::access;
6995 
6996  template<class S>
6997  void serialize(S &s, const unsigned /*version*/) {
6998  debugSerializationBegin("SgAsmLESectionTableEntry");
6999  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
7000  s & BOOST_SERIALIZATION_NVP(p_flags);
7001  s & BOOST_SERIALIZATION_NVP(p_pagemap_index);
7002  s & BOOST_SERIALIZATION_NVP(p_pagemap_nentries);
7003  s & BOOST_SERIALIZATION_NVP(p_res1);
7004  s & BOOST_SERIALIZATION_NVP(p_mapped_size);
7005  s & BOOST_SERIALIZATION_NVP(p_base_addr);
7006  debugSerializationEnd("SgAsmLESectionTableEntry");
7007  }
7008 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7009  // Local types
7012 public:
7013 #ifdef _MSC_VER
7014 # pragma pack (1)
7015 #endif
7016  /* File format of a section table entry. Fields are big- or little-endian depending on file header. */
7018  uint32_t mapped_size; /* 0x00 virtual segment size in bytes */
7019  uint32_t base_addr; /* 0x04 relocation base address */
7020  uint32_t flags; /* 0x08 bit flags, see LESectionFlags */
7021  uint32_t pagemap_index; /* 0x0c */
7022  uint32_t pagemap_nentries; /* 0x10 number of entries in the page map */
7023  uint32_t res1; /* 0x14 reserved */
7024  } /* 0x18 */
7025 // DQ (3/7/2013): Adding support to restrict visability to SWIG.
7026 #ifndef SWIG
7027 #ifndef _MSC_VER
7028  __attribute__((packed))
7029 #endif
7030 #endif
7031  ;
7032 #ifdef _MSC_VER
7033 # pragma pack ()
7034 #endif
7035 
7036  /* SF_BIG_BIT: The "big/default" bit, for data segments, controls the setting of the Big bit in the segment descriptor. (The
7037  * Big bit, or B-bit, determines whether ESP or SP is used as the stack pointer.) For code segments, this bit
7038  * controls the setting of the Default bit in the segment descriptor. (The Default bit, or D-bit, determines
7039  * whether the default word size is 32-bits or 16-bits. It also affects the interpretation of the instruction
7040  * stream.) */
7042  SF_RESERVED = 0xffff0800, /* Reserved bits (FIXME) */
7043 
7044  SF_READABLE = 0x00000001,
7045  SF_WRITABLE = 0x00000002,
7046  SF_EXECUTABLE = 0x00000004,
7048  SF_RESOURCE = 0x00000008,
7049  SF_DISCARDABLE = 0x00000010,
7050  SF_SHARED = 0x00000020,
7051  SF_PRELOAD_PAGES = 0x00000040,
7052  SF_INVALID_PAGES = 0x00000080,
7054  SF_TYPE_MASK = 0x00000300, /*NO_STRINGIFY*/
7055  SF_TYPE_NORMAL = 0x00000000,
7056  SF_TYPE_ZERO = 0x00000100,
7057  SF_TYPE_RESIDENT = 0x00000200,
7058  SF_TYPE_RESCONT = 0x00000300,
7060  SF_RES_LONG_LOCK = 0x00000400,
7061  SF_1616_ALIAS = 0x00001000,
7062  SF_BIG_BIT = 0x00002000,
7063  SF_CODE_CONFORM = 0x00004000,
7064  SF_IO_PRIV = 0x00008000
7065  };
7066 
7068  // Properties
7070 public:
7071  unsigned const& get_flags() const;
7072  void set_flags(unsigned const&);
7073 
7074 public:
7075  unsigned const& get_pagemap_index() const;
7076  void set_pagemap_index(unsigned const&);
7077 
7078 public:
7079  unsigned const& get_pagemap_nentries() const;
7080  void set_pagemap_nentries(unsigned const&);
7081 
7082 public:
7083  unsigned const& get_res1() const;
7084  void set_res1(unsigned const&);
7085 
7086 public:
7087  rose_addr_t const& get_mapped_size() const;
7088  void set_mapped_size(rose_addr_t const&);
7089 
7090 public:
7091  rose_addr_t const& get_base_addr() const;
7092  void set_base_addr(rose_addr_t const&);
7094  // Functions
7096 public:
7097  SgAsmLESectionTableEntry(Rose::BinaryAnalysis::ByteOrder::Endianness sex,
7099  void *encode(Rose::BinaryAnalysis::ByteOrder::Endianness, SgAsmLESectionTableEntry::LESectionTableEntry_disk*) const;
7100  virtual void dump(FILE *f, const char *prefix, ssize_t idx) const;
7101 public:
7103  virtual ~SgAsmLESectionTableEntry();
7104 
7105 public:
7108 
7109 protected:
7116  void initializeProperties();
7117 #endif // SgAsmLESectionTableEntry_OTHERS
7118 #ifdef DOCUMENTATION
7119 };
7120 #endif // DOCUMENTATION
7121 
7122 
7124 // SgAsmLESection -- MACHINE GENERATED; DO NOT MODIFY --
7126 
7127 DECLARE_LEAF_CLASS(AsmLESection);
7128 IS_SERIALIZABLE(AsmLESection);
7129 
7130 #ifdef DOCUMENTATION
7132 #endif // DOCUMENTATION
7133 
7134 #ifndef DOCUMENTATION
7135  AsmLESection.setDataPrototype(
7136  "SgAsmLESectionTableEntry*", "st_entry", "= NULL",
7137  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7138 #endif // !DOCUMENTATION
7139 
7140  DECLARE_OTHERS(AsmLESection);
7141 #if defined(SgAsmLESection_OTHERS) || defined(DOCUMENTATION)
7142 
7143  //----------------------- Boost serialization for SgAsmLESection -----------------------
7144 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
7145 private:
7146  friend class boost::serialization::access;
7147 
7148  template<class S>
7149  void serialize(S &s, const unsigned /*version*/) {
7150  debugSerializationBegin("SgAsmLESection");
7151  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
7152  s & BOOST_SERIALIZATION_NVP(p_st_entry);
7153  debugSerializationEnd("SgAsmLESection");
7154  }
7155 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7156 
7157 public:
7158  SgAsmLESectionTableEntry* const& get_st_entry() const;
7159  void set_st_entry(SgAsmLESectionTableEntry* const&);
7160 public:
7161  explicit SgAsmLESection(SgAsmLEFileHeader*);
7162  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
7163 public:
7165  virtual ~SgAsmLESection();
7166 
7167 public:
7169  SgAsmLESection();
7170 
7171 protected:
7178  void initializeProperties();
7179 #endif // SgAsmLESection_OTHERS
7180 #ifdef DOCUMENTATION
7181 };
7182 #endif // DOCUMENTATION
7183 
7184 
7186 // SgAsmLERelocTable -- MACHINE GENERATED; DO NOT MODIFY --
7188 
7189 DECLARE_LEAF_CLASS(AsmLERelocTable);
7190 IS_SERIALIZABLE(AsmLERelocTable);
7191 
7192 #ifdef DOCUMENTATION
7194 #endif // DOCUMENTATION
7195 
7196 #ifndef DOCUMENTATION
7197  AsmLERelocTable.setDataPrototype(
7198  "SgAsmLERelocEntryPtrList", "entries", "",
7199  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7200 #endif // !DOCUMENTATION
7201 
7202  DECLARE_OTHERS(AsmLERelocTable);
7203 #if defined(SgAsmLERelocTable_OTHERS) || defined(DOCUMENTATION)
7204 
7205  //----------------------- Boost serialization for SgAsmLERelocTable -----------------------
7206 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
7207 private:
7208  friend class boost::serialization::access;
7209 
7210  template<class S>
7211  void serialize(S &s, const unsigned /*version*/) {
7212  debugSerializationBegin("SgAsmLERelocTable");
7213  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
7214  s & BOOST_SERIALIZATION_NVP(p_entries);
7215  debugSerializationEnd("SgAsmLERelocTable");
7216  }
7217 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7218 
7219 public:
7220  SgAsmLERelocEntryPtrList const& get_entries() const;
7221  SgAsmLERelocEntryPtrList& get_entries();
7222  void set_entries(SgAsmLERelocEntryPtrList const&);
7223 public:
7224  SgAsmLERelocTable(SgAsmLEFileHeader *fhdr, rose_addr_t offset);
7225  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
7226 public:
7228  virtual ~SgAsmLERelocTable();
7229 
7230 public:
7233 
7234 protected:
7241  void initializeProperties();
7242 #endif // SgAsmLERelocTable_OTHERS
7243 #ifdef DOCUMENTATION
7244 };
7245 #endif // DOCUMENTATION
7246 
7247 
7249 // SgAsmLEPageTable -- MACHINE GENERATED; DO NOT MODIFY --
7251 
7252 DECLARE_LEAF_CLASS(AsmLEPageTable);
7253 IS_SERIALIZABLE(AsmLEPageTable);
7254 
7255 #ifdef DOCUMENTATION
7257 #endif // DOCUMENTATION
7258 
7259 #ifndef DOCUMENTATION
7260  AsmLEPageTable.setDataPrototype(
7261  "SgAsmLEPageTableEntryPtrList", "entries", "",
7262  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7263 #endif // !DOCUMENTATION
7264 
7265  DECLARE_OTHERS(AsmLEPageTable);
7266 #if defined(SgAsmLEPageTable_OTHERS) || defined(DOCUMENTATION)
7267 
7268  //----------------------- Boost serialization for SgAsmLEPageTable -----------------------
7269 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
7270 private:
7271  friend class boost::serialization::access;
7272 
7273  template<class S>
7274  void serialize(S &s, const unsigned /*version*/) {
7275  debugSerializationBegin("SgAsmLEPageTable");
7276  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
7277  s & BOOST_SERIALIZATION_NVP(p_entries);
7278  debugSerializationEnd("SgAsmLEPageTable");
7279  }
7280 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7281 
7282 public:
7283  SgAsmLEPageTableEntryPtrList const& get_entries() const;
7284  SgAsmLEPageTableEntryPtrList& get_entries();
7285  void set_entries(SgAsmLEPageTableEntryPtrList const&);
7286 public:
7287  SgAsmLEPageTable(SgAsmLEFileHeader *fhdr, rose_addr_t offset, rose_addr_t size);
7288  virtual void unparse(std::ostream&) const override;
7289  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
7290  SgAsmLEPageTableEntry *get_page(size_t idx);
7291 public:
7293  virtual ~SgAsmLEPageTable();
7294 
7295 public:
7297  SgAsmLEPageTable();
7298 
7299 protected:
7306  void initializeProperties();
7307 #endif // SgAsmLEPageTable_OTHERS
7308 #ifdef DOCUMENTATION
7309 };
7310 #endif // DOCUMENTATION
7311 
7312 
7314 // SgAsmLEPageTableEntry -- MACHINE GENERATED; DO NOT MODIFY --
7316 
7317 DECLARE_LEAF_CLASS(AsmLEPageTableEntry);
7318 IS_SERIALIZABLE(AsmLEPageTableEntry);
7319 
7320 DECLARE_HEADERS(AsmLEPageTableEntry);
7321 #if defined(SgAsmLEPageTableEntry_HEADERS) || defined(DOCUMENTATION)
7322 #include <Rose/BinaryAnalysis/ByteOrder.h>
7323 #endif // SgAsmLEPageTableEntry_HEADERS
7324 
7325 #ifdef DOCUMENTATION
7327 #endif // DOCUMENTATION
7328 
7329 #ifndef DOCUMENTATION
7330  AsmLEPageTableEntry.setDataPrototype(
7331  "unsigned", "pageno", "= 0",
7332  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7333 #endif // !DOCUMENTATION
7334 
7335 #ifndef DOCUMENTATION
7336  AsmLEPageTableEntry.setDataPrototype(
7337  "unsigned", "flags", "= 0",
7338  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7339 #endif // !DOCUMENTATION
7340 
7341  DECLARE_OTHERS(AsmLEPageTableEntry);
7342 #if defined(SgAsmLEPageTableEntry_OTHERS) || defined(DOCUMENTATION)
7343 
7344  //----------------------- Boost serialization for SgAsmLEPageTableEntry -----------------------
7345 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
7346 private:
7347  friend class boost::serialization::access;
7348 
7349  template<class S>
7350  void serialize(S &s, const unsigned /*version*/) {
7351  debugSerializationBegin("SgAsmLEPageTableEntry");
7352  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
7353  s & BOOST_SERIALIZATION_NVP(p_pageno);
7354  s & BOOST_SERIALIZATION_NVP(p_flags);
7355  debugSerializationEnd("SgAsmLEPageTableEntry");
7356  }
7357 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7358  // Local types
7361 public:
7362  /* The object page table provides information about a logical page in a section. A logical page may be an enumerated page, a
7363  * pseudo page, or an iterated page. The page table allows for efficient access to a page when a page fault occurs, while still
7364  * allowing the physical page to be located in the preload page, demand load page, or iterated data page sections of the
7365  * executable file. Entries in the page table use 1-origin indices. This table is parallel with the Fixup Page Table (they are
7366  * both indexed by the logical page number). */
7367 
7368 #ifdef _MSC_VER
7369 # pragma pack (1)
7370 #endif
7371  /* File format for a page table entry */
7373  uint16_t pageno_hi;
7374  unsigned char pageno_lo;
7375  unsigned char flags;
7376  }
7377 // DQ (3/7/2013): Adding support to restrict visability to SWIG.
7378 #ifndef SWIG
7379 #ifndef _MSC_VER
7380  __attribute__((packed))
7381 #endif
7382 #endif
7383  ;
7384 #ifdef _MSC_VER
7385 # pragma pack ()
7386 #endif
7387 
7389  // Properties
7391 public:
7392  unsigned const& get_pageno() const;
7393  void set_pageno(unsigned const&);
7394 
7395 public:
7396  unsigned const& get_flags() const;
7397  void set_flags(unsigned const&);
7399  // Functions
7401 public:
7402  SgAsmLEPageTableEntry(Rose::BinaryAnalysis::ByteOrder::Endianness sex,
7404  void dump(FILE*, const char *prefix, ssize_t idx) const;
7405  void *encode(Rose::BinaryAnalysis::ByteOrder::Endianness, SgAsmLEPageTableEntry::LEPageTableEntry_disk*) const;
7406 public:
7408  virtual ~SgAsmLEPageTableEntry();
7409 
7410 public:
7413 
7414 protected:
7421  void initializeProperties();
7422 #endif // SgAsmLEPageTableEntry_OTHERS
7423 #ifdef DOCUMENTATION
7424 };
7425 #endif // DOCUMENTATION
7426 
7427 
7429 // SgAsmLENameTable -- MACHINE GENERATED; DO NOT MODIFY --
7431 
7432 DECLARE_LEAF_CLASS(AsmLENameTable);
7433 IS_SERIALIZABLE(AsmLENameTable);
7434 
7435 #ifdef DOCUMENTATION
7437 #endif // DOCUMENTATION
7438 
7439 #ifndef DOCUMENTATION
7440  AsmLENameTable.setDataPrototype(
7441  "SgStringList", "names", "",
7442  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7443 #endif // !DOCUMENTATION
7444 
7445 #ifndef DOCUMENTATION
7446  AsmLENameTable.setDataPrototype(
7447  "SgUnsignedList", "ordinals", "",
7448  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7449 #endif // !DOCUMENTATION
7450 
7451  DECLARE_OTHERS(AsmLENameTable);
7452 #if defined(SgAsmLENameTable_OTHERS) || defined(DOCUMENTATION)
7453 
7454  //----------------------- Boost serialization for SgAsmLENameTable -----------------------
7455 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
7456 private:
7457  friend class boost::serialization::access;
7458 
7459  template<class S>
7460  void serialize(S &s, const unsigned /*version*/) {
7461  debugSerializationBegin("SgAsmLENameTable");
7462  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
7463  s & BOOST_SERIALIZATION_NVP(p_names);
7464  s & BOOST_SERIALIZATION_NVP(p_ordinals);
7465  debugSerializationEnd("SgAsmLENameTable");
7466  }
7467 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7468 
7469 public:
7470  SgStringList const& get_names() const;
7471  void set_names(SgStringList const&);
7472 
7473 public:
7474  SgUnsignedList const& get_ordinals() const;
7475  void set_ordinals(SgUnsignedList const&);
7476 public:
7477  /* This table contains a module name followed by the list of exported function names. Each name is associated with an "ordinal"
7478  * which serves as an index into the Entry Table. The ordinal for the first string (module name) is meaningless and should be
7479  * zero. In the non-resident name table the first entry is a module description and the functions are not always resident in
7480  * system memory (they are discardable). */
7481  SgAsmLENameTable(SgAsmLEFileHeader *fhdr, rose_addr_t offset);
7482  virtual void unparse(std::ostream&) const override;
7483  virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
7484 public:
7486  virtual ~SgAsmLENameTable();
7487 
7488 public:
7490  SgAsmLENameTable();
7491 
7492 protected:
7499  void initializeProperties();
7500 #endif // SgAsmLENameTable_OTHERS
7501 #ifdef DOCUMENTATION
7502 };
7503 #endif // DOCUMENTATION
7504 
7505 
7507 // SgAsmLEFileHeader -- MACHINE GENERATED; DO NOT MODIFY --
7509 
7510 DECLARE_LEAF_CLASS(AsmLEFileHeader);
7511 IS_SERIALIZABLE(AsmLEFileHeader);
7512 
7513 DECLARE_HEADERS(AsmLEFileHeader);
7514 #if defined(SgAsmLEFileHeader_HEADERS) || defined(DOCUMENTATION)
7515 #include <Rose/BinaryAnalysis/ByteOrder.h>
7516 #endif // SgAsmLEFileHeader_HEADERS
7517 
7518 #ifdef DOCUMENTATION
7520 #endif // DOCUMENTATION
7521 
7522 #ifndef DOCUMENTATION
7523  AsmLEFileHeader.setDataPrototype(
7524  "unsigned", "e_byte_order", "= 0",
7525  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7526 #endif // !DOCUMENTATION
7527 
7528 #ifndef DOCUMENTATION
7529  AsmLEFileHeader.setDataPrototype(
7530  "unsigned", "e_word_order", "= 0",
7531  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7532 #endif // !DOCUMENTATION
7533 
7534 #ifndef DOCUMENTATION
7535  AsmLEFileHeader.setDataPrototype(
7536  "unsigned", "e_format_level", "= 0",
7537  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7538 #endif // !DOCUMENTATION
7539 
7540 #ifndef DOCUMENTATION
7541  AsmLEFileHeader.setDataPrototype(
7542  "unsigned", "e_cpu_type", "= 0",
7543  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7544 #endif // !DOCUMENTATION
7545 
7546 #ifndef DOCUMENTATION
7547  AsmLEFileHeader.setDataPrototype(
7548  "unsigned", "e_os_type", "= 0",
7549  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7550 #endif // !DOCUMENTATION
7551 
7552 #ifndef DOCUMENTATION
7553  AsmLEFileHeader.setDataPrototype(
7554  "unsigned", "e_module_version", "= 0",
7555  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7556 #endif // !DOCUMENTATION
7557 
7558 #ifndef DOCUMENTATION
7559  AsmLEFileHeader.setDataPrototype(
7560  "unsigned", "e_flags", "= 0",
7561  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7562 #endif // !DOCUMENTATION
7563 
7564 #ifndef DOCUMENTATION
7565  AsmLEFileHeader.setDataPrototype(
7566  "unsigned", "e_eip_section", "= 0",
7567  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7568 #endif // !DOCUMENTATION
7569 
7570 #ifndef DOCUMENTATION
7571  AsmLEFileHeader.setDataPrototype(
7572  "unsigned", "e_esp_section", "= 0",
7573  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7574 #endif // !DOCUMENTATION
7575 
7576 #ifndef DOCUMENTATION
7577  AsmLEFileHeader.setDataPrototype(
7578  "unsigned", "e_last_page_size", "= 0",
7579  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7580 #endif // !DOCUMENTATION
7581 
7582 #ifndef DOCUMENTATION
7583  AsmLEFileHeader.setDataPrototype(
7584  "unsigned", "e_page_offset_shift", "= 0",
7585  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7586 #endif // !DOCUMENTATION
7587 
7588 #ifndef DOCUMENTATION
7589  AsmLEFileHeader.setDataPrototype(
7590  "unsigned", "e_fixup_sect_cksum", "= 0",
7591  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7592 #endif // !DOCUMENTATION
7593 
7594 #ifndef DOCUMENTATION
7595  AsmLEFileHeader.setDataPrototype(
7596  "unsigned", "e_loader_sect_cksum", "= 0",
7597  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7598 #endif // !DOCUMENTATION
7599 
7600 #ifndef DOCUMENTATION
7601  AsmLEFileHeader.setDataPrototype(
7602  "unsigned", "e_secttab_nentries", "= 0",
7603  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7604 #endif // !DOCUMENTATION
7605 
7606 #ifndef DOCUMENTATION
7607  AsmLEFileHeader.setDataPrototype(
7608  "unsigned", "e_rsrctab_nentries", "= 0",
7609  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7610 #endif // !DOCUMENTATION
7611 
7612 #ifndef DOCUMENTATION
7613  AsmLEFileHeader.setDataPrototype(
7614  "unsigned", "e_fmtdirtab_nentries", "= 0",
7615  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7616 #endif // !DOCUMENTATION
7617 
7618 #ifndef DOCUMENTATION
7619  AsmLEFileHeader.setDataPrototype(
7620  "unsigned", "e_import_modtab_nentries", "= 0",
7621  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7622 #endif // !DOCUMENTATION
7623 
7624 #ifndef DOCUMENTATION
7625  AsmLEFileHeader.setDataPrototype(
7626  "unsigned", "e_preload_npages", "= 0",
7627  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7628 #endif // !DOCUMENTATION
7629 
7630 #ifndef DOCUMENTATION
7631  AsmLEFileHeader.setDataPrototype(
7632  "unsigned", "e_nonresnametab_size", "= 0",
7633  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7634 #endif // !DOCUMENTATION
7635 
7636 #ifndef DOCUMENTATION
7637  AsmLEFileHeader.setDataPrototype(
7638  "unsigned", "e_nonresnametab_cksum", "= 0",
7639  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7640 #endif // !DOCUMENTATION
7641 
7642 #ifndef DOCUMENTATION
7643  AsmLEFileHeader.setDataPrototype(
7644  "unsigned", "e_auto_ds_section", "= 0",
7645  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7646 #endif // !DOCUMENTATION
7647 
7648 #ifndef DOCUMENTATION
7649  AsmLEFileHeader.setDataPrototype(
7650  "unsigned", "e_debug_info_size", "= 0",
7651  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7652 #endif // !DOCUMENTATION
7653 
7654 #ifndef DOCUMENTATION
7655  AsmLEFileHeader.setDataPrototype(
7656  "unsigned", "e_num_instance_preload", "= 0",
7657  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7658 #endif // !DOCUMENTATION
7659 
7660 #ifndef DOCUMENTATION
7661  AsmLEFileHeader.setDataPrototype(
7662  "unsigned", "e_num_instance_demand", "= 0",
7663  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7664 #endif // !DOCUMENTATION
7665 
7666 #ifndef DOCUMENTATION
7667  AsmLEFileHeader.setDataPrototype(
7668  "unsigned", "e_heap_size", "= 0",
7669  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7670 #endif // !DOCUMENTATION
7671 
7672 #ifndef DOCUMENTATION
7673  AsmLEFileHeader.setDataPrototype(
7674  "rose_addr_t", "e_npages", "= 0",
7675  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7676 #endif // !DOCUMENTATION
7677 
7678 #ifndef DOCUMENTATION
7679  AsmLEFileHeader.setDataPrototype(
7680  "rose_addr_t", "e_eip", "= 0",
7681  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7682 #endif // !DOCUMENTATION
7683 
7684 #ifndef DOCUMENTATION
7685  AsmLEFileHeader.setDataPrototype(
7686  "rose_addr_t", "e_esp", "= 0",
7687  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7688 #endif // !DOCUMENTATION
7689 
7690 #ifndef DOCUMENTATION
7691  AsmLEFileHeader.setDataPrototype(
7692  "rose_addr_t", "e_page_size", "= 0",
7693  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7694 #endif // !DOCUMENTATION
7695 
7696 #ifndef DOCUMENTATION
7697  AsmLEFileHeader.setDataPrototype(
7698  "rose_addr_t", "e_fixup_sect_size", "= 0",
7699  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7700 #endif // !DOCUMENTATION
7701 
7702 #ifndef DOCUMENTATION
7703  AsmLEFileHeader.setDataPrototype(
7704  "rose_addr_t", "e_loader_sect_size", "= 0",
7705  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7706 #endif // !DOCUMENTATION
7707 
7708 #ifndef DOCUMENTATION
7709  AsmLEFileHeader.setDataPrototype(
7710  "rose_addr_t", "e_secttab_rfo", "= 0",
7711  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7712 #endif // !DOCUMENTATION
7713 
7714 #ifndef DOCUMENTATION
7715  AsmLEFileHeader.setDataPrototype(
7716  "rose_addr_t", "e_pagetab_rfo", "= 0",
7717  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7718 #endif // !DOCUMENTATION
7719 
7720 #ifndef DOCUMENTATION
7721  AsmLEFileHeader.setDataPrototype(
7722  "rose_addr_t", "e_iterpages_offset", "= 0",
7723  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7724 #endif // !DOCUMENTATION
7725 
7726 #ifndef DOCUMENTATION
7727  AsmLEFileHeader.setDataPrototype(
7728  "rose_addr_t", "e_rsrctab_rfo", "= 0",
7729  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7730 #endif // !DOCUMENTATION
7731 
7732 #ifndef DOCUMENTATION
7733  AsmLEFileHeader.setDataPrototype(
7734  "rose_addr_t", "e_resnametab_rfo", "= 0",
7735  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7736 #endif // !DOCUMENTATION
7737 
7738 #ifndef DOCUMENTATION
7739  AsmLEFileHeader.setDataPrototype(
7740  "rose_addr_t", "e_entrytab_rfo", "= 0",
7741  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7742 #endif // !DOCUMENTATION
7743 
7744 #ifndef DOCUMENTATION
7745  AsmLEFileHeader.setDataPrototype(
7746  "rose_addr_t", "e_fmtdirtab_rfo", "= 0",
7747  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7748 #endif // !DOCUMENTATION
7749 
7750 #ifndef DOCUMENTATION
7751  AsmLEFileHeader.setDataPrototype(
7752  "rose_addr_t", "e_fixup_pagetab_rfo", "= 0",
7753  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7754 #endif // !DOCUMENTATION
7755 
7756 #ifndef DOCUMENTATION
7757  AsmLEFileHeader.setDataPrototype(
7758  "rose_addr_t", "e_fixup_rectab_rfo", "= 0",
7759  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7760 #endif // !DOCUMENTATION
7761 
7762 #ifndef DOCUMENTATION
7763  AsmLEFileHeader.setDataPrototype(
7764  "rose_addr_t", "e_import_modtab_rfo", "= 0",
7765  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7766 #endif // !DOCUMENTATION
7767 
7768 #ifndef DOCUMENTATION
7769  AsmLEFileHeader.setDataPrototype(
7770  "rose_addr_t", "e_import_proctab_rfo", "= 0",
7771  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7772 #endif // !DOCUMENTATION
7773 
7774 #ifndef DOCUMENTATION
7775  AsmLEFileHeader.setDataPrototype(
7776  "rose_addr_t", "e_ppcksumtab_rfo", "= 0",
7777  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7778 #endif // !DOCUMENTATION
7779 
7780 #ifndef DOCUMENTATION
7781  AsmLEFileHeader.setDataPrototype(
7782  "rose_addr_t", "e_data_pages_offset", "= 0",
7783  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7784 #endif // !DOCUMENTATION
7785 
7786 #ifndef DOCUMENTATION
7787  AsmLEFileHeader.setDataPrototype(
7788  "rose_addr_t", "e_nonresnametab_offset", "= 0",
7789  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7790 #endif // !DOCUMENTATION
7791 
7792 #ifndef DOCUMENTATION
7793  AsmLEFileHeader.setDataPrototype(
7794  "rose_addr_t", "e_debug_info_rfo", "= 0",
7795  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7796 #endif // !DOCUMENTATION
7797 
7798 #ifndef DOCUMENTATION
7799  AsmLEFileHeader.setDataPrototype(
7800  "SgAsmDOSExtendedHeader*", "dos2_header", "= nullptr",
7801  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7802 #endif // !DOCUMENTATION
7803 
7804 #ifndef DOCUMENTATION
7805  AsmLEFileHeader.setDataPrototype(
7806  "SgAsmLESectionTable*", "section_table", "= nullptr",
7807  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE, COPY_DATA);
7808 #endif // !DOCUMENTATION
7809 
7810 #ifndef DOCUMENTATION
7811  AsmLEFileHeader.setDataPrototype(
7812  "SgAsmLEPageTable*", "page_table", "= nullptr",
7813  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7814 #endif // !DOCUMENTATION
7815 
7816 #ifndef DOCUMENTATION
7817  AsmLEFileHeader.setDataPrototype(
7818  "SgAsmLENameTable*", "resname_table", "= nullptr",
7819  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7820 #endif // !DOCUMENTATION
7821 
7822 #ifndef DOCUMENTATION
7823  AsmLEFileHeader.setDataPrototype(
7824  "SgAsmLENameTable*", "nonresname_table", "= nullptr",
7825  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7826 #endif // !DOCUMENTATION
7827 
7828 #ifndef DOCUMENTATION
7829  AsmLEFileHeader.setDataPrototype(
7830  "SgAsmLEEntryTable*", "entry_table", "= nullptr",
7831  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7832 #endif // !DOCUMENTATION
7833 
7834 #ifndef DOCUMENTATION
7835  AsmLEFileHeader.setDataPrototype(
7836  "SgAsmLERelocTable*", "reloc_table", "= nullptr",
7837  NO_CONSTRUCTOR_PARAMETER, NO_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE, COPY_DATA);
7838 #endif // !DOCUMENTATION
7839 
7840  DECLARE_OTHERS(AsmLEFileHeader);
7841 #if defined(SgAsmLEFileHeader_OTHERS) || defined(DOCUMENTATION)
7842 
7843  //----------------------- Boost serialization for SgAsmLEFileHeader -----------------------
7844 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
7845 private:
7846  friend class boost::serialization::access;
7847 
7848  template<class S>
7849  void serialize(S &s, const unsigned /*version*/) {
7850  debugSerializationBegin("SgAsmLEFileHeader");
7851  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
7852  s & BOOST_SERIALIZATION_NVP(p_e_byte_order);
7853  s & BOOST_SERIALIZATION_NVP(p_e_word_order);
7854  s & BOOST_SERIALIZATION_NVP(p_e_format_level);
7855  s & BOOST_SERIALIZATION_NVP(p_e_cpu_type);
7856  s & BOOST_SERIALIZATION_NVP(p_e_os_type);
7857  s & BOOST_SERIALIZATION_NVP(p_e_module_version);
7858  s & BOOST_SERIALIZATION_NVP(p_e_flags);
7859  s & BOOST_SERIALIZATION_NVP(p_e_eip_section);
7860  s & BOOST_SERIALIZATION_NVP(p_e_esp_section);
7861  s & BOOST_SERIALIZATION_NVP(p_e_last_page_size);
7862  s & BOOST_SERIALIZATION_NVP(p_e_page_offset_shift);
7863  s & BOOST_SERIALIZATION_NVP(p_e_fixup_sect_cksum);
7864  s & BOOST_SERIALIZATION_NVP(p_e_loader_sect_cksum);
7865  s & BOOST_SERIALIZATION_NVP(p_e_secttab_nentries);
7866  s & BOOST_SERIALIZATION_NVP(p_e_rsrctab_nentries);
7867  s & BOOST_SERIALIZATION_NVP(p_e_fmtdirtab_nentries);
7868  s & BOOST_SERIALIZATION_NVP(p_e_import_modtab_nentries);
7869  s & BOOST_SERIALIZATION_NVP(p_e_preload_npages);
7870  s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_size);
7871  s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_cksum);
7872  s & BOOST_SERIALIZATION_NVP(p_e_auto_ds_section);
7873  s & BOOST_SERIALIZATION_NVP(p_e_debug_info_size);
7874  s & BOOST_SERIALIZATION_NVP(p_e_num_instance_preload);
7875  s & BOOST_SERIALIZATION_NVP(p_e_num_instance_demand);
7876  s & BOOST_SERIALIZATION_NVP(p_e_heap_size);
7877  s & BOOST_SERIALIZATION_NVP(p_e_npages);
7878  s & BOOST_SERIALIZATION_NVP(p_e_eip);
7879  s & BOOST_SERIALIZATION_NVP(p_e_esp);
7880  s & BOOST_SERIALIZATION_NVP(p_e_page_size);
7881  s & BOOST_SERIALIZATION_NVP(p_e_fixup_sect_size);
7882  s & BOOST_SERIALIZATION_NVP(p_e_loader_sect_size);
7883  s & BOOST_SERIALIZATION_NVP(p_e_secttab_rfo);
7884  s & BOOST_SERIALIZATION_NVP(p_e_pagetab_rfo);
7885  s & BOOST_SERIALIZATION_NVP(p_e_iterpages_offset);
7886  s & BOOST_SERIALIZATION_NVP(p_e_rsrctab_rfo);
7887  s & BOOST_SERIALIZATION_NVP(p_e_resnametab_rfo);
7888  s & BOOST_SERIALIZATION_NVP(p_e_entrytab_rfo);
7889  s & BOOST_SERIALIZATION_NVP(p_e_fmtdirtab_rfo);
7890  s & BOOST_SERIALIZATION_NVP(p_e_fixup_pagetab_rfo);
7891  s & BOOST_SERIALIZATION_NVP(p_e_fixup_rectab_rfo);
7892  s & BOOST_SERIALIZATION_NVP(p_e_import_modtab_rfo);
7893  s & BOOST_SERIALIZATION_NVP(p_e_import_proctab_rfo);
7894  s & BOOST_SERIALIZATION_NVP(p_e_ppcksumtab_rfo);
7895  s & BOOST_SERIALIZATION_NVP(p_e_data_pages_offset);
7896  s & BOOST_SERIALIZATION_NVP(p_e_nonresnametab_offset);
7897  s & BOOST_SERIALIZATION_NVP(p_e_debug_info_rfo);
7898  s & BOOST_SERIALIZATION_NVP(p_dos2_header);
7899  s & BOOST_SERIALIZATION_NVP(p_section_table);
7900  s & BOOST_SERIALIZATION_NVP(p_page_table);
7901  s & BOOST_SERIALIZATION_NVP(p_resname_table);
7902  s & BOOST_SERIALIZATION_NVP(p_nonresname_table);
7903  s & BOOST_SERIALIZATION_NVP(p_entry_table);
7904  s & BOOST_SERIALIZATION_NVP(p_reloc_table);
7905  debugSerializationEnd("SgAsmLEFileHeader");
7906  }
7907 #endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
7908  // Local types
7911 public:
7912 #ifdef _MSC_VER
7913 # pragma pack (1)
7914 #endif
7915  /* File format of an LE/LX File Header (they are identical except bytes 0x2c-0x2f) */
7917  unsigned char e_magic[2]; /* 0x00 magic number "LX" */
7918  unsigned char e_byte_order; /* 0x02 byte order (0=>little endian; otherwise big endian) */
7919  unsigned char e_word_order; /* 0x03 word order (0=>little endian; otherwise big endian) */
7920  uint32_t e_format_level; /* 0x04 LX file format version number */
7921  uint16_t e_cpu_type; /* 0x08 1=>80286, 2=>80386, 3=>80486,4=80586, etc. (see ctor) */
7922  uint16_t e_os_type; /* 0x0a 0=>unknown, 1=>0S/2, 2=>Windows, 3=>DOS 4.x, 4=>Windows 386 */
7923  uint32_t e_module_version; /* 0x0c user-specified module version number */
7924  uint32_t e_flags; /* 0x10 bit flags (see LXFileHeaderFlags) */
7925  uint32_t e_npages; /* 0x14 number of physically contained pages (see e_page_size) */
7926  uint32_t e_eip_section; /* 0x18 the section number to which e_eip is relative */
7927  uint32_t e_eip; /* 0x1c entry address relative to e_eip_section */
7928  uint32_t e_esp_section; /* 0x20 the section number to which e_esp is relative */
7929  uint32_t e_esp; /* 0x24 starting stack address relative to e_esp_section */
7930  uint32_t e_page_size; /* 0x28 page size in bytes */
7931  uint32_t e_lps_or_shift; /* 0x2c size of last page (LE) or shift for page table's page offset field (LX) */
7932  uint32_t e_fixup_sect_size; /* 0x30 total size of fixup info in bytes (fixup page/record tables + import names) */
7933  uint32_t e_fixup_sect_cksum; /* 0x34 cryptographic checksum of all fixup info, or zero */
7934  uint32_t e_loader_sect_size; /* 0x38 size of memory resident tables (section table through per-page checksum table) */
7935  uint32_t e_loader_sect_cksum; /* 0x3c cryptographic checksum for all loader info, or zero */
7936  uint32_t e_secttab_rfo; /* 0x40 offset of section table relative to this header */
7937  uint32_t e_secttab_nentries; /* 0x44 number of entries in section table */
7938  uint32_t e_pagetab_rfo; /* 0x48 section page table offset relative to this header */
7939  uint32_t e_iterpages_offset; /* 0x4c section iterated pages offset (absolute file offset) */
7940  uint32_t e_rsrctab_rfo; /* 0x50 offset of resource table relative to this header */
7941  uint32_t e_rsrctab_nentries; /* 0x54 number of entries in the resource table */
7942  uint32_t e_resnametab_rfo; /* 0x58 offset of resident name table relative to this header */
7943  uint32_t e_entrytab_rfo; /* 0x5c offset of entry table relative to this header */
7944  uint32_t e_fmtdirtab_rfo; /* 0x60 offset of module format directives relative to this header */
7945  uint32_t e_fmtdirtab_nentries; /* 0x64 number of entries in module format directives table */
7946  uint32_t e_fixup_pagetab_rfo; /* 0x68 offset of fixup page table relative to this header */
7947  uint32_t e_fixup_rectab_rfo; /* 0x6c offset of fixup record table relative to this header */
7948  uint32_t e_import_modtab_rfo; /* 0x70 offset of import module name table relative to this header */
7949  uint32_t e_import_modtab_nentries;/*0x74 number of entries in import module name table */
7950  uint32_t e_import_proctab_rfo; /* 0x78 offset of import procedure name table relative to this header */
7951  uint32_t e_ppcksumtab_rfo; /* 0x7c offset of per-page checksum table relative to this header */
7952  uint32_t e_data_pages_offset; /* 0x80 offset of data pages (absolute file offset) */
7953  uint32_t e_preload_npages; /* 0x84 number of preload pages (not respected by OS/2) */
7954  uint32_t e_nonresnametab_offset; /* 0x88 offset of non-resident name table (absolute file offset) */
7955  uint32_t e_nonresnametab_size; /* 0x8c size of non-resident name table in bytes */
7956  uint32_t e_nonresnametab_cksum; /* 0x90 cryptographic checksum of the non-resident name table */
7957  uint32_t e_auto_ds_section; /* 0x94 auto data segment section number (not used by 32-bit modules) */
7958  uint32_t e_debug_info_rfo; /* 0x98 offset of debug information relative to this header */
7959  uint32_t e_debug_info_size; /* 0x9c size of debug information in bytes */
7960  uint32_t e_num_instance_preload; /* 0xa0 number of instance data pages found in the preload section */
7961  uint32_t e_num_instance_demand; /* 0xa4 number of instance data pages found in the demand section */
7962  uint32_t e_heap_size; /* 0xa8 number of bytes added to auto data segment by loader (not used by 32-bit) */
7963  } /* 0xac */
7964 // DQ (3/7/2013): Adding support to restrict visability to SWIG.
7965 #ifndef SWIG
7966 #ifndef _MSC_VER
7967  __attribute__((packed))
7968 #endif
7969 #endif
7970  ;
7971 #ifdef _MSC_VER
7972 # pragma pack ()
7973 #endif
7974 
7975  enum LEFileHeaderFlags {
7976  HF_RESERVED = 0xbffc5ccb, /* Reserved bits */
7977  HF_PROC_LIB_INIT = 0x00000004, /* Per-process library initialization; not used for executables */
7978  HF_IFIXUPS_APPLIED = 0x00000010, /* Sections have preferred load addresses and internal relocs have been applied */
7979  HF_EFIXUPS_APPLIED = 0x00000020, /* External fixups for the module have been applied */
7980  HF_PM_WINDOW_NO = 0x00000100, /* Incompatible with PM windowing */
7981  HF_PM_WINDOW_OK = 0x00000200, /* Compatible with PM windowing */
7982  HF_PM_WINDOW_USE = 0x00000300, /* Uses PM windowing API */
7983  HF_NOT_LOADABLE = 0x00002000, /* Module is not loadable (has errors or incrementally linked) */
7984  HF_PROC_LIB_TERM = 0x40000000, /* Per-process library termination; not used for executables */
7985 
7986  HF_MODTYPE_MASK = 0x00038000, /* Module type mask */
7987  HF_MODTYPE_PROG = 0x00000000, /* Program module (other modules cannot link to this one) */
7988  HF_MODTYPE_LIB = 0x00008000, /* Library module */
7989  HF_MODTYPE_PLIB = 0x00018000, /* Protected memory library module */
7990  HF_MODTYPE_PDEV = 0x00020000, /* Physical device driver module */
7991  HF_MODTYPE_VDEV = 0x00028000 /* Virtual device driver module */
7992  };
7993 
7995  // Properties
7997 public:
7998  unsigned const& get_e_byte_order() const;
7999  void set_e_byte_order(unsigned const&);
8000 
8001 public:
8002  unsigned const& get_e_word_order() const;
8003  void set_e_word_order(unsigned const&);
8004 
8005 public:
8006  unsigned const& get_e_format_level() const;
8007  void set_e_format_level(unsigned const&);
8008 
8009 public:
8010  unsigned const& get_e_cpu_type() const;
8011  void set_e_cpu_type(unsigned const&);
8012 
8013 public:
8014  unsigned const& get_e_os_type() const;
8015  void set_e_os_type(unsigned const&);
8016 
8017 public:
8018  unsigned const& get_e_module_version() const;
8019  void set_e_module_version(unsigned const&);
8020 
8021 public:
8022  unsigned const& get_e_flags() const;
8023  void set_e_flags(unsigned const&);
8024 
8025 public:
8026  unsigned const& get_e_eip_section() const;
8027  void set_e_eip_section(unsigned const&);
8028 
8029 public:
8030  unsigned const& get_e_esp_section() const;
8031  void set_e_esp_section(