ROSE 0.11.145.192
SgAsmPEImportDirectory.h
1
2#ifndef ROSE_SgAsmPEImportDirectory_H
3#define ROSE_SgAsmPEImportDirectory_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 SgAsmPEImportDirectory
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmPEImportDirectory.h" */
25/* #line 3362 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/AddressIntervalSet.h>
28#include <Rose/BinaryAnalysis/RelativeVirtualAddress.h>
29#include <sageContainer.h>
30
31#ifdef ROSE_SgAsmPEImportDirectory_IMPL
32#include <SgAsmGenericString.h>
33#include <SgAsmPEImportItemList.h>
34#endif
35
36
37/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
38
39/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
40
41#if !defined(DOCUMENTATION)
42// Class Definition for SgAsmPEImportDirectory
43class ROSE_DLL_API SgAsmPEImportDirectory : public SgAsmExecutableFileFormat
44 {
45 public:
46
47
48/* #line 49 "../../../src/frontend/SageIII//SgAsmPEImportDirectory.h" */
49
50 virtual SgNode* copy ( SgCopyHelp& help) const override;
51// Start of memberFunctionString
52/* #line 3442 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
53
54
55 //----------------------- Boost serialization for SgAsmPEImportDirectory -----------------------
56#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
57private:
58 friend class boost::serialization::access;
59
60 template<class S>
61 void serialize(S &s, const unsigned /*version*/) {
62 debugSerializationBegin("SgAsmPEImportDirectory");
63 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
64 s & BOOST_SERIALIZATION_NVP(p_dllName);
65 s & BOOST_SERIALIZATION_NVP(p_dllNameRva);
66 s & BOOST_SERIALIZATION_NVP(p_dll_name_nalloc);
67 s & BOOST_SERIALIZATION_NVP(p_time);
68 s & BOOST_SERIALIZATION_NVP(p_forwarder_chain);
69 s & BOOST_SERIALIZATION_NVP(p_ilt_rva);
70 s & BOOST_SERIALIZATION_NVP(p_ilt_nalloc);
71 s & BOOST_SERIALIZATION_NVP(p_iat_rva);
72 s & BOOST_SERIALIZATION_NVP(p_iat_nalloc);
73 s & BOOST_SERIALIZATION_NVP(p_imports);
74 debugSerializationEnd("SgAsmPEImportDirectory");
75 }
76#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
78 // Local types
80public:
81#ifdef _MSC_VER
82# pragma pack (1)
83#endif
84 struct PEImportDirectory_disk {
85 uint32_t ilt_rva; /* 0x00 Import Lookup Table RVA */
86 uint32_t time; /* 0x04 Zero until the image is bound, then time stamp of the DLL */
87 uint32_t forwarder_chain; /* 0x08 Index of the first forwarder chain */
88 uint32_t dll_name_rva; /* 0x0c address of NUL-terminated DLL name */
89 uint32_t iat_rva; /* 0x10 Import Address Table (Thunk Table) RVA */
90 } /* 0x14 */
91#if !defined(SWIG) && !defined(_MSC_VER)
92 __attribute__((packed))
93#endif
94 ;
95#ifdef _MSC_VER
96# pragma pack ()
97#endif
98
100 // Properties
102public:
103public:
109 SgAsmGenericString* const& get_dllName() const;
110 void set_dllName(SgAsmGenericString* const&);
113public:
119 Rose::BinaryAnalysis::RelativeVirtualAddress const& get_dllNameRva() const;
121 void set_dllNameRva(Rose::BinaryAnalysis::RelativeVirtualAddress const&);
124public:
130 size_t const& get_dll_name_nalloc() const;
131 void set_dll_name_nalloc(size_t const&);
134public:
140 time_t const& get_time() const;
141 void set_time(time_t const&);
144public:
150 unsigned const& get_forwarder_chain() const;
151 void set_forwarder_chain(unsigned const&);
154public:
160 Rose::BinaryAnalysis::RelativeVirtualAddress const& get_ilt_rva() const;
162 void set_ilt_rva(Rose::BinaryAnalysis::RelativeVirtualAddress const&);
165public:
171 size_t const& get_ilt_nalloc() const;
172 void set_ilt_nalloc(size_t const&);
175public:
181 Rose::BinaryAnalysis::RelativeVirtualAddress const& get_iat_rva() const;
183 void set_iat_rva(Rose::BinaryAnalysis::RelativeVirtualAddress const&);
186public:
192 size_t const& get_iat_nalloc() const;
193 void set_iat_nalloc(size_t const&);
196public:
202 SgAsmPEImportItemList* const& get_imports() const;
203 void set_imports(SgAsmPEImportItemList* const&);
206 // Functions
208public:
209 explicit SgAsmPEImportDirectory(SgAsmPEImportSection *isec, const std::string &dll_name="");
210
216 SgAsmPEImportDirectory *parse(rose_addr_t va, bool isLastEntry);
217
225 size_t reallocate(Rose::BinaryAnalysis::RelativeVirtualAddress starting_rva);
226
229 virtual void unparse(std::ostream&, const SgAsmPEImportSection*, size_t idx) const;
230 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
231
237 size_t iatRequiredSize() const;
238
243 int findImportItem(const SgAsmPEImportItem *item, int hint=0) const;
244
256 size_t hintNameTableExtent(Rose::BinaryAnalysis::AddressIntervalSet &extent/*in,out*/) const;
257
258private:
259 void parse_ilt_iat(const Rose::BinaryAnalysis::RelativeVirtualAddress &table_start, bool assume_bound);
260 void unparse_ilt_iat(std::ostream&,const Rose::BinaryAnalysis::RelativeVirtualAddress &table_start, bool assume_bound,
261 size_t nalloc) const;
262
264 // Deprecated 2023-11
266public:
267 SgAsmGenericString* get_dll_name() const ROSE_DEPRECATED("use get_dllName");
268 void set_dll_name(SgAsmGenericString*) ROSE_DEPRECATED("use set_dllName");
269 const Rose::BinaryAnalysis::RelativeVirtualAddress& get_dll_name_rva() const ROSE_DEPRECATED("use get_dllNameRva");
270 Rose::BinaryAnalysis::RelativeVirtualAddress& get_dll_name_rva() ROSE_DEPRECATED("use get_dllNameRva");
271 void set_dll_name_rva(const Rose::BinaryAnalysis::RelativeVirtualAddress&) ROSE_DEPRECATED("use set_dllNameRva");
272 size_t iat_required_size() const ROSE_DEPRECATED("use iatRequiredSize");
273 int find_import_item(const SgAsmPEImportItem*, int=0) const ROSE_DEPRECATED("use findImportItem");
274 size_t hintname_table_extent(Rose::BinaryAnalysis::AddressIntervalSet&) const ROSE_DEPRECATED("use hintNameTableExtent");
275public:
277 virtual ~SgAsmPEImportDirectory();
278
279public:
282
283protected:
290 void initializeProperties();
291
292
293// End of memberFunctionString
294// Start of memberFunctionString
295/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
296
297// *** COMMON CODE SECTION BEGINS HERE ***
298
299 public:
300
301 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
302 // and not required which is required to match the other aspects of the copy mechanism code generation.
303 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
304 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
305 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
306 // virtual SgNode* copy ( const SgCopyHelp & help) const;
307
309 virtual std::string class_name() const override;
310
312 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
313
315 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
316 // static const VariantT static_variant = V_SgAsmPEImportDirectory;
317 enum { static_variant = V_SgAsmPEImportDirectory };
318
319 /* the generated cast function */
321 ROSE_DLL_API friend SgAsmPEImportDirectory* isSgAsmPEImportDirectory( SgNode * s );
322
324 ROSE_DLL_API friend const SgAsmPEImportDirectory* isSgAsmPEImportDirectory( const SgNode * s );
325
326 // ******************************************
327 // * Memory Pool / New / Delete
328 // ******************************************
329
330 public:
332 static const unsigned pool_size; //
334 static std::vector<unsigned char *> pools; //
336 static SgAsmPEImportDirectory * next_node; //
337
339 static unsigned long initializeStorageClassArray(SgAsmPEImportDirectoryStorageClass *); //
340
342 static void clearMemoryPool(); //
343 static void deleteMemoryPool(); //
344
346 static void extendMemoryPoolForFileIO(); //
347
349 static SgAsmPEImportDirectory * getPointerFromGlobalIndex(unsigned long); //
351 static SgAsmPEImportDirectory * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
352
354 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
356 static void resetValidFreepointers(); //
358 static unsigned long getNumberOfLastValidPointer(); //
359
360
361#if defined(INLINE_FUNCTIONS)
363 inline void *operator new (size_t size);
364#else
366 void *operator new (size_t size);
367#endif
369 void operator delete (void* pointer, size_t size);
370
371 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
372 void operator delete (void* pointer)
373 {
374 // This is the generated delete operator...
375 SgAsmPEImportDirectory::operator delete (pointer,sizeof(SgAsmPEImportDirectory));
376 }
377
379 static size_t numberOfNodes();
380
382 static size_t memoryUsage();
383
384 // End of scope which started in IR nodes specific code
385 /* */
386
387 /* name Internal Functions
388 \brief Internal functions ... incomplete-documentation
389
390 These functions have been made public as part of the design, but they are suggested for internal use
391 or by particularly knowledgeable users for specialized tools or applications.
392
393 \internal We could not make these private because they are required by user for special purposes. And
394 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
395
396 */
397
398 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
399 // overridden in every class by *generated* implementation
401 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
402 // MS: 06/28/02 container of names of variables or container indices
403 // used used in the traversal to access AST successor nodes
404 // overridden in every class by *generated* implementation
407 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
408
409 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
410 // than all the vector copies. The implementation for these functions is generated for each class.
412 virtual size_t get_numberOfTraversalSuccessors() override;
414 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
416 virtual size_t get_childIndex(SgNode *child) override;
417
418#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
419 // MS: 08/16/2002 method for generating RTI information
421 virtual RTIReturnType roseRTI() override;
422#endif
423 /* */
424
425
426
427 /* name Deprecated Functions
428 \brief Deprecated functions ... incomplete-documentation
429
430 These functions have been deprecated from use.
431 */
432 /* */
433
435 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
436
437 // JJW (10/16/2008): Changed to a single function in Node.code, and put
438 // getVariant() in #if 0 block to prevent confusing Doxygen
439#if 0
441 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
443 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
444#endif
445 /* */
446
447
448
449
450 public:
451 /* name Traversal Support Functions
452 \brief Traversal support functions ... incomplete-documentation
453
454 These functions have been made public as part of the design, but they are suggested for internal use
455 or by particularly knowledgable users for specialized tools or applications.
456 */
457 /* */
458
459 // DQ (11/26/2005): Support for visitor pattern mechanims
460 // (inferior to ROSE traversal mechanism, experimental).
464
465 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
467 virtual void accept (ROSE_VisitorPattern & visitor) override;
468
469 // DQ (12/26/2005): Support for traversal based on the memory pool
472 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
473
477
478 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
479 // This traversal helps support internal tools that call static member functions.
480 // note: this function operates on the memory pools.
483 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
484 /* */
485
486 public:
487 /* NodeId support functions */
489 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
492 static SgAsmPEImportDirectory* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
495 static std::string getNodeIdString(SgAsmPEImportDirectory* sgnode);
496 static std::string getNodeIdStringInternal(SgAsmPEImportDirectory* sgnode);
497
498 public:
499 /* name Memory Allocation Functions
500 \brief Memory allocations functions ... incomplete-documentation
501
502 These functions have been made public as part of the design, but they are suggested for internal use
503 or by particularly knowledgable users for specialized tools or applications.
504 */
505 /* */
506
517 virtual bool isInMemoryPool() override;
518
529 virtual void checkDataMemberPointersIfInMemoryPool() override;
530
531 // DQ (4/30/2006): Modified to be a const function.
546 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
547
558
570 virtual long getChildIndex( SgNode* childNode ) const override;
571
572 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
573 // comment here (changed to be a C style comment and not be a doxygen comment).
574 /* \brief Constructor for use by AST File I/O Mechanism
575
576 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
577 which obtained via fast binary file I/O from disk.
578 */
579 // SgAsmPEImportDirectory( SgAsmPEImportDirectoryStorageClass& source );
580
581
582
583
584
585 // JH (10/24/2005): methods added to support the ast file IO
586 private:
587
588 /* name AST Memory Allocation Support Functions
589 \brief Memory allocations support....
590
591 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
592 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
593 and support the AST File I/O Mechanism.
594 */
595 /* */
596
597 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
598 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
599 that I use the same type everywhere, if any changes are made. THe second one declares the type
600 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
601 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
602 a correspinding one in the AST_FILE_IO class!
603 */
604 // DQ (9/2/2015): This typedef is no longer used, we can't define the
605 // comment here (changed to be a C style comment and not be a doxygen comment).
606 /* \brief Typedef used for low level memory access.
607 */
608 // typedef unsigned char* TestType;
609
610 // DQ (9/2/2015): This typedef is no longer used, we can't define the
611 // comment here (changed to be a C style comment and not be a doxygen comment).
612 /* \brief Typedef used to hold memory addresses as values.
613 */
614 // typedef unsigned long AddressType;
615
616
617
618 // necessary, to have direct access to the p_freepointer and the private methods !
620 friend class AST_FILE_IO;
621
623 friend class SgAsmPEImportDirectoryStorageClass;
624
626 friend class AstSpecificDataManagingClass;
627
629 friend class AstSpecificDataManagingClassStorageClass;
630 public:
632 SgAsmPEImportDirectory( const SgAsmPEImportDirectoryStorageClass& source );
633
634 // private: // JJW hack
635 /*
636 name AST Memory Allocation Support Variables
637 Memory allocations support variables
638
639 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
640 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
641 and support the AST File I/O Mechanism.
642 */
643 /* */
644
645 public:
646
647 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
648 // to current node (so that it will work cleanly with build functions to specify patterns).
649 // virtual SgNode* addRegExpAttribute();
656
657#ifndef _MSC_VER
658// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
659// and likely never fully implemented nor tested. Files remain in the src tree but are no
660// longer built.
661#define BUILD_ATERM_SUPPORT 0
662 #if BUILD_ATERM_SUPPORT
663 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
664 // DQ (10/4/2014): Adding ATerm support to ROSE.
674 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
675 virtual ATerm generate_ATerm() override;
676
678 virtual void generate_ATerm_Annotation(ATerm & term) override;
679 #endif
680 #endif // BUILD_ATERM_SUPPORT
681#endif
682 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
683 // virtual generate_AST(ATerm & term);
684 // virtual void read_ATerm_Annotation(ATerm & term);
685
686// *** COMMON CODE SECTION ENDS HERE ***
687
688
689// End of memberFunctionString
690// Start of memberFunctionString
691/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
692
693 // the generated cast function
694 // friend ROSE_DLL_API SgAsmPEImportDirectory* isSgAsmPEImportDirectory ( SgNode* s );
695
696 typedef SgAsmExecutableFileFormat base_node_type;
697
698
699// End of memberFunctionString
700
701
702
703
704
705
706
707
708
709
710
711 protected:
712// Start of memberFunctionString
713SgAsmGenericString* p_dllName;
714
715// End of memberFunctionString
716// Start of memberFunctionString
718
719// End of memberFunctionString
720// Start of memberFunctionString
721size_t p_dll_name_nalloc;
722
723// End of memberFunctionString
724// Start of memberFunctionString
725time_t p_time;
726
727// End of memberFunctionString
728// Start of memberFunctionString
729unsigned p_forwarder_chain;
730
731// End of memberFunctionString
732// Start of memberFunctionString
734
735// End of memberFunctionString
736// Start of memberFunctionString
737size_t p_ilt_nalloc;
738
739// End of memberFunctionString
740// Start of memberFunctionString
742
743// End of memberFunctionString
744// Start of memberFunctionString
745size_t p_iat_nalloc;
746
747// End of memberFunctionString
748// Start of memberFunctionString
749SgAsmPEImportItemList* p_imports;
750
751// End of memberFunctionString
752
754 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, SgAsmGenericString*,&SgAsmPEImportDirectory::p_dllName>;
755 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, Rose::BinaryAnalysis::RelativeVirtualAddress,&SgAsmPEImportDirectory::p_dllNameRva>;
756 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, size_t,&SgAsmPEImportDirectory::p_dll_name_nalloc>;
757 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, time_t,&SgAsmPEImportDirectory::p_time>;
758 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, unsigned,&SgAsmPEImportDirectory::p_forwarder_chain>;
759 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, Rose::BinaryAnalysis::RelativeVirtualAddress,&SgAsmPEImportDirectory::p_ilt_rva>;
760 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, size_t,&SgAsmPEImportDirectory::p_ilt_nalloc>;
761 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, Rose::BinaryAnalysis::RelativeVirtualAddress,&SgAsmPEImportDirectory::p_iat_rva>;
762 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, size_t,&SgAsmPEImportDirectory::p_iat_nalloc>;
763 friend struct Rose::Traits::generated::describe_field_t<SgAsmPEImportDirectory, SgAsmPEImportItemList*,&SgAsmPEImportDirectory::p_imports>;
764
765/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
766
767
768 };
769#endif
770
771// postdeclarations for SgAsmPEImportDirectory
772
773/* #line 774 "../../../src/frontend/SageIII//SgAsmPEImportDirectory.h" */
774
775/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
776
777/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
778
779
780/* #line 781 "../../../src/frontend/SageIII//SgAsmPEImportDirectory.h" */
781
782#endif // ROSE_SgAsmPEImportDirectory_H
783
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.
Base class for many binary analysis nodes.
Base class for strings related to binary specimens.
One import directory per library.
A list of imported items.
A single imported object.
Portable Executable Import Section.
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 parse(SgAsmGenericFile *)
Main function to parse DWARF information.
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.