ROSE 0.11.145.192
SgAsmPESectionTableEntry.h
1
2#ifndef ROSE_SgAsmPESectionTableEntry_H
3#define ROSE_SgAsmPESectionTableEntry_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 SgAsmPESectionTableEntry
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmPESectionTableEntry.h" */
25
26/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
27
28/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
29
30#if !defined(DOCUMENTATION)
31// Class Definition for SgAsmPESectionTableEntry
33 {
34 public:
35
36
37/* #line 38 "../../../src/frontend/SageIII//SgAsmPESectionTableEntry.h" */
38
39 virtual SgNode* copy ( SgCopyHelp& help) const override;
40// Start of memberFunctionString
41/* #line 2249 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
42
43
44 //----------------------- Boost serialization for SgAsmPESectionTableEntry -----------------------
45#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
46private:
47 friend class boost::serialization::access;
48
49 template<class S>
50 void serialize(S &s, const unsigned /*version*/) {
51 debugSerializationBegin("SgAsmPESectionTableEntry");
52 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
53 s & BOOST_SERIALIZATION_NVP(p_name);
54 s & BOOST_SERIALIZATION_NVP(p_virtual_size);
55 s & BOOST_SERIALIZATION_NVP(p_rva);
56 s & BOOST_SERIALIZATION_NVP(p_physical_size);
57 s & BOOST_SERIALIZATION_NVP(p_physical_offset);
58 s & BOOST_SERIALIZATION_NVP(p_coff_line_nums);
59 s & BOOST_SERIALIZATION_NVP(p_n_relocs);
60 s & BOOST_SERIALIZATION_NVP(p_n_coff_line_nums);
61 s & BOOST_SERIALIZATION_NVP(p_flags);
62 debugSerializationEnd("SgAsmPESectionTableEntry");
63 }
64#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
66 // Local types
68public:
69#ifdef _MSC_VER
70# pragma pack (1)
71#endif
72 /* File format of a section table entry. All fields are little endian. Sections are ordered by RVA. */
73 struct PESectionTableEntry_disk {
74 char name[8]; /* NUL-padded */
75 uint32_t virtual_size; /* virtual memory size, >= physical_size and difference is zero filled */
76 uint32_t rva; /* relative virt addr wrt Image Base; multiple of section_align; dense space */
77 uint32_t physical_size; /* bytes of initialized data on disk; multiple of file_align & <= virtual_size*/
78 uint32_t physical_offset; /* location of initialized data on disk; multiple of file_align */
79 uint32_t coff_line_nums; /* file offset of COFF line number info or zero */
80 uint32_t n_relocs; /* number of relocation entries; should be zero for executables */
81 uint32_t n_coff_line_nums; /* number of COFF line number entries */
82 uint32_t flags; /* PESectionFlags bits: code, data, caching, paging, shared, permissions, etc.*/
83 }
84#if !defined(SWIG) && !defined(_MSC_VER)
85 __attribute__((packed))
86#endif
87 ;
88#ifdef _MSC_VER
89# pragma pack ()
90#endif
91
92 /* These come from the windows PE documentation and
93 * http://en.wikibooks.org/wiki/X86_Disassembly/Windows_Executable_Files */
94 enum PESectionFlags {
95 OF_CODE = 0x00000020, /* section contains code */
96 OF_IDATA = 0x00000040, /* initialized data */
97 OF_UDATA = 0x00000080, /* uninitialized data */
98 OF_INFO = 0x00000200, /* comments or some other type of info */
99 OF_REMOVE = 0x00000800, /* section will not become part of image */
100 OF_COMDAT = 0x00001000, /* section contains comdat */
101 OF_NO_DEFER_SPEC_EXC= 0x00004000, /* reset speculative exception handling bits in the TLB entires for
102 * this section */
103 OF_GPREL = 0x00008000, /* section content can be access relative to GP */
104 OF_ALIGN_1 = 0x00100000, /* no alignment */
105 OF_ALIGN_2 = 0x00200000, /* 2-byte alignment */
106 OF_ALIGN_4 = 0x00300000, /* 4-byte alignment */
107 OF_ALIGN_8 = 0x00400000, /* 8-byte alignment */
108 OF_ALIGN_16 = 0x00500000, /* 16-byte alignment (default if not other alignment specified) */
109 OF_ALIGN_32 = 0x00600000, /* 32-byte alignment */
110 OF_ALIGN_64 = 0x00700000, /* 64-byte alignment */
111 OF_ALIGN_128 = 0x00800000, /* 128-byte alignment */
112 OF_ALIGN_256 = 0x00900000, /* 256-byte alignment */
113 OF_ALIGN_512 = 0x00a00000, /* 512-byte alignment */
114 OF_ALIGN_1k = 0x00b00000, /* 1024-byte alignment */
115 OF_ALIGN_2k = 0x00c00000, /* 2048-byte alignment */
116 OF_ALIGN_4k = 0x00d00000, /* 4096-byte alignment */
117 OF_ALIGN_8k = 0x00e00000, /* 8192-byte alignment */
118 OF_ALIGN_MASK = 0x00f00000, /* mask for alignment value */
119 OF_NRELOC_OVFL = 0x01000000, /* section contains extended relocations */
120 OF_DISCARDABLE = 0x02000000, /* can be discarded */
121 OF_NO_CACHE = 0x04000000, /* section must not be cached */
122 OF_NO_PAGING = 0x08000000, /* section is not pageable */
123 OF_SHARED = 0x10000000, /* section is shared */
124 OF_EXECUTABLE = 0x20000000, /* execute permission */
125 OF_READABLE = 0x40000000, /* read permission */
126 OF_WRITABLE = 0x80000000 /* write permission */
127 };
128
130 // Properties
132public:
133public:
139 std::string const& get_name() const;
140 void set_name(std::string const&);
143public:
149 rose_addr_t const& get_virtual_size() const;
150 void set_virtual_size(rose_addr_t const&);
153public:
159 rose_addr_t const& get_rva() const;
160 void set_rva(rose_addr_t const&);
163public:
169 rose_addr_t const& get_physical_size() const;
170 void set_physical_size(rose_addr_t const&);
173public:
179 rose_addr_t const& get_physical_offset() const;
180 void set_physical_offset(rose_addr_t const&);
183public:
189 unsigned const& get_coff_line_nums() const;
190 void set_coff_line_nums(unsigned const&);
193public:
199 unsigned const& get_n_relocs() const;
200 void set_n_relocs(unsigned const&);
203public:
209 unsigned const& get_n_coff_line_nums() const;
210 void set_n_coff_line_nums(unsigned const&);
213public:
219 unsigned const& get_flags() const;
220 void set_flags(unsigned const&);
223 // Functions
225public:
227
229 void updateFromSection(SgAsmPESection *section);
231 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
232
234 // Deprecated 2023-11
236public:
237 void update_from_section(SgAsmPESection*) ROSE_DEPRECATED("use updateFromSection");
238public:
241
242public:
245
246protected:
254
255
256// End of memberFunctionString
257// Start of memberFunctionString
258/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
259
260// *** COMMON CODE SECTION BEGINS HERE ***
261
262 public:
263
264 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
265 // and not required which is required to match the other aspects of the copy mechanism code generation.
266 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
267 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
268 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
269 // virtual SgNode* copy ( const SgCopyHelp & help) const;
270
272 virtual std::string class_name() const override;
273
275 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
276
278 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
279 // static const VariantT static_variant = V_SgAsmPESectionTableEntry;
280 enum { static_variant = V_SgAsmPESectionTableEntry };
281
282 /* the generated cast function */
284 ROSE_DLL_API friend SgAsmPESectionTableEntry* isSgAsmPESectionTableEntry( SgNode * s );
285
287 ROSE_DLL_API friend const SgAsmPESectionTableEntry* isSgAsmPESectionTableEntry( const SgNode * s );
288
289 // ******************************************
290 // * Memory Pool / New / Delete
291 // ******************************************
292
293 public:
295 static const unsigned pool_size; //
297 static std::vector<unsigned char *> pools; //
299 static SgAsmPESectionTableEntry * next_node; //
300
302 static unsigned long initializeStorageClassArray(SgAsmPESectionTableEntryStorageClass *); //
303
305 static void clearMemoryPool(); //
306 static void deleteMemoryPool(); //
307
309 static void extendMemoryPoolForFileIO(); //
310
312 static SgAsmPESectionTableEntry * getPointerFromGlobalIndex(unsigned long); //
314 static SgAsmPESectionTableEntry * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
315
317 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
319 static void resetValidFreepointers(); //
321 static unsigned long getNumberOfLastValidPointer(); //
322
323
324#if defined(INLINE_FUNCTIONS)
326 inline void *operator new (size_t size);
327#else
329 void *operator new (size_t size);
330#endif
332 void operator delete (void* pointer, size_t size);
333
334 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
335 void operator delete (void* pointer)
336 {
337 // This is the generated delete operator...
338 SgAsmPESectionTableEntry::operator delete (pointer,sizeof(SgAsmPESectionTableEntry));
339 }
340
342 static size_t numberOfNodes();
343
345 static size_t memoryUsage();
346
347 // End of scope which started in IR nodes specific code
348 /* */
349
350 /* name Internal Functions
351 \brief Internal functions ... incomplete-documentation
352
353 These functions have been made public as part of the design, but they are suggested for internal use
354 or by particularly knowledgeable users for specialized tools or applications.
355
356 \internal We could not make these private because they are required by user for special purposes. And
357 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
358
359 */
360
361 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
362 // overridden in every class by *generated* implementation
364 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
365 // MS: 06/28/02 container of names of variables or container indices
366 // used used in the traversal to access AST successor nodes
367 // overridden in every class by *generated* implementation
370 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
371
372 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
373 // than all the vector copies. The implementation for these functions is generated for each class.
375 virtual size_t get_numberOfTraversalSuccessors() override;
377 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
379 virtual size_t get_childIndex(SgNode *child) override;
380
381#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
382 // MS: 08/16/2002 method for generating RTI information
384 virtual RTIReturnType roseRTI() override;
385#endif
386 /* */
387
388
389
390 /* name Deprecated Functions
391 \brief Deprecated functions ... incomplete-documentation
392
393 These functions have been deprecated from use.
394 */
395 /* */
396
398 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
399
400 // JJW (10/16/2008): Changed to a single function in Node.code, and put
401 // getVariant() in #if 0 block to prevent confusing Doxygen
402#if 0
404 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
406 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
407#endif
408 /* */
409
410
411
412
413 public:
414 /* name Traversal Support Functions
415 \brief Traversal support functions ... incomplete-documentation
416
417 These functions have been made public as part of the design, but they are suggested for internal use
418 or by particularly knowledgable users for specialized tools or applications.
419 */
420 /* */
421
422 // DQ (11/26/2005): Support for visitor pattern mechanims
423 // (inferior to ROSE traversal mechanism, experimental).
427
428 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
430 virtual void accept (ROSE_VisitorPattern & visitor) override;
431
432 // DQ (12/26/2005): Support for traversal based on the memory pool
435 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
436
440
441 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
442 // This traversal helps support internal tools that call static member functions.
443 // note: this function operates on the memory pools.
446 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
447 /* */
448
449 public:
450 /* NodeId support functions */
452 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
455 static SgAsmPESectionTableEntry* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
458 static std::string getNodeIdString(SgAsmPESectionTableEntry* sgnode);
459 static std::string getNodeIdStringInternal(SgAsmPESectionTableEntry* sgnode);
460
461 public:
462 /* name Memory Allocation Functions
463 \brief Memory allocations functions ... incomplete-documentation
464
465 These functions have been made public as part of the design, but they are suggested for internal use
466 or by particularly knowledgable users for specialized tools or applications.
467 */
468 /* */
469
480 virtual bool isInMemoryPool() override;
481
492 virtual void checkDataMemberPointersIfInMemoryPool() override;
493
494 // DQ (4/30/2006): Modified to be a const function.
509 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
510
521
533 virtual long getChildIndex( SgNode* childNode ) const override;
534
535 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
536 // comment here (changed to be a C style comment and not be a doxygen comment).
537 /* \brief Constructor for use by AST File I/O Mechanism
538
539 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
540 which obtained via fast binary file I/O from disk.
541 */
542 // SgAsmPESectionTableEntry( SgAsmPESectionTableEntryStorageClass& source );
543
544
545
546
547
548 // JH (10/24/2005): methods added to support the ast file IO
549 private:
550
551 /* name AST Memory Allocation Support Functions
552 \brief Memory allocations support....
553
554 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
555 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
556 and support the AST File I/O Mechanism.
557 */
558 /* */
559
560 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
561 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
562 that I use the same type everywhere, if any changes are made. THe second one declares the type
563 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
564 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
565 a correspinding one in the AST_FILE_IO class!
566 */
567 // DQ (9/2/2015): This typedef is no longer used, we can't define the
568 // comment here (changed to be a C style comment and not be a doxygen comment).
569 /* \brief Typedef used for low level memory access.
570 */
571 // typedef unsigned char* TestType;
572
573 // DQ (9/2/2015): This typedef is no longer used, we can't define the
574 // comment here (changed to be a C style comment and not be a doxygen comment).
575 /* \brief Typedef used to hold memory addresses as values.
576 */
577 // typedef unsigned long AddressType;
578
579
580
581 // necessary, to have direct access to the p_freepointer and the private methods !
583 friend class AST_FILE_IO;
584
586 friend class SgAsmPESectionTableEntryStorageClass;
587
589 friend class AstSpecificDataManagingClass;
590
592 friend class AstSpecificDataManagingClassStorageClass;
593 public:
595 SgAsmPESectionTableEntry( const SgAsmPESectionTableEntryStorageClass& source );
596
597 // private: // JJW hack
598 /*
599 name AST Memory Allocation Support Variables
600 Memory allocations support variables
601
602 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
603 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
604 and support the AST File I/O Mechanism.
605 */
606 /* */
607
608 public:
609
610 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
611 // to current node (so that it will work cleanly with build functions to specify patterns).
612 // virtual SgNode* addRegExpAttribute();
619
620#ifndef _MSC_VER
621// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
622// and likely never fully implemented nor tested. Files remain in the src tree but are no
623// longer built.
624#define BUILD_ATERM_SUPPORT 0
625 #if BUILD_ATERM_SUPPORT
626 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
627 // DQ (10/4/2014): Adding ATerm support to ROSE.
637 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
638 virtual ATerm generate_ATerm() override;
639
641 virtual void generate_ATerm_Annotation(ATerm & term) override;
642 #endif
643 #endif // BUILD_ATERM_SUPPORT
644#endif
645 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
646 // virtual generate_AST(ATerm & term);
647 // virtual void read_ATerm_Annotation(ATerm & term);
648
649// *** COMMON CODE SECTION ENDS HERE ***
650
651
652// End of memberFunctionString
653// Start of memberFunctionString
654/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
655
656 // the generated cast function
657 // friend ROSE_DLL_API SgAsmPESectionTableEntry* isSgAsmPESectionTableEntry ( SgNode* s );
658
659 typedef SgAsmExecutableFileFormat base_node_type;
660
661
662// End of memberFunctionString
663
664
665
666
667
668
669
670
671
672
673 protected:
674// Start of memberFunctionString
675std::string p_name;
676
677// End of memberFunctionString
678// Start of memberFunctionString
679rose_addr_t p_virtual_size;
680
681// End of memberFunctionString
682// Start of memberFunctionString
683rose_addr_t p_rva;
684
685// End of memberFunctionString
686// Start of memberFunctionString
687rose_addr_t p_physical_size;
688
689// End of memberFunctionString
690// Start of memberFunctionString
691rose_addr_t p_physical_offset;
692
693// End of memberFunctionString
694// Start of memberFunctionString
695unsigned p_coff_line_nums;
696
697// End of memberFunctionString
698// Start of memberFunctionString
699unsigned p_n_relocs;
700
701// End of memberFunctionString
702// Start of memberFunctionString
703unsigned p_n_coff_line_nums;
704
705// End of memberFunctionString
706// Start of memberFunctionString
707unsigned p_flags;
708
709// End of memberFunctionString
710
712 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, std::string,&SgAsmPESectionTableEntry::p_name>;
713 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, rose_addr_t,&SgAsmPESectionTableEntry::p_virtual_size>;
714 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, rose_addr_t,&SgAsmPESectionTableEntry::p_rva>;
715 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, rose_addr_t,&SgAsmPESectionTableEntry::p_physical_size>;
716 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, rose_addr_t,&SgAsmPESectionTableEntry::p_physical_offset>;
717 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, unsigned,&SgAsmPESectionTableEntry::p_coff_line_nums>;
718 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, unsigned,&SgAsmPESectionTableEntry::p_n_relocs>;
719 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, unsigned,&SgAsmPESectionTableEntry::p_n_coff_line_nums>;
720 friend struct Rose::Traits::generated::describe_field_t<SgAsmPESectionTableEntry, unsigned,&SgAsmPESectionTableEntry::p_flags>;
721
722/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
723
724
725 };
726#endif
727
728// postdeclarations for SgAsmPESectionTableEntry
729
730/* #line 731 "../../../src/frontend/SageIII//SgAsmPESectionTableEntry.h" */
731
732/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
733
734/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
735
736
737/* #line 738 "../../../src/frontend/SageIII//SgAsmPESectionTableEntry.h" */
738
739#endif // ROSE_SgAsmPESectionTableEntry_H
740
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 many binary analysis nodes.
void initializeProperties()
Initialize all properties that have explicit initial values.
Base class for PE sections.
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.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
ROSE_DLL_API int set_name(SgInitializedName *initializedNameNode, SgName new_name)
set_name of symbol in symbol table.
std::string get_name(const SgNode *node)
Generate a useful name to describe the SgNode.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * PESectionFlags(int64_t)
Convert SgAsmPESectionTableEntry::PESectionFlags enum constant to a string.