ROSE 0.11.145.147
SgAsmElfSectionTableEntry.h
1
2#ifndef ROSE_SgAsmElfSectionTableEntry_H
3#define ROSE_SgAsmElfSectionTableEntry_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmExecutableFileFormat.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 SgAsmElfSectionTableEntry
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
25/* #line 20156 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/ByteOrder.h>
28#include <sageContainer.h>
29
30
31/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
32
33/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
34
35#if !defined(DOCUMENTATION)
36// Class Definition for SgAsmElfSectionTableEntry
38 {
39 public:
40
41
42/* #line 43 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
43
44 virtual SgNode* copy ( SgCopyHelp& help) const override;
45// Start of memberFunctionString
46/* #line 20233 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
47
48
49 //----------------------- Boost serialization for SgAsmElfSectionTableEntry -----------------------
50#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
51private:
52 friend class boost::serialization::access;
53
54 template<class S>
55 void serialize(S &s, const unsigned /*version*/) {
56 debugSerializationBegin("SgAsmElfSectionTableEntry");
57 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
58 s & BOOST_SERIALIZATION_NVP(p_sh_name);
59 s & BOOST_SERIALIZATION_NVP(p_sh_type);
60 s & BOOST_SERIALIZATION_NVP(p_sh_link);
61 s & BOOST_SERIALIZATION_NVP(p_sh_info);
62 s & BOOST_SERIALIZATION_NVP(p_sh_flags);
63 s & BOOST_SERIALIZATION_NVP(p_sh_addr);
64 s & BOOST_SERIALIZATION_NVP(p_sh_offset);
65 s & BOOST_SERIALIZATION_NVP(p_sh_size);
66 s & BOOST_SERIALIZATION_NVP(p_sh_addralign);
67 s & BOOST_SERIALIZATION_NVP(p_sh_entsize);
68 s & BOOST_SERIALIZATION_NVP(p_extra);
69 debugSerializationEnd("SgAsmElfSectionTableEntry");
70 }
71#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
73 // Local types
75public:
77 enum SectionType {
78 SHT_NULL = 0,
79 SHT_PROGBITS = 1,
80 SHT_SYMTAB = 2,
81 SHT_STRTAB = 3,
82 SHT_RELA = 4,
83 SHT_HASH = 5,
84 SHT_DYNAMIC = 6,
85 SHT_NOTE = 7,
86 SHT_NOBITS = 8,
87 SHT_REL = 9,
88 SHT_SHLIB = 10,
89 SHT_DYNSYM = 11,
91 SHT_LOOS = 0x60000000,
92 SHT_GNU_verdef = 0x6ffffffd,
93 SHT_GNU_verneed = 0x6ffffffe,
94 SHT_GNU_versym = 0x6fffffff,
95 SHT_HIOS = 0x6fffffff, /*NO_STRINGIFY*/
96
97 SHT_LOPROC = 0x70000000, /* Processor specific semantics */
98 SHT_HIPROC = 0x7fffffff,
99 SHT_LOUSER = 0x80000000, /* Application specific semantics */
100 SHT_HIUSER = 0xffffffff
101 };
102
104 enum SectionFlags {
105 SHF_NULL= 0,
106 SHF_WRITE= (1 << 0),
107 SHF_ALLOC= (1 << 1),
108 SHF_EXECINSTR= (1 << 2),
109 SHF_MERGE= (1 << 4),
110 SHF_STRINGS= (1 << 5),
111 SHF_INFO_LINK= (1 << 6),
112 SHF_LINK_ORDER= (1 << 7),
113 SHF_OS_NONCONFORMING=(1 << 8),
114 SHF_GROUP= (1 << 9),
115 SHF_TLS= (1 << 10),
116 SHF_MASKOS= 0x0ff00000,
117 SHF_MASKPROC= 0xf0000000
118 };
119
126#ifdef _MSC_VER
127# pragma pack (1)
128#endif
129 struct Elf32SectionTableEntry_disk {
130 uint32_t sh_name; /* 0x00 Section name; index into section header string table */
131 uint32_t sh_type; /* 0x04 Section contents and semantics (see SectionType enum) */
132 uint32_t sh_flags; /* 0x08 Bit flags */
133 uint32_t sh_addr; /* 0x0c Desired mapped address */
134 uint32_t sh_offset; /* 0x10 Section location in file unless sh_type==SHT_NOBITS */
135 uint32_t sh_size; /* 0x14 Section size in bytes */
136 uint32_t sh_link; /* 0x18 Section ID of another section; meaning depends on section type */
137 uint32_t sh_info; /* 0x1c Extra info depending on section type */
138 uint32_t sh_addralign; /* 0x20 Mapped alignment (0 and 1=>byte aligned); sh_addr must be aligned*/
139 uint32_t sh_entsize; /* 0x24 If non-zero, size in bytes of each array member in the section */
140 } /* 0x28 */
141#if !defined(SWIG) && !defined(_MSC_VER)
142 __attribute__((packed))
143#endif
144 ;
145
146 struct Elf64SectionTableEntry_disk {
147 uint32_t sh_name; /* 0x00 see Elf32SectionTableEntry_disk */
148 uint32_t sh_type; /* 0x04 */
149 uint64_t sh_flags; /* 0x08 */
150 uint64_t sh_addr; /* 0x10 */
151 uint64_t sh_offset; /* 0x18 */
152 uint64_t sh_size; /* 0x20 */
153 uint32_t sh_link; /* 0x28 */
154 uint32_t sh_info; /* 0x2c */
155 uint64_t sh_addralign; /* 0x30 */
156 uint64_t sh_entsize; /* 0x38 */
157 } /* 0x40 */
158#if !defined(SWIG) && !defined(_MSC_VER)
159 __attribute__((packed))
160#endif
161 ;
162#ifdef _MSC_VER
163# pragma pack ()
164#endif
165
167 // Properties
169public:
170public:
176 unsigned const& get_sh_name() const;
177 void set_sh_name(unsigned const&);
180public:
186 SgAsmElfSectionTableEntry::SectionType const& get_sh_type() const;
187 void set_sh_type(SgAsmElfSectionTableEntry::SectionType const&);
190public:
196 unsigned long const& get_sh_link() const;
197 void set_sh_link(unsigned long const&);
200public:
206 unsigned long const& get_sh_info() const;
207 void set_sh_info(unsigned long const&);
210public:
216 uint64_t const& get_sh_flags() const;
217 void set_sh_flags(uint64_t const&);
220public:
226 rose_addr_t const& get_sh_addr() const;
227 void set_sh_addr(rose_addr_t const&);
230public:
236 rose_addr_t const& get_sh_offset() const;
237 void set_sh_offset(rose_addr_t const&);
240public:
246 rose_addr_t const& get_sh_size() const;
247 void set_sh_size(rose_addr_t const&);
250public:
256 rose_addr_t const& get_sh_addralign() const;
257 void set_sh_addralign(rose_addr_t const&);
260public:
266 rose_addr_t const& get_sh_entsize() const;
267 void set_sh_entsize(rose_addr_t const&);
270public:
276 SgUnsignedCharList const& get_extra() const;
277 SgUnsignedCharList& get_extra();
278 void set_extra(SgUnsignedCharList const&);
281 // Functions
283public:
287
291
302 void updateFromSection(SgAsmElfSection*);
303
305 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
306
307 // Use Rose::stringify... function instead.
310
312 // Deprecated 2023-11
314public:
315 void update_from_section(SgAsmElfSection*) ROSE_DEPRECATED("use updateFromSection");
316 static std::string to_string(SgAsmElfSectionTableEntry::SectionType) ROSE_DEPRECATED("use toString");
317 static std::string to_string(SgAsmElfSectionTableEntry::SectionFlags) ROSE_DEPRECATED("use toString");
318public:
321
322public:
325
326protected:
334
335
336// End of memberFunctionString
337// Start of memberFunctionString
338/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
339
340// *** COMMON CODE SECTION BEGINS HERE ***
341
342 public:
343
344 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
345 // and not required which is required to match the other aspects of the copy mechanism code generation.
346 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
347 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
348 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
349 // virtual SgNode* copy ( const SgCopyHelp & help) const;
350
352 virtual std::string class_name() const override;
353
355 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
356
358 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
359 // static const VariantT static_variant = V_SgAsmElfSectionTableEntry;
360 enum { static_variant = V_SgAsmElfSectionTableEntry };
361
362 /* the generated cast function */
364 ROSE_DLL_API friend SgAsmElfSectionTableEntry* isSgAsmElfSectionTableEntry( SgNode * s );
365
367 ROSE_DLL_API friend const SgAsmElfSectionTableEntry* isSgAsmElfSectionTableEntry( const SgNode * s );
368
369 // ******************************************
370 // * Memory Pool / New / Delete
371 // ******************************************
372
373 public:
375 static const unsigned pool_size; //
377 static std::vector<unsigned char *> pools; //
379 static SgAsmElfSectionTableEntry * next_node; //
380
382 static unsigned long initializeStorageClassArray(SgAsmElfSectionTableEntryStorageClass *); //
383
385 static void clearMemoryPool(); //
386 static void deleteMemoryPool(); //
387
389 static void extendMemoryPoolForFileIO(); //
390
392 static SgAsmElfSectionTableEntry * getPointerFromGlobalIndex(unsigned long); //
394 static SgAsmElfSectionTableEntry * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
395
397 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
399 static void resetValidFreepointers(); //
401 static unsigned long getNumberOfLastValidPointer(); //
402
403
404#if defined(INLINE_FUNCTIONS)
406 inline void *operator new (size_t size);
407#else
409 void *operator new (size_t size);
410#endif
412 void operator delete (void* pointer, size_t size);
413
414 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
415 void operator delete (void* pointer)
416 {
417 // This is the generated delete operator...
418 SgAsmElfSectionTableEntry::operator delete (pointer,sizeof(SgAsmElfSectionTableEntry));
419 }
420
422 static size_t numberOfNodes();
423
425 static size_t memoryUsage();
426
427 // End of scope which started in IR nodes specific code
428 /* */
429
430 /* name Internal Functions
431 \brief Internal functions ... incomplete-documentation
432
433 These functions have been made public as part of the design, but they are suggested for internal use
434 or by particularly knowledgeable users for specialized tools or applications.
435
436 \internal We could not make these private because they are required by user for special purposes. And
437 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
438
439 */
440
441 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
442 // overridden in every class by *generated* implementation
444 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
445 // MS: 06/28/02 container of names of variables or container indices
446 // used used in the traversal to access AST successor nodes
447 // overridden in every class by *generated* implementation
450 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
451
452 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
453 // than all the vector copies. The implementation for these functions is generated for each class.
455 virtual size_t get_numberOfTraversalSuccessors() override;
457 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
459 virtual size_t get_childIndex(SgNode *child) override;
460
461#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
462 // MS: 08/16/2002 method for generating RTI information
464 virtual RTIReturnType roseRTI() override;
465#endif
466 /* */
467
468
469
470 /* name Deprecated Functions
471 \brief Deprecated functions ... incomplete-documentation
472
473 These functions have been deprecated from use.
474 */
475 /* */
476
478 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
479
480 // JJW (10/16/2008): Changed to a single function in Node.code, and put
481 // getVariant() in #if 0 block to prevent confusing Doxygen
482#if 0
484 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
486 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
487#endif
488 /* */
489
490
491
492
493 public:
494 /* name Traversal Support Functions
495 \brief Traversal support functions ... incomplete-documentation
496
497 These functions have been made public as part of the design, but they are suggested for internal use
498 or by particularly knowledgable users for specialized tools or applications.
499 */
500 /* */
501
502 // DQ (11/26/2005): Support for visitor pattern mechanims
503 // (inferior to ROSE traversal mechanism, experimental).
507
508 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
510 virtual void accept (ROSE_VisitorPattern & visitor) override;
511
512 // DQ (12/26/2005): Support for traversal based on the memory pool
515 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
516
520
521 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
522 // This traversal helps support internal tools that call static member functions.
523 // note: this function operates on the memory pools.
526 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
527 /* */
528
529 public:
530 /* NodeId support functions */
532 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
535 static SgAsmElfSectionTableEntry* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
538 static std::string getNodeIdString(SgAsmElfSectionTableEntry* sgnode);
539 static std::string getNodeIdStringInternal(SgAsmElfSectionTableEntry* sgnode);
540
541 public:
542 /* name Memory Allocation Functions
543 \brief Memory allocations functions ... incomplete-documentation
544
545 These functions have been made public as part of the design, but they are suggested for internal use
546 or by particularly knowledgable users for specialized tools or applications.
547 */
548 /* */
549
560 virtual bool isInMemoryPool() override;
561
572 virtual void checkDataMemberPointersIfInMemoryPool() override;
573
574 // DQ (4/30/2006): Modified to be a const function.
589 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
590
601
613 virtual long getChildIndex( SgNode* childNode ) const override;
614
615 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
616 // comment here (changed to be a C style comment and not be a doxygen comment).
617 /* \brief Constructor for use by AST File I/O Mechanism
618
619 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
620 which obtained via fast binary file I/O from disk.
621 */
622 // SgAsmElfSectionTableEntry( SgAsmElfSectionTableEntryStorageClass& source );
623
624
625
626
627
628 // JH (10/24/2005): methods added to support the ast file IO
629 private:
630
631 /* name AST Memory Allocation Support Functions
632 \brief Memory allocations support....
633
634 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
635 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
636 and support the AST File I/O Mechanism.
637 */
638 /* */
639
640 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
641 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
642 that I use the same type everywhere, if any changes are made. THe second one declares the type
643 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
644 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
645 a correspinding one in the AST_FILE_IO class!
646 */
647 // DQ (9/2/2015): This typedef is no longer used, we can't define the
648 // comment here (changed to be a C style comment and not be a doxygen comment).
649 /* \brief Typedef used for low level memory access.
650 */
651 // typedef unsigned char* TestType;
652
653 // DQ (9/2/2015): This typedef is no longer used, we can't define the
654 // comment here (changed to be a C style comment and not be a doxygen comment).
655 /* \brief Typedef used to hold memory addresses as values.
656 */
657 // typedef unsigned long AddressType;
658
659
660
661 // necessary, to have direct access to the p_freepointer and the private methods !
663 friend class AST_FILE_IO;
664
666 friend class SgAsmElfSectionTableEntryStorageClass;
667
669 friend class AstSpecificDataManagingClass;
670
672 friend class AstSpecificDataManagingClassStorageClass;
673 public:
675 SgAsmElfSectionTableEntry( const SgAsmElfSectionTableEntryStorageClass& source );
676
677 // private: // JJW hack
678 /*
679 name AST Memory Allocation Support Variables
680 Memory allocations support variables
681
682 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
683 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
684 and support the AST File I/O Mechanism.
685 */
686 /* */
687
688 public:
689
690 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
691 // to current node (so that it will work cleanly with build functions to specify patterns).
692 // virtual SgNode* addRegExpAttribute();
699
700#ifndef _MSC_VER
701// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
702// and likely never fully implemented nor tested. Files remain in the src tree but are no
703// longer built.
704#define BUILD_ATERM_SUPPORT 0
705 #if BUILD_ATERM_SUPPORT
706 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
707 // DQ (10/4/2014): Adding ATerm support to ROSE.
717 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
718 virtual ATerm generate_ATerm() override;
719
721 virtual void generate_ATerm_Annotation(ATerm & term) override;
722 #endif
723 #endif // BUILD_ATERM_SUPPORT
724#endif
725 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
726 // virtual generate_AST(ATerm & term);
727 // virtual void read_ATerm_Annotation(ATerm & term);
728
729// *** COMMON CODE SECTION ENDS HERE ***
730
731
732// End of memberFunctionString
733// Start of memberFunctionString
734/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
735
736 // the generated cast function
737 // friend ROSE_DLL_API SgAsmElfSectionTableEntry* isSgAsmElfSectionTableEntry ( SgNode* s );
738
739 typedef SgAsmExecutableFileFormat base_node_type;
740
741
742// End of memberFunctionString
743
744
745
746
747
748
749
750
751
752
753
754
755 protected:
756// Start of memberFunctionString
757unsigned p_sh_name;
758
759// End of memberFunctionString
760// Start of memberFunctionString
762
763// End of memberFunctionString
764// Start of memberFunctionString
765unsigned long p_sh_link;
766
767// End of memberFunctionString
768// Start of memberFunctionString
769unsigned long p_sh_info;
770
771// End of memberFunctionString
772// Start of memberFunctionString
773uint64_t p_sh_flags;
774
775// End of memberFunctionString
776// Start of memberFunctionString
777rose_addr_t p_sh_addr;
778
779// End of memberFunctionString
780// Start of memberFunctionString
781rose_addr_t p_sh_offset;
782
783// End of memberFunctionString
784// Start of memberFunctionString
785rose_addr_t p_sh_size;
786
787// End of memberFunctionString
788// Start of memberFunctionString
789rose_addr_t p_sh_addralign;
790
791// End of memberFunctionString
792// Start of memberFunctionString
793rose_addr_t p_sh_entsize;
794
795// End of memberFunctionString
796// Start of memberFunctionString
797SgUnsignedCharList p_extra;
798
799// End of memberFunctionString
800
802 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, unsigned,&SgAsmElfSectionTableEntry::p_sh_name>;
804 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, unsigned long,&SgAsmElfSectionTableEntry::p_sh_link>;
805 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, unsigned long,&SgAsmElfSectionTableEntry::p_sh_info>;
806 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, uint64_t,&SgAsmElfSectionTableEntry::p_sh_flags>;
807 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, rose_addr_t,&SgAsmElfSectionTableEntry::p_sh_addr>;
808 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, rose_addr_t,&SgAsmElfSectionTableEntry::p_sh_offset>;
809 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, rose_addr_t,&SgAsmElfSectionTableEntry::p_sh_size>;
810 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, rose_addr_t,&SgAsmElfSectionTableEntry::p_sh_addralign>;
811 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, rose_addr_t,&SgAsmElfSectionTableEntry::p_sh_entsize>;
812 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, SgUnsignedCharList,&SgAsmElfSectionTableEntry::p_extra>;
813
814/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
815
816
817 };
818#endif
819
820// postdeclarations for SgAsmElfSectionTableEntry
821
822/* #line 823 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
823
824/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
825
826/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
827
828
829/* #line 830 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
830
831#endif // ROSE_SgAsmElfSectionTableEntry_H
832
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 one entry in an ELF section table.
SectionType
Section types (host order).
SectionFlags
Section Flags (host order).
Base class for ELF file sections.
Base class for many binary analysis nodes.
void initializeProperties()
Initialize all properties that have explicit initial values.
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 VariantT variantT() const
returns new style SageIII enum values
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...
virtual std::string class_name() const
returns a string representing the class name
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.
ROSE_UTIL_API std::string toString(const Path &)
Convert a path to a string.
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 * SectionType(int64_t)
Convert SgAsmElfSectionTableEntry::SectionType enum constant to a string.
const char * SectionFlags(int64_t)
Convert SgAsmElfSectionTableEntry::SectionFlags enum constant to a string.