ROSE 0.11.145.147
SgAsmNERelocEntry.h
1
2#ifndef ROSE_SgAsmNERelocEntry_H
3#define ROSE_SgAsmNERelocEntry_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 SgAsmNERelocEntry
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmNERelocEntry.h" */
25
26/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
27
28/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
29
30#if !defined(DOCUMENTATION)
31// Class Definition for SgAsmNERelocEntry
32class ROSE_DLL_API SgAsmNERelocEntry : public SgAsmExecutableFileFormat
33 {
34 public:
35
36
37/* #line 38 "../../../src/frontend/SageIII//SgAsmNERelocEntry.h" */
38
39 virtual SgNode* copy ( SgCopyHelp& help) const override;
40// Start of memberFunctionString
41/* #line 6090 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
42
43
44 //----------------------- Boost serialization for SgAsmNERelocEntry -----------------------
45#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
46private:
47 friend class boost::serialization::access;
48
49 template<class S>
50 void serialize(S &s, const unsigned /*version*/) {
51 debugSerializationBegin("SgAsmNERelocEntry");
52 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
53 s & BOOST_SERIALIZATION_NVP(p_src_type);
54 s & BOOST_SERIALIZATION_NVP(p_modifier);
55 s & BOOST_SERIALIZATION_NVP(p_tgt_type);
56 s & BOOST_SERIALIZATION_NVP(p_flags);
57 s & BOOST_SERIALIZATION_NVP(p_src_offset);
58 s & BOOST_SERIALIZATION_NVP(p_iref);
59 s & BOOST_SERIALIZATION_NVP(p_iord);
60 s & BOOST_SERIALIZATION_NVP(p_iname);
61 s & BOOST_SERIALIZATION_NVP(p_osfixup);
62 debugSerializationEnd("SgAsmNERelocEntry");
63 }
64#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
66 // Local types
68public:
69 /* NERelocEntry_disk -- variable size with multiple levels of 'union'. It's easier to just parse it in NERelocEntry::ctor()
70 * than defining it here as a struct. */
71 enum NERelocSrcType {
72 RF_SRCTYPE_8OFF = 0, /* Byte offset */
73 RF_SRCTYPE_WORDSEG = 2, /* Word segment, 16-bit selector */
74 RF_SRCTYPE_16PTR = 3, /* 16-bit far pointer */
75 RF_SRCTYPE_16OFF = 5, /* 16-bit offset */
76 RF_SRCTYPE_32PTR = 6, /* 32-bit far pointer */
77 RF_SRCTYPE_32OFF = 7, /* 32-bit offset */
78 RF_SRCTYPE_NEARCALL = 8, /* near call or jump, WORD/DWROD based on section attribute */
79 RF_SRCTYPE_48PTR = 11, /* 48-bit pointer */
80 RF_SRCTYPE_32OFF_b = 13 /* 32-bit offset (not sure how this differs from case 7) */
81 };
82
83 enum NERelocTgtType {
84 RF_TGTTYPE_IREF = 0, /* Internal reference */
85 RF_TGTTYPE_IORD = 1, /* Imported (extern) ordinal */
86 RF_TGTTYPE_INAME = 2, /* Imported (extern) name */
87 RF_TGTTYPE_OSFIXUP = 3 /* Operating system fixup */
88 };
89
90 enum NERelocModifiers {
91 RF_MODIFIER_SINGLE = 1,
92 RF_MODIFIER_MULTI = 3
93 };
94
95 enum NERelocFlags {
96 RF_ADDITIVE = 0x01, /* add target to source rather than replace source with target */
97 RF_RESERVED = 0x02, /* reserved bits */
98 RF_2EXTRA = 0x04, /* relocation info has size with new two bytes at end */
99 RF_32ADD = 0x08, /* addition with 32-bits rather than 16 */
100 RF_16SECTION = 0x10, /* 16-bit object number & module name rather than 8-bit */
101 RF_8ORDINAL = 0x20 /* Ordinal is 8-bits rather than 16 */
102 };
103
104 // DQ (8/7/2008): At only (I hope) the risk of using more memory that required, break the union so that we can better support
105 // this in ROSETTA. One solution might be to implement a common base class of unsigned, unsigned, rose_addr_t; and then use
106 // member functions to access the data in the base class.
107 struct iref_type { /*tgt_type==0x00: internal reference*/
108 unsigned sect_idx; /* section index (1-origin) */
109 unsigned res1; /* reserved */
110 rose_addr_t tgt_offset;
111
112#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
113 template<class S>
114 void serialize(S &s, const unsigned /*version*/) {
115 s & BOOST_SERIALIZATION_NVP(sect_idx);
116 s & BOOST_SERIALIZATION_NVP(res1);
117 s & BOOST_SERIALIZATION_NVP(tgt_offset);
118 }
119#endif
120
121 // Added to support RTI support in ROSE
122 friend std::ostream & operator<< ( std::ostream & os, const iref_type & x );
123
124 iref_type();
125 };
126
127 struct iord_type { /*tgt_type==0x01: imported ordinal*/
128 unsigned modref; /* 1-based index into import module table */
129 unsigned ordinal;
130 rose_addr_t addend; /* value to add (only present for flags & RF_2EXTRA) */
131
132#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
133 template<class S>
134 void serialize(S &s, const unsigned /*version*/) {
135 s & BOOST_SERIALIZATION_NVP(modref);
136 s & BOOST_SERIALIZATION_NVP(ordinal);
137 s & BOOST_SERIALIZATION_NVP(addend);
138 }
139#endif
140
141 // Added to support RTI support in ROSE
142 friend std::ostream & operator<< ( std::ostream & os, const iord_type & x );
143
144 iord_type();
145 };
146
147 struct iname_type { /*tgt_type==0x02: imported name*/
148 unsigned modref; /* 1-based index into import module table */
149 unsigned nm_off; /* offset into import procedure names */
150 rose_addr_t addend; /* value to add (only present for flags & RF_2EXTRA) */
151
152#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
153 template<class S>
154 void serialize(S &s, const unsigned /*version*/) {
155 s & BOOST_SERIALIZATION_NVP(modref);
156 s & BOOST_SERIALIZATION_NVP(nm_off);
157 s & BOOST_SERIALIZATION_NVP(addend);
158 }
159#endif
160
161 // Added to support RTI support in ROSE
162 friend std::ostream & operator<< ( std::ostream & os, const iname_type & x );
163
164 iname_type();
165 };
166
167 struct osfixup_type { /*tgt_type==0x03: operating system fixup*/
168 unsigned type;
169 unsigned res3;
170
171#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
172 template<class S>
173 void serialize(S &s, const unsigned /*version*/) {
174 s & BOOST_SERIALIZATION_NVP(type);
175 s & BOOST_SERIALIZATION_NVP(res3);
176 }
177#endif
178
179 // Added to support RTI support in ROSE
180 friend std::ostream & operator<< ( std::ostream & os, const osfixup_type & x );
181
182 osfixup_type();
183 };
184
186 // Properties
188public:
189public:
190 SgAsmNERelocEntry::NERelocSrcType const& get_src_type() const;
191 void set_src_type(SgAsmNERelocEntry::NERelocSrcType const&);
192
193public:
194 SgAsmNERelocEntry::NERelocModifiers const& get_modifier() const;
195 void set_modifier(SgAsmNERelocEntry::NERelocModifiers const&);
196
197public:
198 SgAsmNERelocEntry::NERelocTgtType const& get_tgt_type() const;
199 void set_tgt_type(SgAsmNERelocEntry::NERelocTgtType const&);
200
201public:
202 SgAsmNERelocEntry::NERelocFlags const& get_flags() const;
203 void set_flags(SgAsmNERelocEntry::NERelocFlags const&);
204
205public:
206 rose_addr_t const& get_src_offset() const;
207 void set_src_offset(rose_addr_t const&);
208
209public:
210 SgAsmNERelocEntry::iref_type const& get_iref() const;
211 void set_iref(SgAsmNERelocEntry::iref_type const&);
212
213public:
214 SgAsmNERelocEntry::iord_type const& get_iord() const;
215 void set_iord(SgAsmNERelocEntry::iord_type const&);
216
217public:
218 SgAsmNERelocEntry::iname_type const& get_iname() const;
219 void set_iname(SgAsmNERelocEntry::iname_type const&);
220
221public:
222 SgAsmNERelocEntry::osfixup_type const& get_osfixup() const;
223 void set_osfixup(SgAsmNERelocEntry::osfixup_type const&);
225 // Functions
227public:
228 SgAsmNERelocEntry(SgAsmGenericSection *relocs, rose_addr_t at, rose_addr_t *rec_size);
229 rose_addr_t unparse(std::ostream&, const SgAsmGenericSection*, rose_addr_t spos) const;
230 void dump(FILE*, const char *prefix, ssize_t idx) const;
231public:
233 virtual ~SgAsmNERelocEntry();
234
235public:
238
239protected:
247
248
249// End of memberFunctionString
250// Start of memberFunctionString
251/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
252
253// *** COMMON CODE SECTION BEGINS HERE ***
254
255 public:
256
257 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
258 // and not required which is required to match the other aspects of the copy mechanism code generation.
259 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
260 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
261 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
262 // virtual SgNode* copy ( const SgCopyHelp & help) const;
263
265 virtual std::string class_name() const override;
266
268 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
269
271 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
272 // static const VariantT static_variant = V_SgAsmNERelocEntry;
273 enum { static_variant = V_SgAsmNERelocEntry };
274
275 /* the generated cast function */
277 ROSE_DLL_API friend SgAsmNERelocEntry* isSgAsmNERelocEntry( SgNode * s );
278
280 ROSE_DLL_API friend const SgAsmNERelocEntry* isSgAsmNERelocEntry( const SgNode * s );
281
282 // ******************************************
283 // * Memory Pool / New / Delete
284 // ******************************************
285
286 public:
288 static const unsigned pool_size; //
290 static std::vector<unsigned char *> pools; //
292 static SgAsmNERelocEntry * next_node; //
293
295 static unsigned long initializeStorageClassArray(SgAsmNERelocEntryStorageClass *); //
296
298 static void clearMemoryPool(); //
299 static void deleteMemoryPool(); //
300
302 static void extendMemoryPoolForFileIO(); //
303
305 static SgAsmNERelocEntry * getPointerFromGlobalIndex(unsigned long); //
307 static SgAsmNERelocEntry * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
308
310 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
312 static void resetValidFreepointers(); //
314 static unsigned long getNumberOfLastValidPointer(); //
315
316
317#if defined(INLINE_FUNCTIONS)
319 inline void *operator new (size_t size);
320#else
322 void *operator new (size_t size);
323#endif
325 void operator delete (void* pointer, size_t size);
326
327 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
328 void operator delete (void* pointer)
329 {
330 // This is the generated delete operator...
331 SgAsmNERelocEntry::operator delete (pointer,sizeof(SgAsmNERelocEntry));
332 }
333
335 static size_t numberOfNodes();
336
338 static size_t memoryUsage();
339
340 // End of scope which started in IR nodes specific code
341 /* */
342
343 /* name Internal Functions
344 \brief Internal functions ... incomplete-documentation
345
346 These functions have been made public as part of the design, but they are suggested for internal use
347 or by particularly knowledgeable users for specialized tools or applications.
348
349 \internal We could not make these private because they are required by user for special purposes. And
350 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
351
352 */
353
354 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
355 // overridden in every class by *generated* implementation
357 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
358 // MS: 06/28/02 container of names of variables or container indices
359 // used used in the traversal to access AST successor nodes
360 // overridden in every class by *generated* implementation
363 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
364
365 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
366 // than all the vector copies. The implementation for these functions is generated for each class.
368 virtual size_t get_numberOfTraversalSuccessors() override;
370 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
372 virtual size_t get_childIndex(SgNode *child) override;
373
374#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
375 // MS: 08/16/2002 method for generating RTI information
377 virtual RTIReturnType roseRTI() override;
378#endif
379 /* */
380
381
382
383 /* name Deprecated Functions
384 \brief Deprecated functions ... incomplete-documentation
385
386 These functions have been deprecated from use.
387 */
388 /* */
389
391 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
392
393 // JJW (10/16/2008): Changed to a single function in Node.code, and put
394 // getVariant() in #if 0 block to prevent confusing Doxygen
395#if 0
397 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
399 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
400#endif
401 /* */
402
403
404
405
406 public:
407 /* name Traversal Support Functions
408 \brief Traversal support functions ... incomplete-documentation
409
410 These functions have been made public as part of the design, but they are suggested for internal use
411 or by particularly knowledgable users for specialized tools or applications.
412 */
413 /* */
414
415 // DQ (11/26/2005): Support for visitor pattern mechanims
416 // (inferior to ROSE traversal mechanism, experimental).
420
421 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
423 virtual void accept (ROSE_VisitorPattern & visitor) override;
424
425 // DQ (12/26/2005): Support for traversal based on the memory pool
428 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
429
433
434 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
435 // This traversal helps support internal tools that call static member functions.
436 // note: this function operates on the memory pools.
439 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
440 /* */
441
442 public:
443 /* NodeId support functions */
445 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
448 static SgAsmNERelocEntry* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
451 static std::string getNodeIdString(SgAsmNERelocEntry* sgnode);
452 static std::string getNodeIdStringInternal(SgAsmNERelocEntry* sgnode);
453
454 public:
455 /* name Memory Allocation Functions
456 \brief Memory allocations functions ... incomplete-documentation
457
458 These functions have been made public as part of the design, but they are suggested for internal use
459 or by particularly knowledgable users for specialized tools or applications.
460 */
461 /* */
462
473 virtual bool isInMemoryPool() override;
474
485 virtual void checkDataMemberPointersIfInMemoryPool() override;
486
487 // DQ (4/30/2006): Modified to be a const function.
502 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
503
514
526 virtual long getChildIndex( SgNode* childNode ) const override;
527
528 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
529 // comment here (changed to be a C style comment and not be a doxygen comment).
530 /* \brief Constructor for use by AST File I/O Mechanism
531
532 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
533 which obtained via fast binary file I/O from disk.
534 */
535 // SgAsmNERelocEntry( SgAsmNERelocEntryStorageClass& source );
536
537
538
539
540
541 // JH (10/24/2005): methods added to support the ast file IO
542 private:
543
544 /* name AST Memory Allocation Support Functions
545 \brief Memory allocations support....
546
547 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
548 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
549 and support the AST File I/O Mechanism.
550 */
551 /* */
552
553 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
554 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
555 that I use the same type everywhere, if any changes are made. THe second one declares the type
556 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
557 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
558 a correspinding one in the AST_FILE_IO class!
559 */
560 // DQ (9/2/2015): This typedef is no longer used, we can't define the
561 // comment here (changed to be a C style comment and not be a doxygen comment).
562 /* \brief Typedef used for low level memory access.
563 */
564 // typedef unsigned char* TestType;
565
566 // DQ (9/2/2015): This typedef is no longer used, we can't define the
567 // comment here (changed to be a C style comment and not be a doxygen comment).
568 /* \brief Typedef used to hold memory addresses as values.
569 */
570 // typedef unsigned long AddressType;
571
572
573
574 // necessary, to have direct access to the p_freepointer and the private methods !
576 friend class AST_FILE_IO;
577
579 friend class SgAsmNERelocEntryStorageClass;
580
582 friend class AstSpecificDataManagingClass;
583
585 friend class AstSpecificDataManagingClassStorageClass;
586 public:
588 SgAsmNERelocEntry( const SgAsmNERelocEntryStorageClass& source );
589
590 // private: // JJW hack
591 /*
592 name AST Memory Allocation Support Variables
593 Memory allocations support variables
594
595 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
596 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
597 and support the AST File I/O Mechanism.
598 */
599 /* */
600
601 public:
602
603 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
604 // to current node (so that it will work cleanly with build functions to specify patterns).
605 // virtual SgNode* addRegExpAttribute();
612
613#ifndef _MSC_VER
614// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
615// and likely never fully implemented nor tested. Files remain in the src tree but are no
616// longer built.
617#define BUILD_ATERM_SUPPORT 0
618 #if BUILD_ATERM_SUPPORT
619 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
620 // DQ (10/4/2014): Adding ATerm support to ROSE.
630 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
631 virtual ATerm generate_ATerm() override;
632
634 virtual void generate_ATerm_Annotation(ATerm & term) override;
635 #endif
636 #endif // BUILD_ATERM_SUPPORT
637#endif
638 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
639 // virtual generate_AST(ATerm & term);
640 // virtual void read_ATerm_Annotation(ATerm & term);
641
642// *** COMMON CODE SECTION ENDS HERE ***
643
644
645// End of memberFunctionString
646// Start of memberFunctionString
647/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
648
649 // the generated cast function
650 // friend ROSE_DLL_API SgAsmNERelocEntry* isSgAsmNERelocEntry ( SgNode* s );
651
652 typedef SgAsmExecutableFileFormat base_node_type;
653
654
655// End of memberFunctionString
656
657
658
659
660
661
662
663
664
665
666 protected:
667// Start of memberFunctionString
668SgAsmNERelocEntry::NERelocSrcType p_src_type;
669
670// End of memberFunctionString
671// Start of memberFunctionString
672SgAsmNERelocEntry::NERelocModifiers p_modifier;
673
674// End of memberFunctionString
675// Start of memberFunctionString
676SgAsmNERelocEntry::NERelocTgtType p_tgt_type;
677
678// End of memberFunctionString
679// Start of memberFunctionString
680SgAsmNERelocEntry::NERelocFlags p_flags;
681
682// End of memberFunctionString
683// Start of memberFunctionString
684rose_addr_t p_src_offset;
685
686// End of memberFunctionString
687// Start of memberFunctionString
689
690// End of memberFunctionString
691// Start of memberFunctionString
693
694// End of memberFunctionString
695// Start of memberFunctionString
697
698// End of memberFunctionString
699// Start of memberFunctionString
701
702// End of memberFunctionString
703
706 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::NERelocModifiers,&SgAsmNERelocEntry::p_modifier>;
707 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::NERelocTgtType,&SgAsmNERelocEntry::p_tgt_type>;
708 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::NERelocFlags,&SgAsmNERelocEntry::p_flags>;
709 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, rose_addr_t,&SgAsmNERelocEntry::p_src_offset>;
710 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::iref_type,&SgAsmNERelocEntry::p_iref>;
711 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::iord_type,&SgAsmNERelocEntry::p_iord>;
712 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::iname_type,&SgAsmNERelocEntry::p_iname>;
713 friend struct Rose::Traits::generated::describe_field_t<SgAsmNERelocEntry, SgAsmNERelocEntry::osfixup_type,&SgAsmNERelocEntry::p_osfixup>;
714
715/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
716
717
718 };
719#endif
720
721// postdeclarations for SgAsmNERelocEntry
722
723/* #line 724 "../../../src/frontend/SageIII//SgAsmNERelocEntry.h" */
724
725/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
726
727/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
728
729
730/* #line 731 "../../../src/frontend/SageIII//SgAsmNERelocEntry.h" */
731
732#endif // ROSE_SgAsmNERelocEntry_H
733
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.
Contiguous region of a 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 VariantT variantT() const
returns new style SageIII enum values
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual size_t get_childIndex(SgNode *child)
index-based access to traversal successors by child node
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual std::string class_name() const
returns a string representing the class name
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
virtual SgNode * get_traversalSuccessorByIndex(size_t idx)
index-based access to traversal successors by index number
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * NERelocSrcType(int64_t)
Convert SgAsmNERelocEntry::NERelocSrcType enum constant to a string.
const char * NERelocFlags(int64_t)
Convert SgAsmNERelocEntry::NERelocFlags enum constant to a string.
const char * NERelocModifiers(int64_t)
Convert SgAsmNERelocEntry::NERelocModifiers enum constant to a string.
const char * NERelocTgtType(int64_t)
Convert SgAsmNERelocEntry::NERelocTgtType enum constant to a string.