ROSE 0.11.145.147
SgAsmElfSymverNeededAux.h
1
2#ifndef ROSE_SgAsmElfSymverNeededAux_H
3#define ROSE_SgAsmElfSymverNeededAux_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 SgAsmElfSymverNeededAux
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmElfSymverNeededAux.h" */
25/* #line 17855 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/ByteOrder.h>
28
29#ifdef ROSE_SgAsmElfSymverNeededAux_IMPL
30#include <SgAsmGenericString.h>
31#endif
32
33
34/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
35
36/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
37
38#if !defined(DOCUMENTATION)
39// Class Definition for SgAsmElfSymverNeededAux
40class ROSE_DLL_API SgAsmElfSymverNeededAux : public SgAsmExecutableFileFormat
41 {
42 public:
43
44
45/* #line 46 "../../../src/frontend/SageIII//SgAsmElfSymverNeededAux.h" */
46
47 virtual SgNode* copy ( SgCopyHelp& help) const override;
48// Start of memberFunctionString
49/* #line 17893 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
50
51
52 //----------------------- Boost serialization for SgAsmElfSymverNeededAux -----------------------
53#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
54private:
55 friend class boost::serialization::access;
56
57 template<class S>
58 void serialize(S &s, const unsigned /*version*/) {
59 debugSerializationBegin("SgAsmElfSymverNeededAux");
60 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmExecutableFileFormat);
61 s & BOOST_SERIALIZATION_NVP(p_hash);
62 s & BOOST_SERIALIZATION_NVP(p_flags);
63 s & BOOST_SERIALIZATION_NVP(p_other);
64 s & BOOST_SERIALIZATION_NVP(p_name);
65 debugSerializationEnd("SgAsmElfSymverNeededAux");
66 }
67#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
69 // Local types
71public:
72#ifdef _MSC_VER
73# pragma pack (1)
74#endif
75
77 struct ElfSymverNeededAux_disk {
78 uint32_t vna_hash;
79 uint16_t vna_flags;
80 uint16_t vna_other;
81 uint32_t vna_name;
82 uint32_t vna_next;
83 }
84#if !defined(SWIG) && !defined(_MSC_VER)
85 __attribute__((packed))
86#endif
87 ;
88
89#ifdef _MSC_VER
90# pragma pack ()
91#endif
92
94 // Properties
96public:
97public:
103 uint32_t const& get_hash() const;
104 void set_hash(uint32_t const&);
107public:
113 int const& get_flags() const;
114 void set_flags(int const&);
117public:
123 size_t const& get_other() const;
124 void set_other(size_t const&);
127public:
131 SgAsmGenericString* const& get_name() const;
132 void set_name(SgAsmGenericString* const&);
135 // Functions
137public:
143
146
149
155 virtual void dump(FILE *f, const char *prefix, ssize_t idx) const;
156public:
158 virtual ~SgAsmElfSymverNeededAux();
159
160public:
163
164protected:
172
173
174// End of memberFunctionString
175// Start of memberFunctionString
176/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
177
178// *** COMMON CODE SECTION BEGINS HERE ***
179
180 public:
181
182 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
183 // and not required which is required to match the other aspects of the copy mechanism code generation.
184 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
185 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
186 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
187 // virtual SgNode* copy ( const SgCopyHelp & help) const;
188
190 virtual std::string class_name() const override;
191
193 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
194
196 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
197 // static const VariantT static_variant = V_SgAsmElfSymverNeededAux;
198 enum { static_variant = V_SgAsmElfSymverNeededAux };
199
200 /* the generated cast function */
202 ROSE_DLL_API friend SgAsmElfSymverNeededAux* isSgAsmElfSymverNeededAux( SgNode * s );
203
205 ROSE_DLL_API friend const SgAsmElfSymverNeededAux* isSgAsmElfSymverNeededAux( const SgNode * s );
206
207 // ******************************************
208 // * Memory Pool / New / Delete
209 // ******************************************
210
211 public:
213 static const unsigned pool_size; //
215 static std::vector<unsigned char *> pools; //
217 static SgAsmElfSymverNeededAux * next_node; //
218
220 static unsigned long initializeStorageClassArray(SgAsmElfSymverNeededAuxStorageClass *); //
221
223 static void clearMemoryPool(); //
224 static void deleteMemoryPool(); //
225
227 static void extendMemoryPoolForFileIO(); //
228
230 static SgAsmElfSymverNeededAux * getPointerFromGlobalIndex(unsigned long); //
232 static SgAsmElfSymverNeededAux * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
233
235 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
237 static void resetValidFreepointers(); //
239 static unsigned long getNumberOfLastValidPointer(); //
240
241
242#if defined(INLINE_FUNCTIONS)
244 inline void *operator new (size_t size);
245#else
247 void *operator new (size_t size);
248#endif
250 void operator delete (void* pointer, size_t size);
251
252 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
253 void operator delete (void* pointer)
254 {
255 // This is the generated delete operator...
256 SgAsmElfSymverNeededAux::operator delete (pointer,sizeof(SgAsmElfSymverNeededAux));
257 }
258
260 static size_t numberOfNodes();
261
263 static size_t memoryUsage();
264
265 // End of scope which started in IR nodes specific code
266 /* */
267
268 /* name Internal Functions
269 \brief Internal functions ... incomplete-documentation
270
271 These functions have been made public as part of the design, but they are suggested for internal use
272 or by particularly knowledgeable users for specialized tools or applications.
273
274 \internal We could not make these private because they are required by user for special purposes. And
275 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
276
277 */
278
279 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
280 // overridden in every class by *generated* implementation
282 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
283 // MS: 06/28/02 container of names of variables or container indices
284 // used used in the traversal to access AST successor nodes
285 // overridden in every class by *generated* implementation
288 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
289
290 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
291 // than all the vector copies. The implementation for these functions is generated for each class.
293 virtual size_t get_numberOfTraversalSuccessors() override;
295 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
297 virtual size_t get_childIndex(SgNode *child) override;
298
299#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
300 // MS: 08/16/2002 method for generating RTI information
302 virtual RTIReturnType roseRTI() override;
303#endif
304 /* */
305
306
307
308 /* name Deprecated Functions
309 \brief Deprecated functions ... incomplete-documentation
310
311 These functions have been deprecated from use.
312 */
313 /* */
314
316 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
317
318 // JJW (10/16/2008): Changed to a single function in Node.code, and put
319 // getVariant() in #if 0 block to prevent confusing Doxygen
320#if 0
322 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
324 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
325#endif
326 /* */
327
328
329
330
331 public:
332 /* name Traversal Support Functions
333 \brief Traversal support functions ... incomplete-documentation
334
335 These functions have been made public as part of the design, but they are suggested for internal use
336 or by particularly knowledgable users for specialized tools or applications.
337 */
338 /* */
339
340 // DQ (11/26/2005): Support for visitor pattern mechanims
341 // (inferior to ROSE traversal mechanism, experimental).
345
346 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
348 virtual void accept (ROSE_VisitorPattern & visitor) override;
349
350 // DQ (12/26/2005): Support for traversal based on the memory pool
353 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
354
358
359 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
360 // This traversal helps support internal tools that call static member functions.
361 // note: this function operates on the memory pools.
364 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
365 /* */
366
367 public:
368 /* NodeId support functions */
370 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
373 static SgAsmElfSymverNeededAux* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
376 static std::string getNodeIdString(SgAsmElfSymverNeededAux* sgnode);
377 static std::string getNodeIdStringInternal(SgAsmElfSymverNeededAux* sgnode);
378
379 public:
380 /* name Memory Allocation Functions
381 \brief Memory allocations functions ... incomplete-documentation
382
383 These functions have been made public as part of the design, but they are suggested for internal use
384 or by particularly knowledgable users for specialized tools or applications.
385 */
386 /* */
387
398 virtual bool isInMemoryPool() override;
399
410 virtual void checkDataMemberPointersIfInMemoryPool() override;
411
412 // DQ (4/30/2006): Modified to be a const function.
427 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
428
439
451 virtual long getChildIndex( SgNode* childNode ) const override;
452
453 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
454 // comment here (changed to be a C style comment and not be a doxygen comment).
455 /* \brief Constructor for use by AST File I/O Mechanism
456
457 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
458 which obtained via fast binary file I/O from disk.
459 */
460 // SgAsmElfSymverNeededAux( SgAsmElfSymverNeededAuxStorageClass& source );
461
462
463
464
465
466 // JH (10/24/2005): methods added to support the ast file IO
467 private:
468
469 /* name AST Memory Allocation Support Functions
470 \brief Memory allocations support....
471
472 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
473 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
474 and support the AST File I/O Mechanism.
475 */
476 /* */
477
478 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
479 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
480 that I use the same type everywhere, if any changes are made. THe second one declares the type
481 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
482 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
483 a correspinding one in the AST_FILE_IO class!
484 */
485 // DQ (9/2/2015): This typedef is no longer used, we can't define the
486 // comment here (changed to be a C style comment and not be a doxygen comment).
487 /* \brief Typedef used for low level memory access.
488 */
489 // typedef unsigned char* TestType;
490
491 // DQ (9/2/2015): This typedef is no longer used, we can't define the
492 // comment here (changed to be a C style comment and not be a doxygen comment).
493 /* \brief Typedef used to hold memory addresses as values.
494 */
495 // typedef unsigned long AddressType;
496
497
498
499 // necessary, to have direct access to the p_freepointer and the private methods !
501 friend class AST_FILE_IO;
502
504 friend class SgAsmElfSymverNeededAuxStorageClass;
505
507 friend class AstSpecificDataManagingClass;
508
510 friend class AstSpecificDataManagingClassStorageClass;
511 public:
513 SgAsmElfSymverNeededAux( const SgAsmElfSymverNeededAuxStorageClass& source );
514
515 // private: // JJW hack
516 /*
517 name AST Memory Allocation Support Variables
518 Memory allocations support variables
519
520 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
521 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
522 and support the AST File I/O Mechanism.
523 */
524 /* */
525
526 public:
527
528 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
529 // to current node (so that it will work cleanly with build functions to specify patterns).
530 // virtual SgNode* addRegExpAttribute();
537
538#ifndef _MSC_VER
539// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
540// and likely never fully implemented nor tested. Files remain in the src tree but are no
541// longer built.
542#define BUILD_ATERM_SUPPORT 0
543 #if BUILD_ATERM_SUPPORT
544 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
545 // DQ (10/4/2014): Adding ATerm support to ROSE.
555 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
556 virtual ATerm generate_ATerm() override;
557
559 virtual void generate_ATerm_Annotation(ATerm & term) override;
560 #endif
561 #endif // BUILD_ATERM_SUPPORT
562#endif
563 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
564 // virtual generate_AST(ATerm & term);
565 // virtual void read_ATerm_Annotation(ATerm & term);
566
567// *** COMMON CODE SECTION ENDS HERE ***
568
569
570// End of memberFunctionString
571// Start of memberFunctionString
572/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
573
574 // the generated cast function
575 // friend ROSE_DLL_API SgAsmElfSymverNeededAux* isSgAsmElfSymverNeededAux ( SgNode* s );
576
577 typedef SgAsmExecutableFileFormat base_node_type;
578
579
580// End of memberFunctionString
581
582
583
584
585
586 protected:
587// Start of memberFunctionString
588uint32_t p_hash;
589
590// End of memberFunctionString
591// Start of memberFunctionString
592int p_flags;
593
594// End of memberFunctionString
595// Start of memberFunctionString
596size_t p_other;
597
598// End of memberFunctionString
599// Start of memberFunctionString
600SgAsmGenericString* p_name;
601
602// End of memberFunctionString
603
605 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSymverNeededAux, uint32_t,&SgAsmElfSymverNeededAux::p_hash>;
606 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSymverNeededAux, int,&SgAsmElfSymverNeededAux::p_flags>;
607 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSymverNeededAux, size_t,&SgAsmElfSymverNeededAux::p_other>;
608 friend struct Rose::Traits::generated::describe_field_t<SgAsmElfSymverNeededAux, SgAsmGenericString*,&SgAsmElfSymverNeededAux::p_name>;
609
610/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
611
612
613 };
614#endif
615
616// postdeclarations for SgAsmElfSymverNeededAux
617
618/* #line 619 "../../../src/frontend/SageIII//SgAsmElfSymverNeededAux.h" */
619
620/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
621
622/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
623
624
625/* #line 626 "../../../src/frontend/SageIII//SgAsmElfSymverNeededAux.h" */
626
627#endif // ROSE_SgAsmElfSymverNeededAux_H
628
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Auxiliary info for needed symbol version.
One entry of the ELF symbol version needed table.
GNU symbol version requirements table.
Base class for many binary analysis nodes.
void initializeProperties()
Initialize all properties that have explicit initial values.
Base class for strings related to binary specimens.
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 parse(SgAsmGenericFile *)
Main function to parse DWARF information.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
ROSE_DLL_API int set_name(SgInitializedName *initializedNameNode, SgName new_name)
set_name of symbol in symbol table.
std::string get_name(const SgNode *node)
Generate a useful name to describe the SgNode.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.