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