ROSE 0.11.145.247
SgAsmElfSectionTableEntry.h
1
2#ifndef ROSE_SgAsmElfSectionTableEntry_H
3#define ROSE_SgAsmElfSectionTableEntry_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 SgAsmElfSectionTableEntry
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
25/* #line 20327 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28#include <Rose/BinaryAnalysis/ByteOrder.h>
29#include <sageContainer.h>
30
31
32/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
33
34/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
35
36#if !defined(DOCUMENTATION)
37// Class Definition for SgAsmElfSectionTableEntry
39 {
40 public:
41
42
43/* #line 44 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
44
45 virtual SgNode* copy ( SgCopyHelp& help) const override;
46// Start of memberFunctionString
47/* #line 20405 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
48
49
50 //----------------------- Boost serialization for SgAsmElfSectionTableEntry -----------------------
51#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
52private:
53 friend class boost::serialization::access;
54
55 template<class S>
56 void serialize(S &s, const unsigned /*version*/) {
57 debugSerializationBegin("SgAsmElfSectionTableEntry");
58 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
59 s & BOOST_SERIALIZATION_NVP(p_sh_name);
60 s & BOOST_SERIALIZATION_NVP(p_sh_type);
61 s & BOOST_SERIALIZATION_NVP(p_sh_link);
62 s & BOOST_SERIALIZATION_NVP(p_sh_info);
63 s & BOOST_SERIALIZATION_NVP(p_sh_flags);
64 s & BOOST_SERIALIZATION_NVP(p_sh_addr);
65 s & BOOST_SERIALIZATION_NVP(p_sh_offset);
66 s & BOOST_SERIALIZATION_NVP(p_sh_size);
67 s & BOOST_SERIALIZATION_NVP(p_sh_addralign);
68 s & BOOST_SERIALIZATION_NVP(p_sh_entsize);
69 s & BOOST_SERIALIZATION_NVP(p_extra);
70 debugSerializationEnd("SgAsmElfSectionTableEntry");
71 }
72#endif // ROSE_ENABLE_BOOST_SERIALIZATION
74 // Local types
76public:
78 enum SectionType {
79 SHT_NULL = 0,
80 SHT_PROGBITS = 1,
81 SHT_SYMTAB = 2,
82 SHT_STRTAB = 3,
83 SHT_RELA = 4,
84 SHT_HASH = 5,
85 SHT_DYNAMIC = 6,
86 SHT_NOTE = 7,
87 SHT_NOBITS = 8,
88 SHT_REL = 9,
89 SHT_SHLIB = 10,
90 SHT_DYNSYM = 11,
92 SHT_LOOS = 0x60000000,
93 SHT_GNU_verdef = 0x6ffffffd,
94 SHT_GNU_verneed = 0x6ffffffe,
95 SHT_GNU_versym = 0x6fffffff,
96 SHT_HIOS = 0x6fffffff, /*NO_STRINGIFY*/
97
98 SHT_LOPROC = 0x70000000, /* Processor specific semantics */
99 SHT_HIPROC = 0x7fffffff,
100 SHT_LOUSER = 0x80000000, /* Application specific semantics */
101 SHT_HIUSER = 0xffffffff
102 };
103
105 enum SectionFlags {
106 SHF_NULL= 0,
107 SHF_WRITE= (1 << 0),
108 SHF_ALLOC= (1 << 1),
109 SHF_EXECINSTR= (1 << 2),
110 SHF_MERGE= (1 << 4),
111 SHF_STRINGS= (1 << 5),
112 SHF_INFO_LINK= (1 << 6),
113 SHF_LINK_ORDER= (1 << 7),
114 SHF_OS_NONCONFORMING=(1 << 8),
115 SHF_GROUP= (1 << 9),
116 SHF_TLS= (1 << 10),
117 SHF_MASKOS= 0x0ff00000,
118 SHF_MASKPROC= 0xf0000000
119 };
120
127#ifdef _MSC_VER
128# pragma pack (1)
129#endif
130 struct Elf32SectionTableEntry_disk {
131 uint32_t sh_name; /* 0x00 Section name; index into section header string table */
132 uint32_t sh_type; /* 0x04 Section contents and semantics (see SectionType enum) */
133 uint32_t sh_flags; /* 0x08 Bit flags */
134 uint32_t sh_addr; /* 0x0c Desired mapped address */
135 uint32_t sh_offset; /* 0x10 Section location in file unless sh_type==SHT_NOBITS */
136 uint32_t sh_size; /* 0x14 Section size in bytes */
137 uint32_t sh_link; /* 0x18 Section ID of another section; meaning depends on section type */
138 uint32_t sh_info; /* 0x1c Extra info depending on section type */
139 uint32_t sh_addralign; /* 0x20 Mapped alignment (0 and 1=>byte aligned); sh_addr must be aligned*/
140 uint32_t sh_entsize; /* 0x24 If non-zero, size in bytes of each array member in the section */
141 } /* 0x28 */
142#if !defined(SWIG) && !defined(_MSC_VER)
143 __attribute__((packed))
144#endif
145 ;
146
147 struct Elf64SectionTableEntry_disk {
148 uint32_t sh_name; /* 0x00 see Elf32SectionTableEntry_disk */
149 uint32_t sh_type; /* 0x04 */
150 uint64_t sh_flags; /* 0x08 */
151 uint64_t sh_addr; /* 0x10 */
152 uint64_t sh_offset; /* 0x18 */
153 uint64_t sh_size; /* 0x20 */
154 uint32_t sh_link; /* 0x28 */
155 uint32_t sh_info; /* 0x2c */
156 uint64_t sh_addralign; /* 0x30 */
157 uint64_t sh_entsize; /* 0x38 */
158 } /* 0x40 */
159#if !defined(SWIG) && !defined(_MSC_VER)
160 __attribute__((packed))
161#endif
162 ;
163#ifdef _MSC_VER
164# pragma pack ()
165#endif
166
168 // Properties
170public:
171public:
177 unsigned const& get_sh_name() const;
178 void set_sh_name(unsigned const&);
181public:
187 SgAsmElfSectionTableEntry::SectionType const& get_sh_type() const;
188 void set_sh_type(SgAsmElfSectionTableEntry::SectionType const&);
191public:
197 unsigned long const& get_sh_link() const;
198 void set_sh_link(unsigned long const&);
201public:
207 unsigned long const& get_sh_info() const;
208 void set_sh_info(unsigned long const&);
211public:
217 uint64_t const& get_sh_flags() const;
218 void set_sh_flags(uint64_t const&);
221public:
227 Rose::BinaryAnalysis::Address const& get_sh_addr() const;
228 void set_sh_addr(Rose::BinaryAnalysis::Address const&);
231public:
237 Rose::BinaryAnalysis::Address const& get_sh_offset() const;
238 void set_sh_offset(Rose::BinaryAnalysis::Address const&);
241public:
247 Rose::BinaryAnalysis::Address const& get_sh_size() const;
248 void set_sh_size(Rose::BinaryAnalysis::Address const&);
251public:
257 Rose::BinaryAnalysis::Address const& get_sh_addralign() const;
258 void set_sh_addralign(Rose::BinaryAnalysis::Address const&);
261public:
267 Rose::BinaryAnalysis::Address const& get_sh_entsize() const;
268 void set_sh_entsize(Rose::BinaryAnalysis::Address const&);
271public:
277 SgUnsignedCharList const& get_extra() const;
278 SgUnsignedCharList& get_extra();
279 void set_extra(SgUnsignedCharList const&);
282 // Functions
284public:
288
292
303 void updateFromSection(SgAsmElfSection*);
304
306 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
307
308 // Use Rose::stringify... function instead.
311
313 // Deprecated 2023-11
315public:
316 void update_from_section(SgAsmElfSection*) ROSE_DEPRECATED("use updateFromSection");
317 static std::string to_string(SgAsmElfSectionTableEntry::SectionType) ROSE_DEPRECATED("use toString");
318 static std::string to_string(SgAsmElfSectionTableEntry::SectionFlags) ROSE_DEPRECATED("use toString");
319public:
322
323public:
326
327protected:
335
336
337// End of memberFunctionString
338// Start of memberFunctionString
339/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
340
341// *** COMMON CODE SECTION BEGINS HERE ***
342
343 public:
344
345 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
346 // and not required which is required to match the other aspects of the copy mechanism code generation.
347 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
348 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
349 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
350 // virtual SgNode* copy ( const SgCopyHelp & help) const;
351
353 virtual std::string class_name() const override;
354
356 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
357
359 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
360 // static const VariantT static_variant = V_SgAsmElfSectionTableEntry;
361 enum { static_variant = V_SgAsmElfSectionTableEntry };
362
363 /* the generated cast function */
365 ROSE_DLL_API friend SgAsmElfSectionTableEntry* isSgAsmElfSectionTableEntry( SgNode * s );
366
368 ROSE_DLL_API friend const SgAsmElfSectionTableEntry* isSgAsmElfSectionTableEntry( const SgNode * s );
369
370 // ******************************************
371 // * Memory Pool / New / Delete
372 // ******************************************
373
374 public:
376 static const unsigned pool_size; //
378 static std::vector<unsigned char *> pools; //
380 static SgAsmElfSectionTableEntry * next_node; //
381
383 static unsigned long initializeStorageClassArray(SgAsmElfSectionTableEntryStorageClass *); //
384
386 static void clearMemoryPool(); //
387 static void deleteMemoryPool(); //
388
390 static void extendMemoryPoolForFileIO(); //
391
393 static SgAsmElfSectionTableEntry * getPointerFromGlobalIndex(unsigned long); //
395 static SgAsmElfSectionTableEntry * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
396
398 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
400 static void resetValidFreepointers(); //
402 static unsigned long getNumberOfLastValidPointer(); //
403
404
405#if defined(INLINE_FUNCTIONS)
407 inline void *operator new (size_t size);
408#else
410 void *operator new (size_t size);
411#endif
413 void operator delete (void* pointer, size_t size);
414
415 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
416 void operator delete (void* pointer)
417 {
418 // This is the generated delete operator...
419 SgAsmElfSectionTableEntry::operator delete (pointer,sizeof(SgAsmElfSectionTableEntry));
420 }
421
423 static size_t numberOfNodes();
424
426 static size_t memoryUsage();
427
428 // End of scope which started in IR nodes specific code
429 /* */
430
431 /* name Internal Functions
432 \brief Internal functions ... incomplete-documentation
433
434 These functions have been made public as part of the design, but they are suggested for internal use
435 or by particularly knowledgeable users for specialized tools or applications.
436
437 \internal We could not make these private because they are required by user for special purposes. And
438 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
439
440 */
441
442 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
443 // overridden in every class by *generated* implementation
445 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
446 // MS: 06/28/02 container of names of variables or container indices
447 // used used in the traversal to access AST successor nodes
448 // overridden in every class by *generated* implementation
451 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
452
453 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
454 // than all the vector copies. The implementation for these functions is generated for each class.
456 virtual size_t get_numberOfTraversalSuccessors() const override;
458 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
460 virtual size_t get_childIndex(SgNode *child) const override;
461
462#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
463 // MS: 08/16/2002 method for generating RTI information
465 virtual RTIReturnType roseRTI() override;
466#endif
467 /* */
468
469
470
471 /* name Deprecated Functions
472 \brief Deprecated functions ... incomplete-documentation
473
474 These functions have been deprecated from use.
475 */
476 /* */
477
479 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
480
481 // JJW (10/16/2008): Changed to a single function in Node.code, and put
482 // getVariant() in #if 0 block to prevent confusing Doxygen
483#if 0
485 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
487 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
488#endif
489 /* */
490
491
492
493
494 public:
495 /* name Traversal Support Functions
496 \brief Traversal support functions ... incomplete-documentation
497
498 These functions have been made public as part of the design, but they are suggested for internal use
499 or by particularly knowledgable users for specialized tools or applications.
500 */
501 /* */
502
503 // DQ (11/26/2005): Support for visitor pattern mechanims
504 // (inferior to ROSE traversal mechanism, experimental).
508
509 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
511 virtual void accept (ROSE_VisitorPattern & visitor) override;
512
513 // DQ (12/26/2005): Support for traversal based on the memory pool
516 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
517
521
522 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
523 // This traversal helps support internal tools that call static member functions.
524 // note: this function operates on the memory pools.
527 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
528 /* */
529
530 public:
531 /* NodeId support functions */
533 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
536 static SgAsmElfSectionTableEntry* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
539 static std::string getNodeIdString(SgAsmElfSectionTableEntry* sgnode);
540 static std::string getNodeIdStringInternal(SgAsmElfSectionTableEntry* sgnode);
541
542 public:
543 /* name Memory Allocation Functions
544 \brief Memory allocations functions ... incomplete-documentation
545
546 These functions have been made public as part of the design, but they are suggested for internal use
547 or by particularly knowledgable users for specialized tools or applications.
548 */
549 /* */
550
561 virtual bool isInMemoryPool() override;
562
573 virtual void checkDataMemberPointersIfInMemoryPool() override;
574
575 // DQ (4/30/2006): Modified to be a const function.
590 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
591
602
614 virtual long getChildIndex( SgNode* childNode ) const override;
615
616 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
617 // comment here (changed to be a C style comment and not be a doxygen comment).
618 /* \brief Constructor for use by AST File I/O Mechanism
619
620 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
621 which obtained via fast binary file I/O from disk.
622 */
623 // SgAsmElfSectionTableEntry( SgAsmElfSectionTableEntryStorageClass& source );
624
625
626
627
628
629 // JH (10/24/2005): methods added to support the ast file IO
630 private:
631
632 /* name AST Memory Allocation Support Functions
633 \brief Memory allocations support....
634
635 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
636 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
637 and support the AST File I/O Mechanism.
638 */
639 /* */
640
641 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
642 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
643 that I use the same type everywhere, if any changes are made. THe second one declares the type
644 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
645 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
646 a correspinding one in the AST_FILE_IO class!
647 */
648 // DQ (9/2/2015): This typedef is no longer used, we can't define the
649 // comment here (changed to be a C style comment and not be a doxygen comment).
650 /* \brief Typedef used for low level memory access.
651 */
652 // typedef unsigned char* TestType;
653
654 // DQ (9/2/2015): This typedef is no longer used, we can't define the
655 // comment here (changed to be a C style comment and not be a doxygen comment).
656 /* \brief Typedef used to hold memory addresses as values.
657 */
658 // typedef unsigned long AddressType;
659
660
661
662 // necessary, to have direct access to the p_freepointer and the private methods !
664 friend class AST_FILE_IO;
665
667 friend class SgAsmElfSectionTableEntryStorageClass;
668
670 friend class AstSpecificDataManagingClass;
671
673 friend class AstSpecificDataManagingClassStorageClass;
674 public:
676 SgAsmElfSectionTableEntry( const SgAsmElfSectionTableEntryStorageClass& source );
677
678 // private: // JJW hack
679 /*
680 name AST Memory Allocation Support Variables
681 Memory allocations support variables
682
683 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
684 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
685 and support the AST File I/O Mechanism.
686 */
687 /* */
688
689 public:
690
691 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
692 // to current node (so that it will work cleanly with build functions to specify patterns).
693 // virtual SgNode* addRegExpAttribute();
700
701#ifndef _MSC_VER
702// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
703// and likely never fully implemented nor tested. Files remain in the src tree but are no
704// longer built.
705#define BUILD_ATERM_SUPPORT 0
706 #if BUILD_ATERM_SUPPORT
707 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
708 // DQ (10/4/2014): Adding ATerm support to ROSE.
718 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
719 virtual ATerm generate_ATerm() override;
720
722 virtual void generate_ATerm_Annotation(ATerm & term) override;
723 #endif
724 #endif // BUILD_ATERM_SUPPORT
725#endif
726 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
727 // virtual generate_AST(ATerm & term);
728 // virtual void read_ATerm_Annotation(ATerm & term);
729
730// *** COMMON CODE SECTION ENDS HERE ***
731
732
733// End of memberFunctionString
734// Start of memberFunctionString
735/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
736
737 // the generated cast function
738 // friend ROSE_DLL_API SgAsmElfSectionTableEntry* isSgAsmElfSectionTableEntry ( SgNode* s );
739
740 typedef SgAsmExecutableFileFormat base_node_type;
741
742
743// End of memberFunctionString
744
745
746
747
748
749
750
751
752
753
754
755
756 protected:
757// Start of memberFunctionString
758unsigned p_sh_name;
759
760// End of memberFunctionString
761// Start of memberFunctionString
763
764// End of memberFunctionString
765// Start of memberFunctionString
766unsigned long p_sh_link;
767
768// End of memberFunctionString
769// Start of memberFunctionString
770unsigned long p_sh_info;
771
772// End of memberFunctionString
773// Start of memberFunctionString
774uint64_t p_sh_flags;
775
776// End of memberFunctionString
777// Start of memberFunctionString
779
780// End of memberFunctionString
781// Start of memberFunctionString
783
784// End of memberFunctionString
785// Start of memberFunctionString
787
788// End of memberFunctionString
789// Start of memberFunctionString
790Rose::BinaryAnalysis::Address p_sh_addralign;
791
792// End of memberFunctionString
793// Start of memberFunctionString
795
796// End of memberFunctionString
797// Start of memberFunctionString
798SgUnsignedCharList p_extra;
799
800// End of memberFunctionString
801
803 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, unsigned,&SgAsmElfSectionTableEntry::p_sh_name>;
805 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, unsigned long,&SgAsmElfSectionTableEntry::p_sh_link>;
806 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, unsigned long,&SgAsmElfSectionTableEntry::p_sh_info>;
807 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, uint64_t,&SgAsmElfSectionTableEntry::p_sh_flags>;
808 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSectionTableEntry::p_sh_addr>;
809 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSectionTableEntry::p_sh_offset>;
810 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSectionTableEntry::p_sh_size>;
811 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSectionTableEntry::p_sh_addralign>;
812 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, Rose::BinaryAnalysis::Address,&SgAsmElfSectionTableEntry::p_sh_entsize>;
813 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSectionTableEntry, SgUnsignedCharList,&SgAsmElfSectionTableEntry::p_extra>;
814
815/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
816
817
818 };
819#endif
820
821// postdeclarations for SgAsmElfSectionTableEntry
822
823/* #line 824 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
824
825/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
826
827/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
828
829
830/* #line 831 "../../../src/frontend/SageIII//SgAsmElfSectionTableEntry.h" */
831
832#endif // ROSE_SgAsmElfSectionTableEntry_H
833
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Represents one entry in an ELF section table.
SectionType
Section types (host order).
SectionFlags
Section Flags (host order).
Base class for ELF file sections.
Base class for many binary analysis nodes.
void initializeProperties()
Initialize all properties that have explicit initial values.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual size_t get_numberOfTraversalSuccessors() const
return number of children in the traversal successor list
virtual std::vector< std::string > get_traversalSuccessorNamesContainer() const
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual size_t get_childIndex(SgNode *child) const
index-based access to traversal successors by child node
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual VariantT variantT() const
returns new style SageIII enum values
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual SgNode * get_traversalSuccessorByIndex(size_t idx) const
index-based access to traversal successors by index number
virtual std::string class_name() const
returns a string representing the class name
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
std::uint64_t Address
Address.
Definition Address.h:11
ROSE_UTIL_API std::string toString(const Path &)
Convert a path to a string.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * SectionType(int64_t)
Convert SgAsmElfSectionTableEntry::SectionType enum constant to a string.
const char * SectionFlags(int64_t)
Convert SgAsmElfSectionTableEntry::SectionFlags enum constant to a string.