ROSE 0.11.145.247
SgAsmElfEHFrameEntryFD.h
1
2#ifndef ROSE_SgAsmElfEHFrameEntryFD_H
3#define ROSE_SgAsmElfEHFrameEntryFD_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 SgAsmElfEHFrameEntryFD
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmElfEHFrameEntryFD.h" */
25/* #line 22333 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28#include <Rose/BinaryAnalysis/RelativeVirtualAddress.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 SgAsmElfEHFrameEntryFD
38class ROSE_DLL_API SgAsmElfEHFrameEntryFD : public SgAsmExecutableFileFormat
39 {
40 public:
41
42
43/* #line 44 "../../../src/frontend/SageIII//SgAsmElfEHFrameEntryFD.h" */
44
45 virtual SgNode* copy ( SgCopyHelp& help) const override;
46// Start of memberFunctionString
47/* #line 22369 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
48
49
50 //----------------------- Boost serialization for SgAsmElfEHFrameEntryFD -----------------------
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("SgAsmElfEHFrameEntryFD");
58 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
59 s & BOOST_SERIALIZATION_NVP(p_begin_rva);
60 s & BOOST_SERIALIZATION_NVP(p_size);
61 s & BOOST_SERIALIZATION_NVP(p_augmentation_data);
62 s & BOOST_SERIALIZATION_NVP(p_instructions);
63 debugSerializationEnd("SgAsmElfEHFrameEntryFD");
64 }
65#endif // ROSE_ENABLE_BOOST_SERIALIZATION
66public:
67public:
73 Rose::BinaryAnalysis::RelativeVirtualAddress const& get_begin_rva() const;
75 void set_begin_rva(Rose::BinaryAnalysis::RelativeVirtualAddress const&);
78public:
84 Rose::BinaryAnalysis::Address const& get_size() const;
85 void set_size(Rose::BinaryAnalysis::Address const&);
88public:
94 SgUnsignedCharList const& get_augmentation_data() const;
95 SgUnsignedCharList& get_augmentation_data();
96 void set_augmentation_data(SgUnsignedCharList const&);
99public:
105 SgUnsignedCharList const& get_instructions() const;
106 SgUnsignedCharList& get_instructions();
107 void set_instructions(SgUnsignedCharList const&);
109public:
112
114 virtual void dump(FILE*, const char *prefix, ssize_t idx) const;
115
120 std::string unparse(const SgAsmElfEHFrameSection*, SgAsmElfEHFrameEntryCI*) const;
121public:
123 virtual ~SgAsmElfEHFrameEntryFD();
124
125public:
128
129protected:
137
138
139// End of memberFunctionString
140// Start of memberFunctionString
141/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
142
143// *** COMMON CODE SECTION BEGINS HERE ***
144
145 public:
146
147 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
148 // and not required which is required to match the other aspects of the copy mechanism code generation.
149 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
150 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
151 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
152 // virtual SgNode* copy ( const SgCopyHelp & help) const;
153
155 virtual std::string class_name() const override;
156
158 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
159
161 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
162 // static const VariantT static_variant = V_SgAsmElfEHFrameEntryFD;
163 enum { static_variant = V_SgAsmElfEHFrameEntryFD };
164
165 /* the generated cast function */
167 ROSE_DLL_API friend SgAsmElfEHFrameEntryFD* isSgAsmElfEHFrameEntryFD( SgNode * s );
168
170 ROSE_DLL_API friend const SgAsmElfEHFrameEntryFD* isSgAsmElfEHFrameEntryFD( const SgNode * s );
171
172 // ******************************************
173 // * Memory Pool / New / Delete
174 // ******************************************
175
176 public:
178 static const unsigned pool_size; //
180 static std::vector<unsigned char *> pools; //
182 static SgAsmElfEHFrameEntryFD * next_node; //
183
185 static unsigned long initializeStorageClassArray(SgAsmElfEHFrameEntryFDStorageClass *); //
186
188 static void clearMemoryPool(); //
189 static void deleteMemoryPool(); //
190
192 static void extendMemoryPoolForFileIO(); //
193
195 static SgAsmElfEHFrameEntryFD * getPointerFromGlobalIndex(unsigned long); //
197 static SgAsmElfEHFrameEntryFD * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
198
200 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
202 static void resetValidFreepointers(); //
204 static unsigned long getNumberOfLastValidPointer(); //
205
206
207#if defined(INLINE_FUNCTIONS)
209 inline void *operator new (size_t size);
210#else
212 void *operator new (size_t size);
213#endif
215 void operator delete (void* pointer, size_t size);
216
217 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
218 void operator delete (void* pointer)
219 {
220 // This is the generated delete operator...
221 SgAsmElfEHFrameEntryFD::operator delete (pointer,sizeof(SgAsmElfEHFrameEntryFD));
222 }
223
225 static size_t numberOfNodes();
226
228 static size_t memoryUsage();
229
230 // End of scope which started in IR nodes specific code
231 /* */
232
233 /* name Internal Functions
234 \brief Internal functions ... incomplete-documentation
235
236 These functions have been made public as part of the design, but they are suggested for internal use
237 or by particularly knowledgeable users for specialized tools or applications.
238
239 \internal We could not make these private because they are required by user for special purposes. And
240 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
241
242 */
243
244 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
245 // overridden in every class by *generated* implementation
247 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
248 // MS: 06/28/02 container of names of variables or container indices
249 // used used in the traversal to access AST successor nodes
250 // overridden in every class by *generated* implementation
253 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
254
255 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
256 // than all the vector copies. The implementation for these functions is generated for each class.
258 virtual size_t get_numberOfTraversalSuccessors() const override;
260 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
262 virtual size_t get_childIndex(SgNode *child) const override;
263
264#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
265 // MS: 08/16/2002 method for generating RTI information
267 virtual RTIReturnType roseRTI() override;
268#endif
269 /* */
270
271
272
273 /* name Deprecated Functions
274 \brief Deprecated functions ... incomplete-documentation
275
276 These functions have been deprecated from use.
277 */
278 /* */
279
281 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
282
283 // JJW (10/16/2008): Changed to a single function in Node.code, and put
284 // getVariant() in #if 0 block to prevent confusing Doxygen
285#if 0
287 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
289 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
290#endif
291 /* */
292
293
294
295
296 public:
297 /* name Traversal Support Functions
298 \brief Traversal support functions ... incomplete-documentation
299
300 These functions have been made public as part of the design, but they are suggested for internal use
301 or by particularly knowledgable users for specialized tools or applications.
302 */
303 /* */
304
305 // DQ (11/26/2005): Support for visitor pattern mechanims
306 // (inferior to ROSE traversal mechanism, experimental).
310
311 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
313 virtual void accept (ROSE_VisitorPattern & visitor) override;
314
315 // DQ (12/26/2005): Support for traversal based on the memory pool
318 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
319
323
324 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
325 // This traversal helps support internal tools that call static member functions.
326 // note: this function operates on the memory pools.
329 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
330 /* */
331
332 public:
333 /* NodeId support functions */
335 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
338 static SgAsmElfEHFrameEntryFD* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
341 static std::string getNodeIdString(SgAsmElfEHFrameEntryFD* sgnode);
342 static std::string getNodeIdStringInternal(SgAsmElfEHFrameEntryFD* sgnode);
343
344 public:
345 /* name Memory Allocation Functions
346 \brief Memory allocations functions ... incomplete-documentation
347
348 These functions have been made public as part of the design, but they are suggested for internal use
349 or by particularly knowledgable users for specialized tools or applications.
350 */
351 /* */
352
363 virtual bool isInMemoryPool() override;
364
375 virtual void checkDataMemberPointersIfInMemoryPool() override;
376
377 // DQ (4/30/2006): Modified to be a const function.
392 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
393
404
416 virtual long getChildIndex( SgNode* childNode ) const override;
417
418 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
419 // comment here (changed to be a C style comment and not be a doxygen comment).
420 /* \brief Constructor for use by AST File I/O Mechanism
421
422 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
423 which obtained via fast binary file I/O from disk.
424 */
425 // SgAsmElfEHFrameEntryFD( SgAsmElfEHFrameEntryFDStorageClass& source );
426
427
428
429
430
431 // JH (10/24/2005): methods added to support the ast file IO
432 private:
433
434 /* name AST Memory Allocation Support Functions
435 \brief Memory allocations support....
436
437 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
438 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
439 and support the AST File I/O Mechanism.
440 */
441 /* */
442
443 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
444 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
445 that I use the same type everywhere, if any changes are made. THe second one declares the type
446 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
447 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
448 a correspinding one in the AST_FILE_IO class!
449 */
450 // DQ (9/2/2015): This typedef is no longer used, we can't define the
451 // comment here (changed to be a C style comment and not be a doxygen comment).
452 /* \brief Typedef used for low level memory access.
453 */
454 // typedef unsigned char* TestType;
455
456 // DQ (9/2/2015): This typedef is no longer used, we can't define the
457 // comment here (changed to be a C style comment and not be a doxygen comment).
458 /* \brief Typedef used to hold memory addresses as values.
459 */
460 // typedef unsigned long AddressType;
461
462
463
464 // necessary, to have direct access to the p_freepointer and the private methods !
466 friend class AST_FILE_IO;
467
469 friend class SgAsmElfEHFrameEntryFDStorageClass;
470
472 friend class AstSpecificDataManagingClass;
473
475 friend class AstSpecificDataManagingClassStorageClass;
476 public:
478 SgAsmElfEHFrameEntryFD( const SgAsmElfEHFrameEntryFDStorageClass& source );
479
480 // private: // JJW hack
481 /*
482 name AST Memory Allocation Support Variables
483 Memory allocations support variables
484
485 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
486 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
487 and support the AST File I/O Mechanism.
488 */
489 /* */
490
491 public:
492
493 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
494 // to current node (so that it will work cleanly with build functions to specify patterns).
495 // virtual SgNode* addRegExpAttribute();
502
503#ifndef _MSC_VER
504// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
505// and likely never fully implemented nor tested. Files remain in the src tree but are no
506// longer built.
507#define BUILD_ATERM_SUPPORT 0
508 #if BUILD_ATERM_SUPPORT
509 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
510 // DQ (10/4/2014): Adding ATerm support to ROSE.
520 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
521 virtual ATerm generate_ATerm() override;
522
524 virtual void generate_ATerm_Annotation(ATerm & term) override;
525 #endif
526 #endif // BUILD_ATERM_SUPPORT
527#endif
528 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
529 // virtual generate_AST(ATerm & term);
530 // virtual void read_ATerm_Annotation(ATerm & term);
531
532// *** COMMON CODE SECTION ENDS HERE ***
533
534
535// End of memberFunctionString
536// Start of memberFunctionString
537/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
538
539 // the generated cast function
540 // friend ROSE_DLL_API SgAsmElfEHFrameEntryFD* isSgAsmElfEHFrameEntryFD ( SgNode* s );
541
542 typedef SgAsmExecutableFileFormat base_node_type;
543
544
545// End of memberFunctionString
546
547
548
549
550
551 protected:
552// Start of memberFunctionString
554
555// End of memberFunctionString
556// Start of memberFunctionString
558
559// End of memberFunctionString
560// Start of memberFunctionString
561SgUnsignedCharList p_augmentation_data;
562
563// End of memberFunctionString
564// Start of memberFunctionString
565SgUnsignedCharList p_instructions;
566
567// End of memberFunctionString
568
570 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfEHFrameEntryFD, Rose::BinaryAnalysis::RelativeVirtualAddress,&SgAsmElfEHFrameEntryFD::p_begin_rva>;
571 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfEHFrameEntryFD, Rose::BinaryAnalysis::Address,&SgAsmElfEHFrameEntryFD::p_size>;
572 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfEHFrameEntryFD, SgUnsignedCharList,&SgAsmElfEHFrameEntryFD::p_augmentation_data>;
573 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfEHFrameEntryFD, SgUnsignedCharList,&SgAsmElfEHFrameEntryFD::p_instructions>;
574
575/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
576
577
578 };
579#endif
580
581// postdeclarations for SgAsmElfEHFrameEntryFD
582
583/* #line 584 "../../../src/frontend/SageIII//SgAsmElfEHFrameEntryFD.h" */
584
585/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
586
587/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
588
589
590/* #line 591 "../../../src/frontend/SageIII//SgAsmElfEHFrameEntryFD.h" */
591
592#endif // ROSE_SgAsmElfEHFrameEntryFD_H
593
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.
ELF error handling frame entry, common information entry.
ELF error handling frame entry frame description entry.
Represents an ELF EH frame section.
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
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.