ROSE 0.11.145.247
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 19865 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28#include <Rose/BinaryAnalysis/ByteOrder.h>
29#include <sageContainer.h>
30
31
32/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
33
34/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
35
36#if !defined(DOCUMENTATION)
37// Class Definition for SgAsmElfSegmentTableEntry
39 {
40 public:
41
42
43/* #line 44 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
44
45 virtual SgNode* copy ( SgCopyHelp& help) const override;
46// Start of memberFunctionString
47/* #line 19937 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
48
49
50 //----------------------- Boost serialization for SgAsmElfSegmentTableEntry -----------------------
51#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
52private:
53 friend class boost::serialization::access;
54
55 template<class S>
56 void serialize(S &s, const unsigned /*version*/) {
57 debugSerializationBegin("SgAsmElfSegmentTableEntry");
58 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
59 s & BOOST_SERIALIZATION_NVP(p_index);
60 s & BOOST_SERIALIZATION_NVP(p_type);
61 s & BOOST_SERIALIZATION_NVP(p_flags);
62 s & BOOST_SERIALIZATION_NVP(p_offset);
63 s & BOOST_SERIALIZATION_NVP(p_vaddr);
64 s & BOOST_SERIALIZATION_NVP(p_paddr);
65 s & BOOST_SERIALIZATION_NVP(p_filesz);
66 s & BOOST_SERIALIZATION_NVP(p_memsz);
67 s & BOOST_SERIALIZATION_NVP(p_align);
68 s & BOOST_SERIALIZATION_NVP(p_extra);
69 debugSerializationEnd("SgAsmElfSegmentTableEntry");
70 }
71#endif // ROSE_ENABLE_BOOST_SERIALIZATION
73 // Local types
75public:
77 enum SegmentType {
78 PT_NULL = 0,
79 PT_LOAD = 1,
80 PT_DYNAMIC = 2,
81 PT_INTERP = 3,
82 PT_NOTE = 4,
83 PT_SHLIB = 5,
84 PT_PHDR = 6,
85 PT_TLS = 7,
87 // OS- and Processor-specific ranges
88 PT_LOOS = 0x60000000,
89 PT_HIOS = 0x6fffffff,
90 PT_LOPROC = 0x70000000,
91 PT_HIPROC = 0x7fffffff,
92
93 // OS-specific values for GNU/Linux
94 PT_GNU_EH_FRAME = 0x6474e550,
95 PT_GNU_STACK = 0x6474e551,
96 PT_GNU_RELRO = 0x6474e552,
97 PT_PAX_FLAGS = 0x65041580,
99 // OS-specific values for Sun
100 PT_SUNWBSS = 0x6ffffffa,
101 PT_SUNWSTACK = 0x6ffffffb
102 };
103
105 enum SegmentFlags {
106 PF_NONE = 0,
107 PF_RESERVED = 0x000ffff8,
108 PF_XPERM = 0x00000001,
109 PF_WPERM = 0x00000002,
110 PF_RPERM = 0x00000004,
111 PF_OS_MASK = 0x0ff00000,
112 PF_PROC_MASK = 0xf0000000
113 };
114
115#ifdef _MSC_VER
116# pragma pack (1)
117#endif
125 struct Elf32SegmentTableEntry_disk {
126 uint32_t p_type;
127 uint32_t p_offset;
128 uint32_t p_vaddr;
129 uint32_t p_paddr;
130 uint32_t p_filesz;
131 uint32_t p_memsz;
132 uint32_t p_flags;
133 uint32_t p_align;
134 } /* 0x30 */
135#if !defined(SWIG) && !defined(_MSC_VER)
136 __attribute__((packed))
137#endif
138 ;
139
140 struct Elf64SegmentTableEntry_disk {
141 uint32_t p_type; /* 0x00 */
142 uint32_t p_flags; /* 0x04 */
143 uint64_t p_offset; /* 0x08 */
144 uint64_t p_vaddr; /* 0x10 */
145 uint64_t p_paddr; /* 0x18 */
146 uint64_t p_filesz; /* 0x20 */
147 uint64_t p_memsz; /* 0x28 */
148 uint64_t p_align; /* 0x30 */
149 } /* 0x38 */
150#if !defined(SWIG) && !defined(_MSC_VER)
151 __attribute__((packed))
152#endif
153 ;
154#ifdef _MSC_VER
155# pragma pack ()
156#endif
157
159 // Properties
161public:
162public:
168 size_t const& get_index() const;
169 void set_index(size_t const&);
172public:
176 SgAsmElfSegmentTableEntry::SegmentType const& get_type() const;
177 void set_type(SgAsmElfSegmentTableEntry::SegmentType const&);
180public:
184 SgAsmElfSegmentTableEntry::SegmentFlags const& get_flags() const;
185 void set_flags(SgAsmElfSegmentTableEntry::SegmentFlags const&);
188public:
194 Rose::BinaryAnalysis::Address const& get_offset() const;
195 void set_offset(Rose::BinaryAnalysis::Address const&);
198public:
205 Rose::BinaryAnalysis::Address const& get_vaddr() const;
206 void set_vaddr(Rose::BinaryAnalysis::Address const&);
209public:
215 Rose::BinaryAnalysis::Address const& get_paddr() const;
216 void set_paddr(Rose::BinaryAnalysis::Address const&);
219public:
225 Rose::BinaryAnalysis::Address const& get_filesz() const;
226 void set_filesz(Rose::BinaryAnalysis::Address const&);
229public:
235 Rose::BinaryAnalysis::Address const& get_memsz() const;
236 void set_memsz(Rose::BinaryAnalysis::Address const&);
239public:
245 Rose::BinaryAnalysis::Address const& get_align() const;
246 void set_align(Rose::BinaryAnalysis::Address const&);
249public:
255 SgUnsignedCharList const& get_extra() const;
256 SgUnsignedCharList& get_extra();
257 void set_extra(SgUnsignedCharList const&);
260 // Functions
262public:
266
270
279 void updateFromSection(SgAsmElfSection*);
280
282 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
283
286
289
291 // Deprecated 2023-11
293public:
294 void update_from_section(SgAsmElfSection*) ROSE_DEPRECATED("use updateFromSection");
295 static std::string to_string(SgAsmElfSegmentTableEntry::SegmentType) ROSE_DEPRECATED("use toString");
296 static std::string to_string(SgAsmElfSegmentTableEntry::SegmentFlags) ROSE_DEPRECATED("use toString");
297public:
300
301public:
304
305protected:
313
314
315// End of memberFunctionString
316// Start of memberFunctionString
317/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
318
319// *** COMMON CODE SECTION BEGINS HERE ***
320
321 public:
322
323 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
324 // and not required which is required to match the other aspects of the copy mechanism code generation.
325 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
326 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
327 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
328 // virtual SgNode* copy ( const SgCopyHelp & help) const;
329
331 virtual std::string class_name() const override;
332
334 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
335
337 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
338 // static const VariantT static_variant = V_SgAsmElfSegmentTableEntry;
339 enum { static_variant = V_SgAsmElfSegmentTableEntry };
340
341 /* the generated cast function */
343 ROSE_DLL_API friend SgAsmElfSegmentTableEntry* isSgAsmElfSegmentTableEntry( SgNode * s );
344
346 ROSE_DLL_API friend const SgAsmElfSegmentTableEntry* isSgAsmElfSegmentTableEntry( const SgNode * s );
347
348 // ******************************************
349 // * Memory Pool / New / Delete
350 // ******************************************
351
352 public:
354 static const unsigned pool_size; //
356 static std::vector<unsigned char *> pools; //
358 static SgAsmElfSegmentTableEntry * next_node; //
359
361 static unsigned long initializeStorageClassArray(SgAsmElfSegmentTableEntryStorageClass *); //
362
364 static void clearMemoryPool(); //
365 static void deleteMemoryPool(); //
366
368 static void extendMemoryPoolForFileIO(); //
369
371 static SgAsmElfSegmentTableEntry * getPointerFromGlobalIndex(unsigned long); //
373 static SgAsmElfSegmentTableEntry * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
374
376 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
378 static void resetValidFreepointers(); //
380 static unsigned long getNumberOfLastValidPointer(); //
381
382
383#if defined(INLINE_FUNCTIONS)
385 inline void *operator new (size_t size);
386#else
388 void *operator new (size_t size);
389#endif
391 void operator delete (void* pointer, size_t size);
392
393 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
394 void operator delete (void* pointer)
395 {
396 // This is the generated delete operator...
397 SgAsmElfSegmentTableEntry::operator delete (pointer,sizeof(SgAsmElfSegmentTableEntry));
398 }
399
401 static size_t numberOfNodes();
402
404 static size_t memoryUsage();
405
406 // End of scope which started in IR nodes specific code
407 /* */
408
409 /* name Internal Functions
410 \brief Internal functions ... incomplete-documentation
411
412 These functions have been made public as part of the design, but they are suggested for internal use
413 or by particularly knowledgeable users for specialized tools or applications.
414
415 \internal We could not make these private because they are required by user for special purposes. And
416 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
417
418 */
419
420 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
421 // overridden in every class by *generated* implementation
423 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
424 // MS: 06/28/02 container of names of variables or container indices
425 // used used in the traversal to access AST successor nodes
426 // overridden in every class by *generated* implementation
429 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
430
431 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
432 // than all the vector copies. The implementation for these functions is generated for each class.
434 virtual size_t get_numberOfTraversalSuccessors() const override;
436 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
438 virtual size_t get_childIndex(SgNode *child) const override;
439
440#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
441 // MS: 08/16/2002 method for generating RTI information
443 virtual RTIReturnType roseRTI() override;
444#endif
445 /* */
446
447
448
449 /* name Deprecated Functions
450 \brief Deprecated functions ... incomplete-documentation
451
452 These functions have been deprecated from use.
453 */
454 /* */
455
457 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
458
459 // JJW (10/16/2008): Changed to a single function in Node.code, and put
460 // getVariant() in #if 0 block to prevent confusing Doxygen
461#if 0
463 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
465 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
466#endif
467 /* */
468
469
470
471
472 public:
473 /* name Traversal Support Functions
474 \brief Traversal support functions ... incomplete-documentation
475
476 These functions have been made public as part of the design, but they are suggested for internal use
477 or by particularly knowledgable users for specialized tools or applications.
478 */
479 /* */
480
481 // DQ (11/26/2005): Support for visitor pattern mechanims
482 // (inferior to ROSE traversal mechanism, experimental).
486
487 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
489 virtual void accept (ROSE_VisitorPattern & visitor) override;
490
491 // DQ (12/26/2005): Support for traversal based on the memory pool
494 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
495
499
500 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
501 // This traversal helps support internal tools that call static member functions.
502 // note: this function operates on the memory pools.
505 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
506 /* */
507
508 public:
509 /* NodeId support functions */
511 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
514 static SgAsmElfSegmentTableEntry* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
517 static std::string getNodeIdString(SgAsmElfSegmentTableEntry* sgnode);
518 static std::string getNodeIdStringInternal(SgAsmElfSegmentTableEntry* sgnode);
519
520 public:
521 /* name Memory Allocation Functions
522 \brief Memory allocations functions ... incomplete-documentation
523
524 These functions have been made public as part of the design, but they are suggested for internal use
525 or by particularly knowledgable users for specialized tools or applications.
526 */
527 /* */
528
539 virtual bool isInMemoryPool() override;
540
551 virtual void checkDataMemberPointersIfInMemoryPool() override;
552
553 // DQ (4/30/2006): Modified to be a const function.
568 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
569
580
592 virtual long getChildIndex( SgNode* childNode ) const override;
593
594 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
595 // comment here (changed to be a C style comment and not be a doxygen comment).
596 /* \brief Constructor for use by AST File I/O Mechanism
597
598 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
599 which obtained via fast binary file I/O from disk.
600 */
601 // SgAsmElfSegmentTableEntry( SgAsmElfSegmentTableEntryStorageClass& source );
602
603
604
605
606
607 // JH (10/24/2005): methods added to support the ast file IO
608 private:
609
610 /* name AST Memory Allocation Support Functions
611 \brief Memory allocations support....
612
613 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
614 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
615 and support the AST File I/O Mechanism.
616 */
617 /* */
618
619 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
620 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
621 that I use the same type everywhere, if any changes are made. THe second one declares the type
622 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
623 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
624 a correspinding one in the AST_FILE_IO class!
625 */
626 // DQ (9/2/2015): This typedef is no longer used, we can't define the
627 // comment here (changed to be a C style comment and not be a doxygen comment).
628 /* \brief Typedef used for low level memory access.
629 */
630 // typedef unsigned char* TestType;
631
632 // DQ (9/2/2015): This typedef is no longer used, we can't define the
633 // comment here (changed to be a C style comment and not be a doxygen comment).
634 /* \brief Typedef used to hold memory addresses as values.
635 */
636 // typedef unsigned long AddressType;
637
638
639
640 // necessary, to have direct access to the p_freepointer and the private methods !
642 friend class AST_FILE_IO;
643
645 friend class SgAsmElfSegmentTableEntryStorageClass;
646
648 friend class AstSpecificDataManagingClass;
649
651 friend class AstSpecificDataManagingClassStorageClass;
652 public:
654 SgAsmElfSegmentTableEntry( const SgAsmElfSegmentTableEntryStorageClass& source );
655
656 // private: // JJW hack
657 /*
658 name AST Memory Allocation Support Variables
659 Memory allocations support variables
660
661 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
662 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
663 and support the AST File I/O Mechanism.
664 */
665 /* */
666
667 public:
668
669 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
670 // to current node (so that it will work cleanly with build functions to specify patterns).
671 // virtual SgNode* addRegExpAttribute();
678
679#ifndef _MSC_VER
680// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
681// and likely never fully implemented nor tested. Files remain in the src tree but are no
682// longer built.
683#define BUILD_ATERM_SUPPORT 0
684 #if BUILD_ATERM_SUPPORT
685 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
686 // DQ (10/4/2014): Adding ATerm support to ROSE.
696 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
697 virtual ATerm generate_ATerm() override;
698
700 virtual void generate_ATerm_Annotation(ATerm & term) override;
701 #endif
702 #endif // BUILD_ATERM_SUPPORT
703#endif
704 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
705 // virtual generate_AST(ATerm & term);
706 // virtual void read_ATerm_Annotation(ATerm & term);
707
708// *** COMMON CODE SECTION ENDS HERE ***
709
710
711// End of memberFunctionString
712// Start of memberFunctionString
713/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
714
715 // the generated cast function
716 // friend ROSE_DLL_API SgAsmElfSegmentTableEntry* isSgAsmElfSegmentTableEntry ( SgNode* s );
717
718 typedef SgAsmExecutableFileFormat base_node_type;
719
720
721// End of memberFunctionString
722
723
724
725
726
727
728
729
730
731
732
733 protected:
734// Start of memberFunctionString
735size_t p_index;
736
737// End of memberFunctionString
738// Start of memberFunctionString
740
741// End of memberFunctionString
742// Start of memberFunctionString
744
745// End of memberFunctionString
746// Start of memberFunctionString
748
749// End of memberFunctionString
750// Start of memberFunctionString
752
753// End of memberFunctionString
754// Start of memberFunctionString
756
757// End of memberFunctionString
758// Start of memberFunctionString
760
761// End of memberFunctionString
762// Start of memberFunctionString
764
765// End of memberFunctionString
766// Start of memberFunctionString
768
769// End of memberFunctionString
770// Start of memberFunctionString
771SgUnsignedCharList p_extra;
772
773// End of memberFunctionString
774
776 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, size_t,&SgAsmElfSegmentTableEntry::p_index>;
778 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, SgAsmElfSegmentTableEntry::SegmentFlags,&SgAsmElfSegmentTableEntry::p_flags>;
779 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSegmentTableEntry::p_offset>;
780 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSegmentTableEntry::p_vaddr>;
781 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSegmentTableEntry::p_paddr>;
782 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSegmentTableEntry::p_filesz>;
783 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSegmentTableEntry::p_memsz>;
784 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSegmentTableEntry::p_align>;
785 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSegmentTableEntry, SgUnsignedCharList,&SgAsmElfSegmentTableEntry::p_extra>;
786
787/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
788
789
790 };
791#endif
792
793// postdeclarations for SgAsmElfSegmentTableEntry
794
795/* #line 796 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
796
797/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
798
799/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
800
801
802/* #line 803 "../../../src/frontend/SageIII//SgAsmElfSegmentTableEntry.h" */
803
804#endif // ROSE_SgAsmElfSegmentTableEntry_H
805
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 RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual size_t get_numberOfTraversalSuccessors() const
return number of children in the traversal successor list
virtual std::vector< std::string > get_traversalSuccessorNamesContainer() const
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual size_t get_childIndex(SgNode *child) const
index-based access to traversal successors by child node
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual 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 void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual SgNode * get_traversalSuccessorByIndex(size_t idx) const
index-based access to traversal successors by index number
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
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
std::uint64_t Address
Address.
Definition Address.h:11
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.