ROSE 0.11.145.147
SgAsmElfSegmentTableEntry.h
1
2#ifndef ROSE_SgAsmElfSegmentTableEntry_H
3#define ROSE_SgAsmElfSegmentTableEntry_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 SgAsmElfSegmentTableEntry
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
25/* #line 19703 "/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 SgAsmElfSegmentTableEntry
38 {
39 public:
40
41
42/* #line 43 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
43
44 virtual SgNode* copy ( SgCopyHelp& help) const override;
45// Start of memberFunctionString
46/* #line 19774 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
47
48
49 //----------------------- Boost serialization for SgAsmElfSegmentTableEntry -----------------------
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("SgAsmElfSegmentTableEntry");
57 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
58 s & BOOST_SERIALIZATION_NVP(p_index);
59 s & BOOST_SERIALIZATION_NVP(p_type);
60 s & BOOST_SERIALIZATION_NVP(p_flags);
61 s & BOOST_SERIALIZATION_NVP(p_offset);
62 s & BOOST_SERIALIZATION_NVP(p_vaddr);
63 s & BOOST_SERIALIZATION_NVP(p_paddr);
64 s & BOOST_SERIALIZATION_NVP(p_filesz);
65 s & BOOST_SERIALIZATION_NVP(p_memsz);
66 s & BOOST_SERIALIZATION_NVP(p_align);
67 s & BOOST_SERIALIZATION_NVP(p_extra);
68 debugSerializationEnd("SgAsmElfSegmentTableEntry");
69 }
70#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
72 // Local types
74public:
76 enum SegmentType {
77 PT_NULL = 0,
78 PT_LOAD = 1,
79 PT_DYNAMIC = 2,
80 PT_INTERP = 3,
81 PT_NOTE = 4,
82 PT_SHLIB = 5,
83 PT_PHDR = 6,
84 PT_TLS = 7,
86 // OS- and Processor-specific ranges
87 PT_LOOS = 0x60000000,
88 PT_HIOS = 0x6fffffff,
89 PT_LOPROC = 0x70000000,
90 PT_HIPROC = 0x7fffffff,
91
92 // OS-specific values for GNU/Linux
93 PT_GNU_EH_FRAME = 0x6474e550,
94 PT_GNU_STACK = 0x6474e551,
95 PT_GNU_RELRO = 0x6474e552,
96 PT_PAX_FLAGS = 0x65041580,
98 // OS-specific values for Sun
99 PT_SUNWBSS = 0x6ffffffa,
100 PT_SUNWSTACK = 0x6ffffffb
101 };
102
104 enum SegmentFlags {
105 PF_NONE = 0,
106 PF_RESERVED = 0x000ffff8,
107 PF_XPERM = 0x00000001,
108 PF_WPERM = 0x00000002,
109 PF_RPERM = 0x00000004,
110 PF_OS_MASK = 0x0ff00000,
111 PF_PROC_MASK = 0xf0000000
112 };
113
114#ifdef _MSC_VER
115# pragma pack (1)
116#endif
124 struct Elf32SegmentTableEntry_disk {
125 uint32_t p_type;
126 uint32_t p_offset;
127 uint32_t p_vaddr;
128 uint32_t p_paddr;
129 uint32_t p_filesz;
130 uint32_t p_memsz;
131 uint32_t p_flags;
132 uint32_t p_align;
133 } /* 0x30 */
134#if !defined(SWIG) && !defined(_MSC_VER)
135 __attribute__((packed))
136#endif
137 ;
138
139 struct Elf64SegmentTableEntry_disk {
140 uint32_t p_type; /* 0x00 */
141 uint32_t p_flags; /* 0x04 */
142 uint64_t p_offset; /* 0x08 */
143 uint64_t p_vaddr; /* 0x10 */
144 uint64_t p_paddr; /* 0x18 */
145 uint64_t p_filesz; /* 0x20 */
146 uint64_t p_memsz; /* 0x28 */
147 uint64_t p_align; /* 0x30 */
148 } /* 0x38 */
149#if !defined(SWIG) && !defined(_MSC_VER)
150 __attribute__((packed))
151#endif
152 ;
153#ifdef _MSC_VER
154# pragma pack ()
155#endif
156
158 // Properties
160public:
161public:
167 size_t const& get_index() const;
168 void set_index(size_t const&);
171public:
175 SgAsmElfSegmentTableEntry::SegmentType const& get_type() const;
176 void set_type(SgAsmElfSegmentTableEntry::SegmentType const&);
179public:
183 SgAsmElfSegmentTableEntry::SegmentFlags const& get_flags() const;
184 void set_flags(SgAsmElfSegmentTableEntry::SegmentFlags const&);
187public:
193 rose_addr_t const& get_offset() const;
194 void set_offset(rose_addr_t const&);
197public:
204 rose_addr_t const& get_vaddr() const;
205 void set_vaddr(rose_addr_t const&);
208public:
214 rose_addr_t const& get_paddr() const;
215 void set_paddr(rose_addr_t const&);
218public:
224 rose_addr_t const& get_filesz() const;
225 void set_filesz(rose_addr_t const&);
228public:
234 rose_addr_t const& get_memsz() const;
235 void set_memsz(rose_addr_t const&);
238public:
244 rose_addr_t const& get_align() const;
245 void set_align(rose_addr_t const&);
248public:
254 SgUnsignedCharList const& get_extra() const;
255 SgUnsignedCharList& get_extra();
256 void set_extra(SgUnsignedCharList const&);
259 // Functions
261public:
265
269
278 void updateFromSection(SgAsmElfSection*);
279
281 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
282
285
288
290 // Deprecated 2023-11
292public:
293 void update_from_section(SgAsmElfSection*) ROSE_DEPRECATED("use updateFromSection");
294 static std::string to_string(SgAsmElfSegmentTableEntry::SegmentType) ROSE_DEPRECATED("use toString");
295 static std::string to_string(SgAsmElfSegmentTableEntry::SegmentFlags) ROSE_DEPRECATED("use toString");
296public:
299
300public:
303
304protected:
312
313
314// End of memberFunctionString
315// Start of memberFunctionString
316/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
317
318// *** COMMON CODE SECTION BEGINS HERE ***
319
320 public:
321
322 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
323 // and not required which is required to match the other aspects of the copy mechanism code generation.
324 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
325 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
326 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
327 // virtual SgNode* copy ( const SgCopyHelp & help) const;
328
330 virtual std::string class_name() const override;
331
333 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
334
336 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
337 // static const VariantT static_variant = V_SgAsmElfSegmentTableEntry;
338 enum { static_variant = V_SgAsmElfSegmentTableEntry };
339
340 /* the generated cast function */
342 ROSE_DLL_API friend SgAsmElfSegmentTableEntry* isSgAsmElfSegmentTableEntry( SgNode * s );
343
345 ROSE_DLL_API friend const SgAsmElfSegmentTableEntry* isSgAsmElfSegmentTableEntry( const SgNode * s );
346
347 // ******************************************
348 // * Memory Pool / New / Delete
349 // ******************************************
350
351 public:
353 static const unsigned pool_size; //
355 static std::vector<unsigned char *> pools; //
357 static SgAsmElfSegmentTableEntry * next_node; //
358
360 static unsigned long initializeStorageClassArray(SgAsmElfSegmentTableEntryStorageClass *); //
361
363 static void clearMemoryPool(); //
364 static void deleteMemoryPool(); //
365
367 static void extendMemoryPoolForFileIO(); //
368
370 static SgAsmElfSegmentTableEntry * getPointerFromGlobalIndex(unsigned long); //
372 static SgAsmElfSegmentTableEntry * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
373
375 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
377 static void resetValidFreepointers(); //
379 static unsigned long getNumberOfLastValidPointer(); //
380
381
382#if defined(INLINE_FUNCTIONS)
384 inline void *operator new (size_t size);
385#else
387 void *operator new (size_t size);
388#endif
390 void operator delete (void* pointer, size_t size);
391
392 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
393 void operator delete (void* pointer)
394 {
395 // This is the generated delete operator...
396 SgAsmElfSegmentTableEntry::operator delete (pointer,sizeof(SgAsmElfSegmentTableEntry));
397 }
398
400 static size_t numberOfNodes();
401
403 static size_t memoryUsage();
404
405 // End of scope which started in IR nodes specific code
406 /* */
407
408 /* name Internal Functions
409 \brief Internal functions ... incomplete-documentation
410
411 These functions have been made public as part of the design, but they are suggested for internal use
412 or by particularly knowledgeable users for specialized tools or applications.
413
414 \internal We could not make these private because they are required by user for special purposes. And
415 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
416
417 */
418
419 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
420 // overridden in every class by *generated* implementation
422 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
423 // MS: 06/28/02 container of names of variables or container indices
424 // used used in the traversal to access AST successor nodes
425 // overridden in every class by *generated* implementation
428 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
429
430 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
431 // than all the vector copies. The implementation for these functions is generated for each class.
433 virtual size_t get_numberOfTraversalSuccessors() override;
435 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
437 virtual size_t get_childIndex(SgNode *child) override;
438
439#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
440 // MS: 08/16/2002 method for generating RTI information
442 virtual RTIReturnType roseRTI() override;
443#endif
444 /* */
445
446
447
448 /* name Deprecated Functions
449 \brief Deprecated functions ... incomplete-documentation
450
451 These functions have been deprecated from use.
452 */
453 /* */
454
456 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
457
458 // JJW (10/16/2008): Changed to a single function in Node.code, and put
459 // getVariant() in #if 0 block to prevent confusing Doxygen
460#if 0
462 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
464 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
465#endif
466 /* */
467
468
469
470
471 public:
472 /* name Traversal Support Functions
473 \brief Traversal support functions ... incomplete-documentation
474
475 These functions have been made public as part of the design, but they are suggested for internal use
476 or by particularly knowledgable users for specialized tools or applications.
477 */
478 /* */
479
480 // DQ (11/26/2005): Support for visitor pattern mechanims
481 // (inferior to ROSE traversal mechanism, experimental).
485
486 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
488 virtual void accept (ROSE_VisitorPattern & visitor) override;
489
490 // DQ (12/26/2005): Support for traversal based on the memory pool
493 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
494
498
499 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
500 // This traversal helps support internal tools that call static member functions.
501 // note: this function operates on the memory pools.
504 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
505 /* */
506
507 public:
508 /* NodeId support functions */
510 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
513 static SgAsmElfSegmentTableEntry* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
516 static std::string getNodeIdString(SgAsmElfSegmentTableEntry* sgnode);
517 static std::string getNodeIdStringInternal(SgAsmElfSegmentTableEntry* sgnode);
518
519 public:
520 /* name Memory Allocation Functions
521 \brief Memory allocations functions ... incomplete-documentation
522
523 These functions have been made public as part of the design, but they are suggested for internal use
524 or by particularly knowledgable users for specialized tools or applications.
525 */
526 /* */
527
538 virtual bool isInMemoryPool() override;
539
550 virtual void checkDataMemberPointersIfInMemoryPool() override;
551
552 // DQ (4/30/2006): Modified to be a const function.
567 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
568
579
591 virtual long getChildIndex( SgNode* childNode ) const override;
592
593 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
594 // comment here (changed to be a C style comment and not be a doxygen comment).
595 /* \brief Constructor for use by AST File I/O Mechanism
596
597 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
598 which obtained via fast binary file I/O from disk.
599 */
600 // SgAsmElfSegmentTableEntry( SgAsmElfSegmentTableEntryStorageClass& source );
601
602
603
604
605
606 // JH (10/24/2005): methods added to support the ast file IO
607 private:
608
609 /* name AST Memory Allocation Support Functions
610 \brief Memory allocations support....
611
612 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
613 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
614 and support the AST File I/O Mechanism.
615 */
616 /* */
617
618 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
619 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
620 that I use the same type everywhere, if any changes are made. THe second one declares the type
621 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
622 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
623 a correspinding one in the AST_FILE_IO class!
624 */
625 // DQ (9/2/2015): This typedef is no longer used, we can't define the
626 // comment here (changed to be a C style comment and not be a doxygen comment).
627 /* \brief Typedef used for low level memory access.
628 */
629 // typedef unsigned char* TestType;
630
631 // DQ (9/2/2015): This typedef is no longer used, we can't define the
632 // comment here (changed to be a C style comment and not be a doxygen comment).
633 /* \brief Typedef used to hold memory addresses as values.
634 */
635 // typedef unsigned long AddressType;
636
637
638
639 // necessary, to have direct access to the p_freepointer and the private methods !
641 friend class AST_FILE_IO;
642
644 friend class SgAsmElfSegmentTableEntryStorageClass;
645
647 friend class AstSpecificDataManagingClass;
648
650 friend class AstSpecificDataManagingClassStorageClass;
651 public:
653 SgAsmElfSegmentTableEntry( const SgAsmElfSegmentTableEntryStorageClass& source );
654
655 // private: // JJW hack
656 /*
657 name AST Memory Allocation Support Variables
658 Memory allocations support variables
659
660 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
661 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
662 and support the AST File I/O Mechanism.
663 */
664 /* */
665
666 public:
667
668 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
669 // to current node (so that it will work cleanly with build functions to specify patterns).
670 // virtual SgNode* addRegExpAttribute();
677
678#ifndef _MSC_VER
679// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
680// and likely never fully implemented nor tested. Files remain in the src tree but are no
681// longer built.
682#define BUILD_ATERM_SUPPORT 0
683 #if BUILD_ATERM_SUPPORT
684 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
685 // DQ (10/4/2014): Adding ATerm support to ROSE.
695 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
696 virtual ATerm generate_ATerm() override;
697
699 virtual void generate_ATerm_Annotation(ATerm & term) override;
700 #endif
701 #endif // BUILD_ATERM_SUPPORT
702#endif
703 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
704 // virtual generate_AST(ATerm & term);
705 // virtual void read_ATerm_Annotation(ATerm & term);
706
707// *** COMMON CODE SECTION ENDS HERE ***
708
709
710// End of memberFunctionString
711// Start of memberFunctionString
712/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
713
714 // the generated cast function
715 // friend ROSE_DLL_API SgAsmElfSegmentTableEntry* isSgAsmElfSegmentTableEntry ( SgNode* s );
716
717 typedef SgAsmExecutableFileFormat base_node_type;
718
719
720// End of memberFunctionString
721
722
723
724
725
726
727
728
729
730
731
732 protected:
733// Start of memberFunctionString
734size_t p_index;
735
736// End of memberFunctionString
737// Start of memberFunctionString
739
740// End of memberFunctionString
741// Start of memberFunctionString
743
744// End of memberFunctionString
745// Start of memberFunctionString
746rose_addr_t p_offset;
747
748// End of memberFunctionString
749// Start of memberFunctionString
750rose_addr_t p_vaddr;
751
752// End of memberFunctionString
753// Start of memberFunctionString
754rose_addr_t p_paddr;
755
756// End of memberFunctionString
757// Start of memberFunctionString
758rose_addr_t p_filesz;
759
760// End of memberFunctionString
761// Start of memberFunctionString
762rose_addr_t p_memsz;
763
764// End of memberFunctionString
765// Start of memberFunctionString
766rose_addr_t p_align;
767
768// End of memberFunctionString
769// Start of memberFunctionString
770SgUnsignedCharList p_extra;
771
772// End of memberFunctionString
773
775 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, size_t,&SgAsmElfSegmentTableEntry::p_index>;
777 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, SgAsmElfSegmentTableEntry::SegmentFlags,&SgAsmElfSegmentTableEntry::p_flags>;
778 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, rose_addr_t,&SgAsmElfSegmentTableEntry::p_offset>;
779 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, rose_addr_t,&SgAsmElfSegmentTableEntry::p_vaddr>;
780 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, rose_addr_t,&SgAsmElfSegmentTableEntry::p_paddr>;
781 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, rose_addr_t,&SgAsmElfSegmentTableEntry::p_filesz>;
782 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, rose_addr_t,&SgAsmElfSegmentTableEntry::p_memsz>;
783 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, rose_addr_t,&SgAsmElfSegmentTableEntry::p_align>;
784 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, SgUnsignedCharList,&SgAsmElfSegmentTableEntry::p_extra>;
785
786/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
787
788
789 };
790#endif
791
792// postdeclarations for SgAsmElfSegmentTableEntry
793
794/* #line 795 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
795
796/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
797
798/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
799
800
801/* #line 802 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
802
803#endif // ROSE_SgAsmElfSegmentTableEntry_H
804
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Base class for ELF file sections.
Represents one entry of a segment table.
SegmentType
Segment types (host order).
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 * SegmentType(int64_t)
Convert SgAsmElfSegmentTableEntry::SegmentType enum constant to a string.
const char * SegmentFlags(int64_t)
Convert SgAsmElfSegmentTableEntry::SegmentFlags enum constant to a string.