2#ifndef ROSE_SgAsmPESectionTableEntry_H 
    3#define ROSE_SgAsmPESectionTableEntry_H 
    5#include <Cxx_GrammarDeclarations.h> 
    6#include <SgAsmExecutableFileFormat.h> 
   27#include <Rose/BinaryAnalysis/Address.h> 
   34#if !defined(DOCUMENTATION) 
   49#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   51    friend class boost::serialization::access;
 
   57        s & BOOST_SERIALIZATION_NVP(p_name);
 
   58        s & BOOST_SERIALIZATION_NVP(p_virtual_size);
 
   59        s & BOOST_SERIALIZATION_NVP(p_rva);
 
   60        s & BOOST_SERIALIZATION_NVP(p_physical_size);
 
   61        s & BOOST_SERIALIZATION_NVP(p_physical_offset);
 
   62        s & BOOST_SERIALIZATION_NVP(p_coff_line_nums);
 
   63        s & BOOST_SERIALIZATION_NVP(p_n_relocs);
 
   64        s & BOOST_SERIALIZATION_NVP(p_n_coff_line_nums);
 
   65        s & BOOST_SERIALIZATION_NVP(p_flags);
 
   77    struct PESectionTableEntry_disk {
 
   79        uint32_t virtual_size;     
 
   81        uint32_t physical_size;    
 
   82        uint32_t physical_offset;  
 
   83        uint32_t coff_line_nums;   
 
   85        uint32_t n_coff_line_nums; 
 
   88#if !defined(SWIG) && !defined(_MSC_VER) 
   89    __attribute__((packed))
 
  100        OF_IDATA            = 0x00000040,   
 
  101        OF_UDATA            = 0x00000080,   
 
  102        OF_INFO             = 0x00000200,   
 
  103        OF_REMOVE           = 0x00000800,   
 
  104        OF_COMDAT           = 0x00001000,   
 
  105        OF_NO_DEFER_SPEC_EXC= 0x00004000,   
 
  107        OF_GPREL            = 0x00008000,   
 
  108        OF_ALIGN_1          = 0x00100000,   
 
  109        OF_ALIGN_2          = 0x00200000,   
 
  110        OF_ALIGN_4          = 0x00300000,   
 
  111        OF_ALIGN_8          = 0x00400000,   
 
  112        OF_ALIGN_16         = 0x00500000,   
 
  113        OF_ALIGN_32         = 0x00600000,   
 
  114        OF_ALIGN_64         = 0x00700000,   
 
  115        OF_ALIGN_128        = 0x00800000,   
 
  116        OF_ALIGN_256        = 0x00900000,   
 
  117        OF_ALIGN_512        = 0x00a00000,   
 
  118        OF_ALIGN_1k         = 0x00b00000,   
 
  119        OF_ALIGN_2k         = 0x00c00000,   
 
  120        OF_ALIGN_4k         = 0x00d00000,   
 
  121        OF_ALIGN_8k         = 0x00e00000,   
 
  122        OF_ALIGN_MASK       = 0x00f00000,   
 
  123        OF_NRELOC_OVFL      = 0x01000000,   
 
  124        OF_DISCARDABLE      = 0x02000000,   
 
  125        OF_NO_CACHE         = 0x04000000,   
 
  126        OF_NO_PAGING        = 0x08000000,   
 
  127        OF_SHARED           = 0x10000000,   
 
  128        OF_EXECUTABLE       = 0x20000000,   
 
  129        OF_READABLE         = 0x40000000,   
 
  130        OF_WRITABLE         = 0x80000000    
 
  143    std::string 
const& 
get_name() 
const;
 
  193    unsigned const& get_coff_line_nums() 
const;
 
  194    void set_coff_line_nums(
unsigned const&);
 
  203    unsigned const& get_n_relocs() 
const;
 
  204    void set_n_relocs(
unsigned const&);
 
  213    unsigned const& get_n_coff_line_nums() 
const;
 
  214    void set_n_coff_line_nums(
unsigned const&);
 
  223    unsigned const& get_flags() 
const;
 
  224    void set_flags(
unsigned const&);
 
  235    virtual void dump(FILE*, 
const char *prefix, ssize_t idx) 
const;
 
  241    void update_from_section(
SgAsmPESection*) ROSE_DEPRECATED(
"use updateFromSection");
 
  276          virtual std::string 
class_name() 
const override;
 
  279          virtual VariantT 
variantT() 
const override; 
 
  284          enum { static_variant = V_SgAsmPESectionTableEntry };
 
  299          static const unsigned pool_size; 
 
  301          static std::vector<unsigned char *> pools; 
 
  306          static unsigned long initializeStorageClassArray(SgAsmPESectionTableEntryStorageClass *); 
 
  309          static void clearMemoryPool(); 
 
  310          static void deleteMemoryPool(); 
 
  313          static void extendMemoryPoolForFileIO(); 
 
  321          static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(
unsigned long); 
 
  323          static void resetValidFreepointers(); 
 
  325          static unsigned long getNumberOfLastValidPointer(); 
 
  328#if defined(INLINE_FUNCTIONS) 
  330          inline void *
operator new (
size_t size);
 
  333          void *
operator new (
size_t size);
 
  336          void operator delete (
void* pointer, 
size_t size);
 
  339          void operator delete (
void* pointer)
 
  385#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT 
  388          virtual RTIReturnType 
roseRTI() 
override;
 
  402          virtual const char* 
sage_class_name() const  override ROSE_DEPRECATED_FUNCTION;
 
  408          virtual int variant() const ROSE_DEPRECATED_FUNCTION;
 
  590          friend class SgAsmPESectionTableEntryStorageClass;
 
  593          friend class AstSpecificDataManagingClass;
 
  596          friend class AstSpecificDataManagingClassStorageClass;
 
  628#define BUILD_ATERM_SUPPORT 0 
  629   #if BUILD_ATERM_SUPPORT 
  630   #ifdef ROSE_USE_ROSE_ATERM_SUPPORT 
  642          virtual ATerm generate_ATerm() 
override;
 
  645          virtual void generate_ATerm_Annotation(ATerm & term) 
override;
 
  699unsigned p_coff_line_nums;
 
  707unsigned p_n_coff_line_nums;
 
Class holding static data and functions supporting File I/O.
 
Attribute containing a regex expression as a string.
 
Base class for PE sections.
 
Supporting class from copy mechanism within ROSE.
 
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.
 
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.
 
const char * PESectionFlags(int64_t)
Convert SgAsmPESectionTableEntry::PESectionFlags enum constant to a string.