SgAsmFunctionDeclaration Class Reference

#include <Cxx_Grammar.h>

Inheritance diagram for SgAsmFunctionDeclaration:

Inheritance graph
[legend]
Collaboration diagram for SgAsmFunctionDeclaration:

Collaboration graph
[legend]
List of all members.

Public Types

typedef SgAsmDeclaration base_node_type
 FUNC_NONE = 0x0000
 Used for initialization; not a bit flag.
 FUNC_ENTRY_POINT = 0x0001
 An entry point specified in the file header.
 FUNC_CALL_TARGET = 0x0002
 Target of a function call instruction sequence in the CFG.
 FUNC_CALL_INSN = 0x0004
 Target of call, possibly not in the CFG (see Partitioner::mark_call_insns).
 FUNC_EH_FRAME = 0x0008
 Address mentioned in the ELF .eh_frame section.
 FUNC_SYMBOL = 0x0010
 Address of a function symbol in a symbol table.
 FUNC_PATTERN = 0x0020
 Appears to be a function based on pattern of instructions.
 FUNC_GRAPH = 0x0040
 Implied by inter-basicblock branching.
 FUNC_USERDEF = 0x0080
 User-defined algorithm.
 FUNC_INTERPAD = 0x0100
 Created to represent NOP padding between other functions.
 FUNC_DISCONT = 0x0200
 Blocks of function are not contiguous in memory.
 FUNC_INSNHEAD = 0x0400
 Initial instructions not in any other function.
 FUNC_IMPORT = 0x0800
 Functions dynamically linked.
 FUNC_LEFTOVERS = 0x1000
 Generated function to hold blocks that are otherwise not part of any function.
 FUNC_DEFAULT = 0x1fff
 Default value for Partitioner class.
 e_unknown = 0
 e_standard = 1
 e_library = 2
 e_imported = 3
 e_thunk = 4
 e_last
 e_unknown_call = 0
 e_std_call = 1
 e_fast_call = 2
 e_cdecl_call = 3
 e_this_call = 4
 e_last_call
 static_variant = V_SgAsmFunctionDeclaration
enum  FunctionReason {
  FUNC_NONE = 0x0000,
  FUNC_ENTRY_POINT = 0x0001,
  FUNC_CALL_TARGET = 0x0002,
  FUNC_CALL_INSN = 0x0004,
  FUNC_EH_FRAME = 0x0008,
  FUNC_SYMBOL = 0x0010,
  FUNC_PATTERN = 0x0020,
  FUNC_GRAPH = 0x0040,
  FUNC_USERDEF = 0x0080,
  FUNC_INTERPAD = 0x0100,
  FUNC_DISCONT = 0x0200,
  FUNC_INSNHEAD = 0x0400,
  FUNC_IMPORT = 0x0800,
  FUNC_LEFTOVERS = 0x1000,
  FUNC_DEFAULT = 0x1fff
}
 Reasons why an instruction might be considered the beginning of a function. More...
enum  function_kind_enum {
  e_unknown = 0,
  e_standard = 1,
  e_library = 2,
  e_imported = 3,
  e_thunk = 4,
  e_last
}
 enum declaration as specified in proposed Sabre database schema More...
enum  function_calling_convention_enum {
  e_unknown_call = 0,
  e_std_call = 1,
  e_fast_call = 2,
  e_cdecl_call = 3,
  e_this_call = 4,
  e_last_call
}
 enum declaration to specify type of calling convention used. More...
enum  { static_variant = V_SgAsmFunctionDeclaration }
 static variant value More...

Public Member Functions

virtual SgNodecopy (SgCopyHelp &help) const
int nrOfValidInstructions (std::vector< SgNode * > &succs)
void append_statement (SgAsmStatement *statement)
void remove_statement (SgAsmStatement *statement)
void append_dest (SgAsmStatement *instruction)
void remove_children ()
SgAsmBlockget_entry_block () const
std::string get_functionReasonString ()
std::string reason_str (bool pad) const
 Returns a very short string describing the reason mask.
function_calling_convention_enum get_functionCallingConvention () const
 Computes the calling convention used in this function (used to score properly formed functions).
int get_stackNutralityMetric () const
 Computes the offset of the stack at the end of the call relative the the start of the call (in a perfect function this would be zero, this is used to score properly formed functions).
int get_numberOfPathsNotReturningMetric () const
 Computes the number of paths determined to no return (all paths returning metric).
virtual std::string class_name () const
 Compute the percentage of coverage based on the length of blocks in this disassembled function (in bytes) compared to the size of the address range of the top of the first block in memory to the end of the last block in memory.Copies AST (whole subtree, depending on the SgCopyHelp class returns a string representing the class name.
virtual VariantT variantT () const
 returns new style SageIII enum values
void * operator new (size_t size)
 returns pointer to newly allocated IR node
void operator delete (void *pointer, size_t size)
 deallocated memory for IR node (returns memory to memory pool for reuse)
void operator delete (void *pointer)
virtual std::vector< SgNode * > get_traversalSuccessorContainer ()
 FOR INTERNAL USE within ROSE traverals mechanism only.
virtual std::vector< std::string > get_traversalSuccessorNamesContainer ()
 FOR INTERNAL USE within ROSE traverals mechanism only.
virtual size_t get_numberOfTraversalSuccessors ()
virtual SgNodeget_traversalSuccessorByIndex (size_t idx)
virtual size_t get_childIndex (SgNode *child)
virtual RTIReturnType roseRTI ()
 FOR INTERNAL USE Access to Runtime Type Information (RTI) for this IR nodes.
virtual const char * sage_class_name () const ROSE_DEPRECATED_FUNCTION
void executeVisitorMemberFunction (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern.
virtual void accept (ROSE_VisitorPattern &visitor)
 DXN (08/09/2010): support for the classic visitor pattern done in GoF.
virtual bool isInMemoryPool ()
 FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.
virtual void checkDataMemberPointersIfInMemoryPool ()
 FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.
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
virtual void processDataMemberReferenceToPointers (ReferenceToPointerHandler *)
 FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
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 node.
 SgAsmFunctionDeclaration (const SgAsmFunctionDeclarationStorageClass &source)
SgAsmFunctionDeclarationaddRegExpAttribute (std::string s, AstRegExAttribute *a)
 Support for AST matching using regular expression.
std::string get_name () const
void set_name (std::string name)
unsigned get_reason () const
void set_reason (unsigned reason)
SgAsmFunctionDeclaration::function_kind_enum get_function_kind () const
void set_function_kind (SgAsmFunctionDeclaration::function_kind_enum function_kind)
std::string get_name_md5 () const
void set_name_md5 (std::string name_md5)
const SgAsmStatementPtrListget_statementList () const
SgAsmStatementPtrListget_statementList ()
SgAsmStatementPtrList get_dest () const
void set_dest (SgAsmStatementPtrList dest)
rose_addr_t get_entry_va () const
void set_entry_va (rose_addr_t entry_va)
SgSymbolTableget_symbol_table () const
void set_symbol_table (SgSymbolTable *symbol_table)
size_t get_cached_vertex () const
void set_cached_vertex (size_t cached_vertex)
virtual ~SgAsmFunctionDeclaration ()
 SgAsmFunctionDeclaration (rose_addr_t address=0, std::string name="", unsigned reason=SgAsmFunctionDeclaration::FUNC_NONE, SgAsmFunctionDeclaration::function_kind_enum function_kind=SgAsmFunctionDeclaration::e_unknown)

Static Public Member Functions

static std::string reason_str (bool pad, unsigned reason)
 Class method that converts a reason bit vector to a human-friendly string.
static size_t numberOfNodes ()
 Returns the total number of IR nodes of this type.
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.
static void traverseMemoryPoolVisitorPattern (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern.
static void visitRepresentativeNode (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for type-based traversal.

Protected Attributes

std::string p_name
unsigned p_reason
SgAsmFunctionDeclaration::function_kind_enum p_function_kind
std::string p_name_md5
SgAsmStatementPtrList p_statementList
SgAsmStatementPtrList p_dest
rose_addr_t p_entry_va
SgSymbolTablep_symbol_table
size_t p_cached_vertex

Friends

class AST_FILE_IO
class SgAsmFunctionDeclarationStorageClass
class AstSpecificDataManagingClass
class AstSpecificDataManagingClassStorageClass
SgAsmFunctionDeclarationisSgAsmFunctionDeclaration (SgNode *s)
 Casts pointer from base class to derived class.
const SgAsmFunctionDeclarationisSgAsmFunctionDeclaration (const SgNode *s)
 Casts pointer from base class to derived class (for const pointers).
SgAsmFunctionDeclarationSgAsmFunctionDeclaration_getPointerFromGlobalIndex (unsigned long globalIndex)
 Constructor for use by AST File I/O MechanismTypedef used for low level memory access. Typedef used to hold memory addresses as values. Methods to find the pointer to a global and local index.
unsigned long SgAsmFunctionDeclaration_getNumberOfValidNodesAndSetGlobalIndexInFreepointer (unsigned long)
 Get the size of the memory pool.
void SgAsmFunctionDeclaration_clearMemoryPool ()
void SgAsmFunctionDeclaration_extendMemoryPoolForFileIO (unsigned long)
void SgAsmFunctionDeclaration_getNextValidPointer (std::pair< SgAsmFunctionDeclaration *, std::vector< unsigned char * >::const_iterator > &)
void SgAsmFunctionDeclaration_resetValidFreepointers ()

Member Typedef Documentation

typedef SgAsmDeclaration SgAsmFunctionDeclaration::base_node_type

Reimplemented from SgAsmDeclaration.


Member Enumeration Documentation

enum SgAsmFunctionDeclaration::FunctionReason

Reasons why an instruction might be considered the beginning of a function.

These bit flags are also used by the instruction partitioner (Partitioner class) to determine what heuristics are used when partitioning instructions into functions.

Enumerator:
FUNC_NONE  Used for initialization; not a bit flag.
FUNC_ENTRY_POINT  An entry point specified in the file header.
FUNC_CALL_TARGET  Target of a function call instruction sequence in the CFG.

When used as a partitioning heuristic, the partitioner will create new functions when it discovers a call-like sequence while traversing the CFG.

FUNC_CALL_INSN  Target of call, possibly not in the CFG (see Partitioner::mark_call_insns).

When used as a partitioning heuristic, the partitioner will search all available instructions for instances of call-like instructions and define a function for each target. The function entry points added in this way become initial nodes of the CFG which is used by some of the other function discovery methods, including FUNC_CALL_TARGET.

FUNC_EH_FRAME  Address mentioned in the ELF .eh_frame section.
FUNC_SYMBOL  Address of a function symbol in a symbol table.
FUNC_PATTERN  Appears to be a function based on pattern of instructions.

When used as a partitioning heuristic, the partitioner will search through all available instructions and create function entry points. The function entry points are added to the CFG which is used by some of the other function discovery methods.

FUNC_GRAPH  Implied by inter-basicblock branching.

When used as a partitioning heuristic, the partitioner creates a new function when it discovers, by CFG traversal, that two different functions branch to a common basic block. The block in common becomes a new function under this rule.

FUNC_USERDEF  User-defined algorithm.

See Partitioner::addFunctionDetector().

FUNC_INTERPAD  Created to represent NOP padding between other functions.

When used as a partitioning heuristic, the partitioner searches for padding after all CFG-based analysis has completed. Padding can consist of either NOP instructions or zero bytes. The former requires that instructions at the interfunction addresses have been disassembled.

FUNC_DISCONT  Blocks of function are not contiguous in memory.

This is not a partitioner heuristic, but rather only an indication of whether the function's basic blocks occupy contiguous memory locations.

FUNC_INSNHEAD  Initial instructions not in any other function.

(UNUSED?)

FUNC_IMPORT  Functions dynamically linked.

For ELF containers, these are the entries in the procedure lookup table (PLT). When used as a partitioning heuristic, the partitioner will scan the PLT and define a function for each entry.

FUNC_LEFTOVERS  Generated function to hold blocks that are otherwise not part of any function.

If this bit is turned off then the instruction Partitioner will delete instructions that it couldn't assign to a function.

FUNC_DEFAULT  Default value for Partitioner class.

enum SgAsmFunctionDeclaration::function_kind_enum

enum declaration as specified in proposed Sabre database schema

Enumerator:
e_unknown 
e_standard 
e_library 
e_imported 
e_thunk 
e_last 

enum SgAsmFunctionDeclaration::function_calling_convention_enum

enum declaration to specify type of calling convention used.

Enumerator:
e_unknown_call 
e_std_call 
e_fast_call 
e_cdecl_call 
e_this_call 
e_last_call 

anonymous enum

static variant value

Enumerator:
static_variant 


Constructor & Destructor Documentation

SgAsmFunctionDeclaration::SgAsmFunctionDeclaration ( const SgAsmFunctionDeclarationStorageClass &  source  ) 

virtual SgAsmFunctionDeclaration::~SgAsmFunctionDeclaration (  )  [virtual]

SgAsmFunctionDeclaration::SgAsmFunctionDeclaration ( rose_addr_t  address = 0,
std::string  name = "",
unsigned  reason = SgAsmFunctionDeclaration::FUNC_NONE,
SgAsmFunctionDeclaration::function_kind_enum  function_kind = SgAsmFunctionDeclaration::e_unknown 
)


Member Function Documentation

virtual SgNode* SgAsmFunctionDeclaration::copy ( SgCopyHelp help  )  const [virtual]

Reimplemented from SgAsmDeclaration.

int SgAsmFunctionDeclaration::nrOfValidInstructions ( std::vector< SgNode * > &  succs  ) 

void SgAsmFunctionDeclaration::append_statement ( SgAsmStatement statement  ) 

void SgAsmFunctionDeclaration::remove_statement ( SgAsmStatement statement  ) 

void SgAsmFunctionDeclaration::append_dest ( SgAsmStatement instruction  ) 

void SgAsmFunctionDeclaration::remove_children (  ) 

SgAsmBlock* SgAsmFunctionDeclaration::get_entry_block (  )  const

std::string SgAsmFunctionDeclaration::get_functionReasonString (  ) 

std::string SgAsmFunctionDeclaration::reason_str ( bool  pad  )  const

Returns a very short string describing the reason mask.

std::string SgAsmFunctionDeclaration::reason_str ( bool  do_pad,
unsigned  r 
) [static]

Class method that converts a reason bit vector to a human-friendly string.

The second argument is the bit vector of SgAsmFunctionDeclaration::FunctionReason bits.

function_calling_convention_enum SgAsmFunctionDeclaration::get_functionCallingConvention (  )  const

Computes the calling convention used in this function (used to score properly formed functions).

int SgAsmFunctionDeclaration::get_stackNutralityMetric (  )  const

Computes the offset of the stack at the end of the call relative the the start of the call (in a perfect function this would be zero, this is used to score properly formed functions).

int SgAsmFunctionDeclaration::get_numberOfPathsNotReturningMetric (  )  const

Computes the number of paths determined to no return (all paths returning metric).

virtual std::string SgAsmFunctionDeclaration::class_name (  )  const [virtual]

Compute the percentage of coverage based on the length of blocks in this disassembled function (in bytes) compared to the size of the address range of the top of the first block in memory to the end of the last block in memory.Copies AST (whole subtree, depending on the SgCopyHelp class returns a string representing the class name.

Reimplemented from SgAsmDeclaration.

virtual VariantT SgAsmFunctionDeclaration::variantT (  )  const [virtual]

returns new style SageIII enum values

Reimplemented from SgAsmDeclaration.

void* SgAsmFunctionDeclaration::operator new ( size_t  size  ) 

returns pointer to newly allocated IR node

Reimplemented from SgAsmDeclaration.

void SgAsmFunctionDeclaration::operator delete ( void *  pointer,
size_t  size 
)

deallocated memory for IR node (returns memory to memory pool for reuse)

Reimplemented from SgAsmDeclaration.

void SgAsmFunctionDeclaration::operator delete ( void *  pointer  ) 

Reimplemented from SgAsmDeclaration.

static size_t SgAsmFunctionDeclaration::numberOfNodes (  )  [static]

Returns the total number of IR nodes of this type.

Reimplemented from SgAsmDeclaration.

static size_t SgAsmFunctionDeclaration::memoryUsage (  )  [static]

Returns the size in bytes of the total memory allocated for all IR nodes of this type.

Reimplemented from SgAsmDeclaration.

virtual std::vector<SgNode*> SgAsmFunctionDeclaration::get_traversalSuccessorContainer (  )  [virtual]

FOR INTERNAL USE within ROSE traverals mechanism only.

This function builds and returns a copy of ordered container holding pointers to children of this node in a traversal. It is associated with the definition of a tree that is travered by the AST traversal mechanism; a tree that is embeded in the AST (which is a more general graph). This function is used within the implementation of the AST traversal and has a semantics may change in subtle ways that makes it difficult to use in user code. It can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Warning:
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Returns:
Returns ordered STL Container of pointers to children nodes in AST.

Reimplemented from SgAsmDeclaration.

virtual std::vector<std::string> SgAsmFunctionDeclaration::get_traversalSuccessorNamesContainer (  )  [virtual]

FOR INTERNAL USE within ROSE traverals mechanism only.

This function builds and returns a copy of ordered container holding strings used to name data members that are traversed in the IR node. It is associated with the definition of a tree that is travered by the AST traversal mechanism; a tree that is embeded in the AST (which is a more general graph). This function is used within the implementation of the AST traversal and has a semantics may change in subtle ways that makes it difficult to use in user code. It can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Warning:
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Each string is a name of a member variable holding a pointer to a child in the AST. The names are the same as used in the generated enums for accessing attributes in a traversal. The order is the same in which they are traversed and the same in which the access enums are defined. Therefore this method can be used to get the corresponding name (string) of an access enum which allows to produce more meaningful messages for attribute computations.

Returns:
Returns ordered STL container of names (strings) of access names to children nodes in AST.

Reimplemented from SgAsmDeclaration.

virtual size_t SgAsmFunctionDeclaration::get_numberOfTraversalSuccessors (  )  [virtual]

Reimplemented from SgAsmDeclaration.

virtual SgNode* SgAsmFunctionDeclaration::get_traversalSuccessorByIndex ( size_t  idx  )  [virtual]

Reimplemented from SgAsmDeclaration.

virtual size_t SgAsmFunctionDeclaration::get_childIndex ( SgNode child  )  [virtual]

Reimplemented from SgAsmDeclaration.

virtual RTIReturnType SgAsmFunctionDeclaration::roseRTI (  )  [virtual]

FOR INTERNAL USE Access to Runtime Type Information (RTI) for this IR nodes.

This function provides runtime type information for accessing the structure of the current node. It is useful for generating code which would dump out or rebuild IR nodes.

Returns:
Returns a RTIReturnType object (runtime type information).

Reimplemented from SgAsmDeclaration.

virtual const char* SgAsmFunctionDeclaration::sage_class_name (  )  const [virtual]

returns a C style string (char*) representing the class name

Reimplemented from SgAsmDeclaration.

void SgAsmFunctionDeclaration::executeVisitorMemberFunction ( ROSE_VisitorPattern visitor  ) 

FOR INTERNAL USE Support for visitor pattern.

Reimplemented from SgAsmDeclaration.

virtual void SgAsmFunctionDeclaration::accept ( ROSE_VisitorPattern visitor  )  [virtual]

DXN (08/09/2010): support for the classic visitor pattern done in GoF.

Reimplemented from SgAsmDeclaration.

static void SgAsmFunctionDeclaration::traverseMemoryPoolNodes ( ROSE_VisitTraversal visit  )  [static]

FOR INTERNAL USE Support for visitor pattern.

Reimplemented from SgAsmDeclaration.

static void SgAsmFunctionDeclaration::traverseMemoryPoolVisitorPattern ( ROSE_VisitorPattern visitor  )  [static]

FOR INTERNAL USE Support for visitor pattern.

Reimplemented from SgAsmDeclaration.

static void SgAsmFunctionDeclaration::visitRepresentativeNode ( ROSE_VisitTraversal visit  )  [static]

FOR INTERNAL USE Support for type-based traversal.

Reimplemented from SgAsmDeclaration.

virtual bool SgAsmFunctionDeclaration::isInMemoryPool (  )  [virtual]

FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.

The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.

Reimplemented from SgAsmDeclaration.

virtual void SgAsmFunctionDeclaration::checkDataMemberPointersIfInMemoryPool (  )  [virtual]

FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.

The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.

Reimplemented from SgAsmDeclaration.

virtual std::vector<std::pair<SgNode*,std::string> > SgAsmFunctionDeclaration::returnDataMemberPointers (  )  const [virtual]

FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools

This functions is part of general support for many possible tools to operate on the AST. The forms a list of ALL IR node pointers used by each IR node, and is a supperset of the get_traversalSuccessorContainer(). It is (I think) less than the set of pointers used by the AST file I/O. This is part of work implemented by Andreas, and support tools such as the AST graph generation.

Warning:
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Returns:
STL vector of pairs of SgNode* and strings

Reimplemented from SgAsmDeclaration.

virtual void SgAsmFunctionDeclaration::processDataMemberReferenceToPointers ( ReferenceToPointerHandler *   )  [virtual]

FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools

This functions similar to returnDataMemberPointers() except that it passes references to a handler object. As a result there is FAR more damage that can be done by using this function, but it is type-safe. This is provided for support of internal tools that operate on the AST, e.g the AST Merge mechanism.

Warning:
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Reimplemented from SgAsmDeclaration.

virtual long SgAsmFunctionDeclaration::getChildIndex ( SgNode childNode  )  const [virtual]

FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node.

This function returns a unique value for the input childNode in set of children at this IR node. Note that a negative value indicates that the input node is not a child. This is the basis for the implementation of the isChild(SgNode*) member function. Data members that are NULL in the IR node are counted internally (so that this function returns value that could be statically defined, and so are not dynamically determined).

Warning:
The mapping on children to integer values could change from release to release of ROSE.
Returns:
long

Reimplemented from SgAsmDeclaration.

SgAsmFunctionDeclaration* SgAsmFunctionDeclaration::addRegExpAttribute ( std::string  s,
AstRegExAttribute a 
)

Support for AST matching using regular expression.

This support is incomplete and the subject of current research to define RegEx trees to support inexact matching.

Reimplemented from SgAsmDeclaration.

std::string SgAsmFunctionDeclaration::get_name (  )  const

void SgAsmFunctionDeclaration::set_name ( std::string  name  ) 

unsigned SgAsmFunctionDeclaration::get_reason (  )  const

void SgAsmFunctionDeclaration::set_reason ( unsigned  reason  ) 

SgAsmFunctionDeclaration::function_kind_enum SgAsmFunctionDeclaration::get_function_kind (  )  const

void SgAsmFunctionDeclaration::set_function_kind ( SgAsmFunctionDeclaration::function_kind_enum  function_kind  ) 

std::string SgAsmFunctionDeclaration::get_name_md5 (  )  const

void SgAsmFunctionDeclaration::set_name_md5 ( std::string  name_md5  ) 

const SgAsmStatementPtrList& SgAsmFunctionDeclaration::get_statementList (  )  const

SgAsmStatementPtrList& SgAsmFunctionDeclaration::get_statementList (  ) 

SgAsmStatementPtrList SgAsmFunctionDeclaration::get_dest (  )  const

void SgAsmFunctionDeclaration::set_dest ( SgAsmStatementPtrList  dest  ) 

rose_addr_t SgAsmFunctionDeclaration::get_entry_va (  )  const

void SgAsmFunctionDeclaration::set_entry_va ( rose_addr_t  entry_va  ) 

SgSymbolTable* SgAsmFunctionDeclaration::get_symbol_table (  )  const

void SgAsmFunctionDeclaration::set_symbol_table ( SgSymbolTable symbol_table  ) 

size_t SgAsmFunctionDeclaration::get_cached_vertex (  )  const

void SgAsmFunctionDeclaration::set_cached_vertex ( size_t  cached_vertex  ) 


Friends And Related Function Documentation

friend class AST_FILE_IO [friend]

Reimplemented from SgAsmDeclaration.

friend class SgAsmFunctionDeclarationStorageClass [friend]

friend class AstSpecificDataManagingClass [friend]

Reimplemented from SgAsmDeclaration.

friend class AstSpecificDataManagingClassStorageClass [friend]

Reimplemented from SgAsmDeclaration.

SgAsmFunctionDeclaration* isSgAsmFunctionDeclaration ( SgNode s  )  [friend]

Casts pointer from base class to derived class.

const SgAsmFunctionDeclaration* isSgAsmFunctionDeclaration ( const SgNode s  )  [friend]

Casts pointer from base class to derived class (for const pointers).

SgAsmFunctionDeclaration* SgAsmFunctionDeclaration_getPointerFromGlobalIndex ( unsigned long  globalIndex  )  [friend]

Constructor for use by AST File I/O MechanismTypedef used for low level memory access. Typedef used to hold memory addresses as values. Methods to find the pointer to a global and local index.

unsigned long SgAsmFunctionDeclaration_getNumberOfValidNodesAndSetGlobalIndexInFreepointer ( unsigned  long  )  [friend]

Get the size of the memory pool.

It actually returns the size of the whole blocks allocated, no matter they contain valid pointers or not.

void SgAsmFunctionDeclaration_clearMemoryPool (  )  [friend]

void SgAsmFunctionDeclaration_extendMemoryPoolForFileIO ( unsigned  long  )  [friend]

void SgAsmFunctionDeclaration_getNextValidPointer ( std::pair< SgAsmFunctionDeclaration *, std::vector< unsigned char * >::const_iterator > &   )  [friend]

void SgAsmFunctionDeclaration_resetValidFreepointers (  )  [friend]


Member Data Documentation

std::string SgAsmFunctionDeclaration::p_name [protected]

unsigned SgAsmFunctionDeclaration::p_reason [protected]

SgAsmFunctionDeclaration::function_kind_enum SgAsmFunctionDeclaration::p_function_kind [protected]

std::string SgAsmFunctionDeclaration::p_name_md5 [protected]

SgAsmStatementPtrList SgAsmFunctionDeclaration::p_statementList [protected]

SgAsmStatementPtrList SgAsmFunctionDeclaration::p_dest [protected]

rose_addr_t SgAsmFunctionDeclaration::p_entry_va [protected]

SgSymbolTable* SgAsmFunctionDeclaration::p_symbol_table [protected]

size_t SgAsmFunctionDeclaration::p_cached_vertex [protected]


The documentation for this class was generated from the following files:
Generated on Sun Oct 2 19:07:05 2011 for ROSE by  doxygen 1.4.7