ROSE 0.11.145.147
SgAsmGenericHeader.h
1
2#ifndef ROSE_SgAsmGenericHeader_H
3#define ROSE_SgAsmGenericHeader_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmGenericSection.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 SgAsmGenericHeader
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmGenericHeader.h" */
25/* #line 28601 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/ByteOrder.h>
28#include <Rose/BinaryAnalysis/RelativeVirtualAddress.h>
29#include <sageContainer.h>
30#include <SgAsmGenericFormat.h>
31
32#ifdef ROSE_SgAsmGenericHeader_IMPL
33#include <SgAsmGenericDLLList.h>
34#include <SgAsmGenericSectionList.h>
35#endif
36
37class SgAsmGenericDLL;
39
40
41/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
42
43/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
44
45#if !defined(DOCUMENTATION)
46// Class Definition for SgAsmGenericHeader
47class ROSE_DLL_API SgAsmGenericHeader : public SgAsmGenericSection
48 {
49 public:
50
51
52/* #line 53 "../../../src/frontend/SageIII//SgAsmGenericHeader.h" */
53
54 virtual SgNode* copy ( SgCopyHelp& help) const override;
55// Start of memberFunctionString
56/* #line 28664 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
57
58
59 //----------------------- Boost serialization for SgAsmGenericHeader -----------------------
60#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
61private:
62 friend class boost::serialization::access;
63
64 template<class S>
65 void serialize(S &s, const unsigned /*version*/) {
66 debugSerializationBegin("SgAsmGenericHeader");
67 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmGenericSection);
68 s & BOOST_SERIALIZATION_NVP(p_executableFormat);
69 s & BOOST_SERIALIZATION_NVP(p_magic);
70 s & BOOST_SERIALIZATION_NVP(p_isa);
71 s & BOOST_SERIALIZATION_NVP(p_baseVa);
72 s & BOOST_SERIALIZATION_NVP(p_entryRvas);
73 s & BOOST_SERIALIZATION_NVP(p_dlls);
74 s & BOOST_SERIALIZATION_NVP(p_sections);
75 debugSerializationEnd("SgAsmGenericHeader");
76 }
77#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
78public:
79public:
83 SgAsmGenericFormat* const& get_executableFormat() const;
84 void set_executableFormat(SgAsmGenericFormat* const&);
87public:
91 SgCharList const& get_magic() const;
92 SgCharList& get_magic();
93 void set_magic(SgCharList const&);
96public:
100 SgAsmGenericFormat::InsSetArchitecture const& get_isa() const;
101 void set_isa(SgAsmGenericFormat::InsSetArchitecture const&);
104public:
108 rose_addr_t const& get_baseVa() const;
109 void set_baseVa(rose_addr_t const&);
112public:
116 SgRVAList const& get_entryRvas() const;
117 SgRVAList& get_entryRvas();
118 void set_entryRvas(SgRVAList const&);
121public:
125 SgAsmGenericDLLList* const& get_dlls() const;
126 void set_dlls(SgAsmGenericDLLList* const&);
129public:
133 SgAsmGenericSectionList* const& get_sections() const;
134 void set_sections(SgAsmGenericSectionList* const&);
136public:
145
146 virtual bool reallocate() override;
147
149 virtual void unparse(std::ostream&) const override;
150
152 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
153
155 virtual const char *formatName() const;
156
158 void addDll(SgAsmGenericDLL *dll);
159
161 std::vector<SgAsmGenericDLL*>& get_dlls();
162
167 rose_addr_t get_entryRva() const;
168
170 void addEntryRva(const Rose::BinaryAnalysis::RelativeVirtualAddress&);
171
172 /* Convenience functions */
174 size_t get_wordSize() const;
175
179 void addSection(SgAsmGenericSection*);
180
182 void removeSection(SgAsmGenericSection*);
183
185 SgAsmGenericSectionPtrList get_mappedSections() const;
186
188 SgAsmGenericSectionPtrList get_sectionsById(int id) const;
189
193 SgAsmGenericSectionPtrList get_sectionsByName(std::string, char sep=0) const;
194
196 SgAsmGenericSectionPtrList get_sectionsByOffset(rose_addr_t offset, rose_addr_t size) const;
197
199 SgAsmGenericSectionPtrList get_sectionsByRva(rose_addr_t rva) const;
200
207 SgAsmGenericSectionPtrList get_sectionsByVa(rose_addr_t va, bool use_preferred) const;
208
210 SgAsmGenericSection *get_sectionById(int id, size_t *nfound=0) const;
211
213 SgAsmGenericSection *get_sectionByName(const std::string&, char sep=0, size_t *nfound=0) const;
214
216 SgAsmGenericSection *get_sectionByOffset(rose_addr_t offset, rose_addr_t size, size_t *nfound=0) const;
217
221 SgAsmGenericSection *get_sectionByRva(rose_addr_t rva, size_t *nfound=0) const;
222
229 SgAsmGenericSection *get_sectionByVa(rose_addr_t va, bool use_preferred, size_t *nfound=0) const;
230
232 SgAsmGenericSection *get_bestSectionByVa(rose_addr_t va, bool use_preferred, size_t *nfound=0) const;
233
235 // Deprecated 2023-11
237public:
238 SgAsmGenericFormat* get_exec_format() const ROSE_DEPRECATED("use get_executableFormat");
239 void set_exec_format(SgAsmGenericFormat*) ROSE_DEPRECATED("use set_executableFormat");
240 rose_addr_t get_base_va() const ROSE_DEPRECATED("use get_baseVa");
241 void set_base_va(rose_addr_t) ROSE_DEPRECATED("use set_baseVa");
242 SgRVAList& get_entry_rvas() ROSE_DEPRECATED("use get_entryRvas");
243 const SgRVAList& get_entry_rvas() const ROSE_DEPRECATED("use get_entryRvas");
244 void set_entry_rvas(const SgRVAList&) ROSE_DEPRECATED("use set_entryRvas");
245 virtual const char *format_name() const ROSE_DEPRECATED("use formatName");
246 void add_dll(SgAsmGenericDLL*) ROSE_DEPRECATED("use addDll");
247 rose_addr_t get_entry_rva() const ROSE_DEPRECATED("use get_entryRva");
248 void add_entry_rva(const Rose::BinaryAnalysis::RelativeVirtualAddress&) ROSE_DEPRECATED("use addEntryRva");
249 size_t get_word_size() const ROSE_DEPRECATED("use get_wordSize");
250 void add_section(SgAsmGenericSection*) ROSE_DEPRECATED("use addSection");
251 void remove_section(SgAsmGenericSection*) ROSE_DEPRECATED("use removeSection");
252 SgAsmGenericSectionPtrList get_mapped_sections() const ROSE_DEPRECATED("use get_mappedSections");
253 SgAsmGenericSectionPtrList get_sections_by_id(int) const ROSE_DEPRECATED("use get_sectionsById");
254 SgAsmGenericSectionPtrList get_sections_by_name(std::string, char=0) const ROSE_DEPRECATED("use get_sectionsByName");
255 SgAsmGenericSectionPtrList get_sections_by_offset(rose_addr_t, rose_addr_t) const ROSE_DEPRECATED("use get_sectionsByOffset");
256 SgAsmGenericSectionPtrList get_sections_by_rva(rose_addr_t) const ROSE_DEPRECATED("use get_sectionsByRva");
257 SgAsmGenericSectionPtrList get_sections_by_va(rose_addr_t, bool) const ROSE_DEPRECATED("use get_sectionsByVa");
258 SgAsmGenericSection *get_section_by_id(int, size_t* = nullptr) const ROSE_DEPRECATED("use get_sectionById");
259 SgAsmGenericSection *get_section_by_name(const std::string&, char=0, size_t* = nullptr) const
260 ROSE_DEPRECATED("use get_sectionByName");
261 SgAsmGenericSection *get_section_by_offset(rose_addr_t, rose_addr_t, size_t* = nullptr) const
262 ROSE_DEPRECATED("use get_sectionByOffset");
263 SgAsmGenericSection *get_section_by_rva(rose_addr_t, size_t* = nullptr) const ROSE_DEPRECATED("use get_sectionByRva");
264 SgAsmGenericSection *get_section_by_va(rose_addr_t, bool, size_t* = nullptr) const ROSE_DEPRECATED("use get_sectionByVa");
265 SgAsmGenericSection *get_best_section_by_va(rose_addr_t, bool, size_t* = nullptr) const ROSE_DEPRECATED("use get_bestSectionByVa");
266public:
268 virtual ~SgAsmGenericHeader();
269
270public:
273
274protected:
281 void initializeProperties();
282
283
284// End of memberFunctionString
285// Start of memberFunctionString
286/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
287
288// *** COMMON CODE SECTION BEGINS HERE ***
289
290 public:
291
292 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
293 // and not required which is required to match the other aspects of the copy mechanism code generation.
294 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
295 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
296 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
297 // virtual SgNode* copy ( const SgCopyHelp & help) const;
298
300 virtual std::string class_name() const override;
301
303 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
304
306 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
307 // static const VariantT static_variant = V_SgAsmGenericHeader;
308 enum { static_variant = V_SgAsmGenericHeader };
309
310 /* the generated cast function */
312 ROSE_DLL_API friend SgAsmGenericHeader* isSgAsmGenericHeader( SgNode * s );
313
315 ROSE_DLL_API friend const SgAsmGenericHeader* isSgAsmGenericHeader( const SgNode * s );
316
317 // ******************************************
318 // * Memory Pool / New / Delete
319 // ******************************************
320
321 public:
323 static const unsigned pool_size; //
325 static std::vector<unsigned char *> pools; //
327 static SgAsmGenericHeader * next_node; //
328
330 static unsigned long initializeStorageClassArray(SgAsmGenericHeaderStorageClass *); //
331
333 static void clearMemoryPool(); //
334 static void deleteMemoryPool(); //
335
337 static void extendMemoryPoolForFileIO(); //
338
340 static SgAsmGenericHeader * getPointerFromGlobalIndex(unsigned long); //
342 static SgAsmGenericHeader * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
343
345 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
347 static void resetValidFreepointers(); //
349 static unsigned long getNumberOfLastValidPointer(); //
350
351
352#if defined(INLINE_FUNCTIONS)
354 inline void *operator new (size_t size);
355#else
357 void *operator new (size_t size);
358#endif
360 void operator delete (void* pointer, size_t size);
361
362 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
363 void operator delete (void* pointer)
364 {
365 // This is the generated delete operator...
366 SgAsmGenericHeader::operator delete (pointer,sizeof(SgAsmGenericHeader));
367 }
368
370 static size_t numberOfNodes();
371
373 static size_t memoryUsage();
374
375 // End of scope which started in IR nodes specific code
376 /* */
377
378 /* name Internal Functions
379 \brief Internal functions ... incomplete-documentation
380
381 These functions have been made public as part of the design, but they are suggested for internal use
382 or by particularly knowledgeable users for specialized tools or applications.
383
384 \internal We could not make these private because they are required by user for special purposes. And
385 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
386
387 */
388
389 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
390 // overridden in every class by *generated* implementation
392 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
393 // MS: 06/28/02 container of names of variables or container indices
394 // used used in the traversal to access AST successor nodes
395 // overridden in every class by *generated* implementation
398 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
399
400 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
401 // than all the vector copies. The implementation for these functions is generated for each class.
403 virtual size_t get_numberOfTraversalSuccessors() override;
405 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
407 virtual size_t get_childIndex(SgNode *child) override;
408
409#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
410 // MS: 08/16/2002 method for generating RTI information
412 virtual RTIReturnType roseRTI() override;
413#endif
414 /* */
415
416
417
418 /* name Deprecated Functions
419 \brief Deprecated functions ... incomplete-documentation
420
421 These functions have been deprecated from use.
422 */
423 /* */
424
426 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
427
428 // JJW (10/16/2008): Changed to a single function in Node.code, and put
429 // getVariant() in #if 0 block to prevent confusing Doxygen
430#if 0
432 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
434 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
435#endif
436 /* */
437
438
439
440
441 public:
442 /* name Traversal Support Functions
443 \brief Traversal support functions ... incomplete-documentation
444
445 These functions have been made public as part of the design, but they are suggested for internal use
446 or by particularly knowledgable users for specialized tools or applications.
447 */
448 /* */
449
450 // DQ (11/26/2005): Support for visitor pattern mechanims
451 // (inferior to ROSE traversal mechanism, experimental).
455
456 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
458 virtual void accept (ROSE_VisitorPattern & visitor) override;
459
460 // DQ (12/26/2005): Support for traversal based on the memory pool
463 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
464
468
469 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
470 // This traversal helps support internal tools that call static member functions.
471 // note: this function operates on the memory pools.
474 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
475 /* */
476
477 public:
478 /* NodeId support functions */
480 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
483 static SgAsmGenericHeader* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
486 static std::string getNodeIdString(SgAsmGenericHeader* sgnode);
487 static std::string getNodeIdStringInternal(SgAsmGenericHeader* sgnode);
488
489 public:
490 /* name Memory Allocation Functions
491 \brief Memory allocations functions ... incomplete-documentation
492
493 These functions have been made public as part of the design, but they are suggested for internal use
494 or by particularly knowledgable users for specialized tools or applications.
495 */
496 /* */
497
508 virtual bool isInMemoryPool() override;
509
520 virtual void checkDataMemberPointersIfInMemoryPool() override;
521
522 // DQ (4/30/2006): Modified to be a const function.
537 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
538
549
561 virtual long getChildIndex( SgNode* childNode ) const override;
562
563 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
564 // comment here (changed to be a C style comment and not be a doxygen comment).
565 /* \brief Constructor for use by AST File I/O Mechanism
566
567 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
568 which obtained via fast binary file I/O from disk.
569 */
570 // SgAsmGenericHeader( SgAsmGenericHeaderStorageClass& source );
571
572
573
574
575
576 // JH (10/24/2005): methods added to support the ast file IO
577 private:
578
579 /* name AST Memory Allocation Support Functions
580 \brief Memory allocations support....
581
582 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
583 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
584 and support the AST File I/O Mechanism.
585 */
586 /* */
587
588 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
589 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
590 that I use the same type everywhere, if any changes are made. THe second one declares the type
591 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
592 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
593 a correspinding one in the AST_FILE_IO class!
594 */
595 // DQ (9/2/2015): This typedef is no longer used, we can't define the
596 // comment here (changed to be a C style comment and not be a doxygen comment).
597 /* \brief Typedef used for low level memory access.
598 */
599 // typedef unsigned char* TestType;
600
601 // DQ (9/2/2015): This typedef is no longer used, we can't define the
602 // comment here (changed to be a C style comment and not be a doxygen comment).
603 /* \brief Typedef used to hold memory addresses as values.
604 */
605 // typedef unsigned long AddressType;
606
607
608
609 // necessary, to have direct access to the p_freepointer and the private methods !
611 friend class AST_FILE_IO;
612
614 friend class SgAsmGenericHeaderStorageClass;
615
617 friend class AstSpecificDataManagingClass;
618
620 friend class AstSpecificDataManagingClassStorageClass;
621 public:
623 SgAsmGenericHeader( const SgAsmGenericHeaderStorageClass& source );
624
625 // private: // JJW hack
626 /*
627 name AST Memory Allocation Support Variables
628 Memory allocations support variables
629
630 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
631 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
632 and support the AST File I/O Mechanism.
633 */
634 /* */
635
636 public:
637
638 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
639 // to current node (so that it will work cleanly with build functions to specify patterns).
640 // virtual SgNode* addRegExpAttribute();
647
648#ifndef _MSC_VER
649// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
650// and likely never fully implemented nor tested. Files remain in the src tree but are no
651// longer built.
652#define BUILD_ATERM_SUPPORT 0
653 #if BUILD_ATERM_SUPPORT
654 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
655 // DQ (10/4/2014): Adding ATerm support to ROSE.
665 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
666 virtual ATerm generate_ATerm() override;
667
669 virtual void generate_ATerm_Annotation(ATerm & term) override;
670 #endif
671 #endif // BUILD_ATERM_SUPPORT
672#endif
673 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
674 // virtual generate_AST(ATerm & term);
675 // virtual void read_ATerm_Annotation(ATerm & term);
676
677// *** COMMON CODE SECTION ENDS HERE ***
678
679
680// End of memberFunctionString
681// Start of memberFunctionString
682/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
683
684 // the generated cast function
685 // friend ROSE_DLL_API SgAsmGenericHeader* isSgAsmGenericHeader ( SgNode* s );
686
687 typedef SgAsmGenericSection base_node_type;
688
689
690// End of memberFunctionString
691
692
693
694
695
696
697
698
699 protected:
700// Start of memberFunctionString
701SgAsmGenericFormat* p_executableFormat;
702
703// End of memberFunctionString
704// Start of memberFunctionString
705SgCharList p_magic;
706
707// End of memberFunctionString
708// Start of memberFunctionString
710
711// End of memberFunctionString
712// Start of memberFunctionString
713rose_addr_t p_baseVa;
714
715// End of memberFunctionString
716// Start of memberFunctionString
717SgRVAList p_entryRvas;
718
719// End of memberFunctionString
720// Start of memberFunctionString
721SgAsmGenericDLLList* p_dlls;
722
723// End of memberFunctionString
724// Start of memberFunctionString
725SgAsmGenericSectionList* p_sections;
726
727// End of memberFunctionString
728
730 friend struct Rose::Traits::generated::describe_field_t<SgAsmGenericHeader, SgAsmGenericFormat*,&SgAsmGenericHeader::p_executableFormat>;
731 friend struct Rose::Traits::generated::describe_field_t<SgAsmGenericHeader, SgCharList,&SgAsmGenericHeader::p_magic>;
733 friend struct Rose::Traits::generated::describe_field_t<SgAsmGenericHeader, rose_addr_t,&SgAsmGenericHeader::p_baseVa>;
734 friend struct Rose::Traits::generated::describe_field_t<SgAsmGenericHeader, SgRVAList,&SgAsmGenericHeader::p_entryRvas>;
735 friend struct Rose::Traits::generated::describe_field_t<SgAsmGenericHeader, SgAsmGenericDLLList*,&SgAsmGenericHeader::p_dlls>;
736 friend struct Rose::Traits::generated::describe_field_t<SgAsmGenericHeader, SgAsmGenericSectionList*,&SgAsmGenericHeader::p_sections>;
737
738/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
739
740
741 };
742#endif
743
744// postdeclarations for SgAsmGenericHeader
745
746/* #line 747 "../../../src/frontend/SageIII//SgAsmGenericHeader.h" */
747
748/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
749
750/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
751
752
753/* #line 754 "../../../src/frontend/SageIII//SgAsmGenericHeader.h" */
754
755#endif // ROSE_SgAsmGenericHeader_H
756
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Optionally bound relative virtual address.
InsSetArchitecture
Instruction sets organized by families.
List of pointers to other nodes.
Base class for dynamically linked library information.
Base class for binary files.
Basic information about an executable container.
Base class for container file headers.
List of pointers to file sections.
Contiguous region of a file.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const
Print some debugging info.
rose_addr_t get_baseVa() const
Base virtual address for a section.
virtual bool reallocate()
Called prior to unparse to make things consistent.
virtual void unparse(std::ostream &) const
Write a section back to the file.
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 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...
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.
The ROSE library.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * InsSetArchitecture(int64_t)
Convert SgAsmExecutableFileFormat::InsSetArchitecture enum constant to a string.