ROSE 0.11.145.147
SgAsmElfFileHeader.h
1
2#ifndef ROSE_SgAsmElfFileHeader_H
3#define ROSE_SgAsmElfFileHeader_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmGenericHeader.h>
7
8
9
10/* #line 1 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
11
12// WARNING -- GENERATED CODE -- DO NOT MODIFY THIS CODE -- WARNING!
13// This code is automatically generated for each
14// terminal and non-terminal within the defined
15// grammar. There is a simple way to change the
16// code to fix bugs etc. See the ROSE README file
17// for directions.
18
19// tps: (02/22/2010): Adding DLL export requirements
20#include "rosedll.h"
21
22// predeclarations for SgAsmElfFileHeader
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmElfFileHeader.h" */
25/* #line 21377 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/ByteOrder.h>
28
29
30/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
31
32/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
33
34#if !defined(DOCUMENTATION)
35// Class Definition for SgAsmElfFileHeader
36class ROSE_DLL_API SgAsmElfFileHeader : public SgAsmGenericHeader
37 {
38 public:
39
40
41/* #line 42 "../../../src/frontend/SageIII//SgAsmElfFileHeader.h" */
42
43 virtual SgNode* copy ( SgCopyHelp& help) const override;
44// Start of memberFunctionString
45/* #line 21484 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
46
47
48 //----------------------- Boost serialization for SgAsmElfFileHeader -----------------------
49#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
50private:
51 friend class boost::serialization::access;
52
53 template<class S>
54 void serialize(S &s, const unsigned /*version*/) {
55 debugSerializationBegin("SgAsmElfFileHeader");
56 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericHeader);
57 s & BOOST_SERIALIZATION_NVP(p_e_ident_file_class);
58 s & BOOST_SERIALIZATION_NVP(p_e_ident_data_encoding);
59 s & BOOST_SERIALIZATION_NVP(p_e_ident_file_version);
60 s & BOOST_SERIALIZATION_NVP(p_e_ident_padding);
61 s & BOOST_SERIALIZATION_NVP(p_e_type);
62 s & BOOST_SERIALIZATION_NVP(p_e_machine);
63 s & BOOST_SERIALIZATION_NVP(p_e_flags);
64 s & BOOST_SERIALIZATION_NVP(p_e_ehsize);
65 s & BOOST_SERIALIZATION_NVP(p_phextrasz);
66 s & BOOST_SERIALIZATION_NVP(p_e_phnum);
67 s & BOOST_SERIALIZATION_NVP(p_shextrasz);
68 s & BOOST_SERIALIZATION_NVP(p_e_shnum);
69 s & BOOST_SERIALIZATION_NVP(p_e_shstrndx);
70 s & BOOST_SERIALIZATION_NVP(p_sectionTable);
71 s & BOOST_SERIALIZATION_NVP(p_segmentTable);
72 debugSerializationEnd("SgAsmElfFileHeader");
73 }
74#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
76 // Local types
78public:
80 enum ObjectType {
81 ET_NONE = 0
82 ,ET_REL = 1
83 ,ET_EXEC = 2
84 ,ET_DYN = 3
85 ,ET_CORE = 4
87 ,ET_LOOS = 0xfe00
88 ,ET_HIOS = 0xfeff
89 ,ET_LOPROC = 0xff00
90 ,ET_HIPROC = 0xffff
91 };
92
93 // Some structures are used to represent certain things whose layout is very precise in binary files, thus we need to
94 // make sure the compiler doesn't insert alignment padding between the struct members. ROSE can be compiled on an
95 // architecture that has different alignment constraints than the architecture that these structs describe. GNU
96 // compilers have long used the attribute mechanism. Microsoft compilers on the other hand use pragmas. GCC versions
97 // 4.0 and earlier do not recognize the Microsoft pragmas and issue compiler errors when one is encountered.
98#ifdef _MSC_VER
99# pragma pack (1)
100#endif
101
107 struct Elf32FileHeader_disk {
108 unsigned char e_ident_magic[4];
109 unsigned char e_ident_file_class;
110 unsigned char e_ident_data_encoding;
111 unsigned char e_ident_file_version;
112 unsigned char e_ident_padding[9];
113 uint16_t e_type;
114 uint16_t e_machine;
115 uint32_t e_version;
116 uint32_t e_entry;
117 uint32_t e_phoff;
118 uint32_t e_shoff;
119 uint32_t e_flags;
120 uint16_t e_ehsize;
121 uint16_t e_phentsize;
122 uint16_t e_phnum;
123 uint16_t e_shentsize;
124 uint16_t e_shnum;
125 uint16_t e_shstrndx;
126 }
127#if !defined(SWIG) && !defined(_MSC_VER)
128 __attribute__((packed))
129#endif
130 ;
131
132 struct Elf64FileHeader_disk {
133 unsigned char e_ident_magic[4];
134 unsigned char e_ident_file_class;
135 unsigned char e_ident_data_encoding;
136 unsigned char e_ident_file_version;
137 unsigned char e_ident_padding[9];
138 uint16_t e_type;
139 uint16_t e_machine;
140 uint32_t e_version;
141 uint64_t e_entry;
142 uint64_t e_phoff;
143 uint64_t e_shoff;
144 uint32_t e_flags;
145 uint16_t e_ehsize;
146 uint16_t e_phentsize;
147 uint16_t e_phnum;
148 uint16_t e_shentsize;
149 uint16_t e_shnum;
150 uint16_t e_shstrndx;
151 }
152#if !defined(SWIG) && !defined(_MSC_VER)
153 __attribute__((packed))
154#endif
155 ;
156
157#ifdef _MSC_VER
158# pragma pack ()
159#endif
160
162 // Properties
164public:
165public:
171 unsigned char const& get_e_ident_file_class() const;
172 void set_e_ident_file_class(unsigned char const&);
175public:
181 unsigned char const& get_e_ident_data_encoding() const;
182 void set_e_ident_data_encoding(unsigned char const&);
185public:
191 unsigned char const& get_e_ident_file_version() const;
192 void set_e_ident_file_version(unsigned char const&);
195public:
201 SgUnsignedCharList const& get_e_ident_padding() const;
202 void set_e_ident_padding(SgUnsignedCharList const&);
205public:
211 unsigned long const& get_e_type() const;
212 void set_e_type(unsigned long const&);
215public:
221 unsigned long const& get_e_machine() const;
222 void set_e_machine(unsigned long const&);
225public:
231 unsigned long const& get_e_flags() const;
232 void set_e_flags(unsigned long const&);
235public:
241 unsigned long const& get_e_ehsize() const;
242 void set_e_ehsize(unsigned long const&);
245public:
251 unsigned long const& get_phextrasz() const;
252 void set_phextrasz(unsigned long const&);
255public:
261 unsigned long const& get_e_phnum() const;
262 void set_e_phnum(unsigned long const&);
265public:
271 unsigned long const& get_shextrasz() const;
272 void set_shextrasz(unsigned long const&);
275public:
281 unsigned long const& get_e_shnum() const;
282 void set_e_shnum(unsigned long const&);
285public:
291 unsigned long const& get_e_shstrndx() const;
292 void set_e_shstrndx(unsigned long const&);
295public:
303 SgAsmElfSectionTable* const& get_sectionTable() const;
304 void set_sectionTable(SgAsmElfSectionTable* const&);
307public:
314 SgAsmElfSegmentTable* const& get_segmentTable() const;
315 void set_segmentTable(SgAsmElfSegmentTable* const&);
318 // Functions
320public:
328
334 uint64_t maximumPageSize();
335
337 static SgAsmExecutableFileFormat::InsSetArchitecture machineToIsa(unsigned machine);
338
340 unsigned isaToMachine(SgAsmExecutableFileFormat::InsSetArchitecture isa) const;
341
347 virtual SgAsmElfFileHeader *parse() override;
348
349 virtual bool reallocate() override;
350
352 virtual void unparse(std::ostream&) const override;
353
355 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
356
358 static bool isElf(SgAsmGenericFile*);
359
361 SgAsmGenericSectionPtrList get_sectionTableSections();
362
364 SgAsmGenericSectionPtrList get_segmentTableSections();
365
366 // Overrides documented in base class
367 virtual const char *formatName() const override;
368
369private:
372
374 // Deprecated 2023-11
376public:
377 SgAsmElfSectionTable* get_section_table() const ROSE_DEPRECATED("use get_sectionTable");
378 void set_section_table(SgAsmElfSectionTable*) ROSE_DEPRECATED("use set_sectionTable");
379 SgAsmElfSegmentTable* get_segment_table() const ROSE_DEPRECATED("use get_segmentTable");
380 void set_segment_table(SgAsmElfSegmentTable*) ROSE_DEPRECATED("use set_segmentTable");
381 uint64_t max_page_size() ROSE_DEPRECATED("use maximumPageSize");
382 static SgAsmExecutableFileFormat::InsSetArchitecture machine_to_isa(unsigned) ROSE_DEPRECATED("use machineToIsa");
383 unsigned isa_to_machine(SgAsmExecutableFileFormat::InsSetArchitecture) const ROSE_DEPRECATED("use isaToMachine");
384 static bool is_ELF(SgAsmGenericFile*) ROSE_DEPRECATED("use isElf");
385 SgAsmGenericSectionPtrList get_sectab_sections() ROSE_DEPRECATED("use get_sectionTableSections");
386 SgAsmGenericSectionPtrList get_segtab_sections() ROSE_DEPRECATED("use get_segmentTableSections");
387 virtual const char *format_name() const override ROSE_DEPRECATED("use formatName");
388public:
390 virtual ~SgAsmElfFileHeader();
391
392public:
395
396protected:
403 void initializeProperties();
404
405
406// End of memberFunctionString
407// Start of memberFunctionString
408/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
409
410// *** COMMON CODE SECTION BEGINS HERE ***
411
412 public:
413
414 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
415 // and not required which is required to match the other aspects of the copy mechanism code generation.
416 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
417 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
418 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
419 // virtual SgNode* copy ( const SgCopyHelp & help) const;
420
422 virtual std::string class_name() const override;
423
425 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
426
428 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
429 // static const VariantT static_variant = V_SgAsmElfFileHeader;
430 enum { static_variant = V_SgAsmElfFileHeader };
431
432 /* the generated cast function */
434 ROSE_DLL_API friend SgAsmElfFileHeader* isSgAsmElfFileHeader( SgNode * s );
435
437 ROSE_DLL_API friend const SgAsmElfFileHeader* isSgAsmElfFileHeader( const SgNode * s );
438
439 // ******************************************
440 // * Memory Pool / New / Delete
441 // ******************************************
442
443 public:
445 static const unsigned pool_size; //
447 static std::vector<unsigned char *> pools; //
449 static SgAsmElfFileHeader * next_node; //
450
452 static unsigned long initializeStorageClassArray(SgAsmElfFileHeaderStorageClass *); //
453
455 static void clearMemoryPool(); //
456 static void deleteMemoryPool(); //
457
459 static void extendMemoryPoolForFileIO(); //
460
462 static SgAsmElfFileHeader * getPointerFromGlobalIndex(unsigned long); //
464 static SgAsmElfFileHeader * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
465
467 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
469 static void resetValidFreepointers(); //
471 static unsigned long getNumberOfLastValidPointer(); //
472
473
474#if defined(INLINE_FUNCTIONS)
476 inline void *operator new (size_t size);
477#else
479 void *operator new (size_t size);
480#endif
482 void operator delete (void* pointer, size_t size);
483
484 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
485 void operator delete (void* pointer)
486 {
487 // This is the generated delete operator...
488 SgAsmElfFileHeader::operator delete (pointer,sizeof(SgAsmElfFileHeader));
489 }
490
492 static size_t numberOfNodes();
493
495 static size_t memoryUsage();
496
497 // End of scope which started in IR nodes specific code
498 /* */
499
500 /* name Internal Functions
501 \brief Internal functions ... incomplete-documentation
502
503 These functions have been made public as part of the design, but they are suggested for internal use
504 or by particularly knowledgeable users for specialized tools or applications.
505
506 \internal We could not make these private because they are required by user for special purposes. And
507 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
508
509 */
510
511 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
512 // overridden in every class by *generated* implementation
514 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
515 // MS: 06/28/02 container of names of variables or container indices
516 // used used in the traversal to access AST successor nodes
517 // overridden in every class by *generated* implementation
520 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
521
522 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
523 // than all the vector copies. The implementation for these functions is generated for each class.
525 virtual size_t get_numberOfTraversalSuccessors() override;
527 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
529 virtual size_t get_childIndex(SgNode *child) override;
530
531#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
532 // MS: 08/16/2002 method for generating RTI information
534 virtual RTIReturnType roseRTI() override;
535#endif
536 /* */
537
538
539
540 /* name Deprecated Functions
541 \brief Deprecated functions ... incomplete-documentation
542
543 These functions have been deprecated from use.
544 */
545 /* */
546
548 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
549
550 // JJW (10/16/2008): Changed to a single function in Node.code, and put
551 // getVariant() in #if 0 block to prevent confusing Doxygen
552#if 0
554 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
556 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
557#endif
558 /* */
559
560
561
562
563 public:
564 /* name Traversal Support Functions
565 \brief Traversal support functions ... incomplete-documentation
566
567 These functions have been made public as part of the design, but they are suggested for internal use
568 or by particularly knowledgable users for specialized tools or applications.
569 */
570 /* */
571
572 // DQ (11/26/2005): Support for visitor pattern mechanims
573 // (inferior to ROSE traversal mechanism, experimental).
577
578 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
580 virtual void accept (ROSE_VisitorPattern & visitor) override;
581
582 // DQ (12/26/2005): Support for traversal based on the memory pool
585 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
586
590
591 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
592 // This traversal helps support internal tools that call static member functions.
593 // note: this function operates on the memory pools.
596 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
597 /* */
598
599 public:
600 /* NodeId support functions */
602 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
605 static SgAsmElfFileHeader* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
608 static std::string getNodeIdString(SgAsmElfFileHeader* sgnode);
609 static std::string getNodeIdStringInternal(SgAsmElfFileHeader* sgnode);
610
611 public:
612 /* name Memory Allocation Functions
613 \brief Memory allocations functions ... incomplete-documentation
614
615 These functions have been made public as part of the design, but they are suggested for internal use
616 or by particularly knowledgable users for specialized tools or applications.
617 */
618 /* */
619
630 virtual bool isInMemoryPool() override;
631
642 virtual void checkDataMemberPointersIfInMemoryPool() override;
643
644 // DQ (4/30/2006): Modified to be a const function.
659 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
660
671
683 virtual long getChildIndex( SgNode* childNode ) const override;
684
685 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
686 // comment here (changed to be a C style comment and not be a doxygen comment).
687 /* \brief Constructor for use by AST File I/O Mechanism
688
689 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
690 which obtained via fast binary file I/O from disk.
691 */
692 // SgAsmElfFileHeader( SgAsmElfFileHeaderStorageClass& source );
693
694
695
696
697
698 // JH (10/24/2005): methods added to support the ast file IO
699 private:
700
701 /* name AST Memory Allocation Support Functions
702 \brief Memory allocations support....
703
704 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
705 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
706 and support the AST File I/O Mechanism.
707 */
708 /* */
709
710 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
711 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
712 that I use the same type everywhere, if any changes are made. THe second one declares the type
713 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
714 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
715 a correspinding one in the AST_FILE_IO class!
716 */
717 // DQ (9/2/2015): This typedef is no longer used, we can't define the
718 // comment here (changed to be a C style comment and not be a doxygen comment).
719 /* \brief Typedef used for low level memory access.
720 */
721 // typedef unsigned char* TestType;
722
723 // DQ (9/2/2015): This typedef is no longer used, we can't define the
724 // comment here (changed to be a C style comment and not be a doxygen comment).
725 /* \brief Typedef used to hold memory addresses as values.
726 */
727 // typedef unsigned long AddressType;
728
729
730
731 // necessary, to have direct access to the p_freepointer and the private methods !
733 friend class AST_FILE_IO;
734
736 friend class SgAsmElfFileHeaderStorageClass;
737
739 friend class AstSpecificDataManagingClass;
740
742 friend class AstSpecificDataManagingClassStorageClass;
743 public:
745 SgAsmElfFileHeader( const SgAsmElfFileHeaderStorageClass& source );
746
747 // private: // JJW hack
748 /*
749 name AST Memory Allocation Support Variables
750 Memory allocations support variables
751
752 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
753 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
754 and support the AST File I/O Mechanism.
755 */
756 /* */
757
758 public:
759
760 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
761 // to current node (so that it will work cleanly with build functions to specify patterns).
762 // virtual SgNode* addRegExpAttribute();
769
770#ifndef _MSC_VER
771// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
772// and likely never fully implemented nor tested. Files remain in the src tree but are no
773// longer built.
774#define BUILD_ATERM_SUPPORT 0
775 #if BUILD_ATERM_SUPPORT
776 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
777 // DQ (10/4/2014): Adding ATerm support to ROSE.
787 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
788 virtual ATerm generate_ATerm() override;
789
791 virtual void generate_ATerm_Annotation(ATerm & term) override;
792 #endif
793 #endif // BUILD_ATERM_SUPPORT
794#endif
795 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
796 // virtual generate_AST(ATerm & term);
797 // virtual void read_ATerm_Annotation(ATerm & term);
798
799// *** COMMON CODE SECTION ENDS HERE ***
800
801
802// End of memberFunctionString
803// Start of memberFunctionString
804/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
805
806 // the generated cast function
807 // friend ROSE_DLL_API SgAsmElfFileHeader* isSgAsmElfFileHeader ( SgNode* s );
808
809 typedef SgAsmGenericHeader base_node_type;
810
811
812// End of memberFunctionString
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829 protected:
830// Start of memberFunctionString
831unsigned char p_e_ident_file_class;
832
833// End of memberFunctionString
834// Start of memberFunctionString
835unsigned char p_e_ident_data_encoding;
836
837// End of memberFunctionString
838// Start of memberFunctionString
839unsigned char p_e_ident_file_version;
840
841// End of memberFunctionString
842// Start of memberFunctionString
843SgUnsignedCharList p_e_ident_padding;
844
845// End of memberFunctionString
846// Start of memberFunctionString
847unsigned long p_e_type;
848
849// End of memberFunctionString
850// Start of memberFunctionString
851unsigned long p_e_machine;
852
853// End of memberFunctionString
854// Start of memberFunctionString
855unsigned long p_e_flags;
856
857// End of memberFunctionString
858// Start of memberFunctionString
859unsigned long p_e_ehsize;
860
861// End of memberFunctionString
862// Start of memberFunctionString
863unsigned long p_phextrasz;
864
865// End of memberFunctionString
866// Start of memberFunctionString
867unsigned long p_e_phnum;
868
869// End of memberFunctionString
870// Start of memberFunctionString
871unsigned long p_shextrasz;
872
873// End of memberFunctionString
874// Start of memberFunctionString
875unsigned long p_e_shnum;
876
877// End of memberFunctionString
878// Start of memberFunctionString
879unsigned long p_e_shstrndx;
880
881// End of memberFunctionString
882// Start of memberFunctionString
883SgAsmElfSectionTable* p_sectionTable;
884
885// End of memberFunctionString
886// Start of memberFunctionString
887SgAsmElfSegmentTable* p_segmentTable;
888
889// End of memberFunctionString
890
892 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned char,&SgAsmElfFileHeader::p_e_ident_file_class>;
893 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned char,&SgAsmElfFileHeader::p_e_ident_data_encoding>;
894 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned char,&SgAsmElfFileHeader::p_e_ident_file_version>;
895 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, SgUnsignedCharList,&SgAsmElfFileHeader::p_e_ident_padding>;
896 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_type>;
897 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_machine>;
898 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_flags>;
899 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_ehsize>;
900 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_phextrasz>;
901 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_phnum>;
902 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_shextrasz>;
903 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_shnum>;
904 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, unsigned long,&SgAsmElfFileHeader::p_e_shstrndx>;
905 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, SgAsmElfSectionTable*,&SgAsmElfFileHeader::p_sectionTable>;
906 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfFileHeader, SgAsmElfSegmentTable*,&SgAsmElfFileHeader::p_segmentTable>;
907
908/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
909
910
911 };
912#endif
913
914// postdeclarations for SgAsmElfFileHeader
915
916/* #line 917 "../../../src/frontend/SageIII//SgAsmElfFileHeader.h" */
917
918/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
919
920/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
921
922
923/* #line 924 "../../../src/frontend/SageIII//SgAsmElfFileHeader.h" */
924
925#endif // ROSE_SgAsmElfFileHeader_H
926
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Represents the file header of an ELF binary container.
Represents an ELF section table.
Represents an ELF segment table.
Base class for many binary analysis nodes.
InsSetArchitecture
Instruction sets organized by families.
Base class for binary files.
Base class for container file headers.
virtual const char * formatName() const
Returns the name of the file format.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const override
Print some debugging info.
virtual bool reallocate() override
Called prior to unparse to make things consistent.
virtual void unparse(std::ostream &) const override
Unparse headers and all they point to.
virtual SgAsmGenericSection * parse()
Parse contents of the section.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual size_t get_numberOfTraversalSuccessors()
return number of children in the traversal successor list
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual std::vector< std::string > get_traversalSuccessorNamesContainer()
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual size_t get_childIndex(SgNode *child)
index-based access to traversal successors by child node
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
virtual SgNode * get_traversalSuccessorByIndex(size_t idx)
index-based access to traversal successors by index number
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * ObjectType(int64_t)
Convert SgAsmElfFileHeader::ObjectType enum constant to a string.