AsmToSourceMapper Class Reference

Creates Annotation with mapping: Source AST <-> Binary AST using dwarf information. More...

#include <AsmToSourceMapper.h>

List of all members.

Public Member Functions

 AsmToSourceMapper (SgBinaryFile *file)
void annotate (SgSourceFile *file)

Private Member Functions

void addFile ()
void annotate (SgNode *node, const std::string &srcId, const std::string &binId)
template<typename NodeLink>
void addAttribute (SgNode *node, const std::string &id, SgNode *start, SgNode *end)

Private Attributes

std::multiset< AsmMappingInfoasmMappingInfos
SgBinaryFile * file


Detailed Description

Creates Annotation with mapping: Source AST <-> Binary AST using dwarf information.

Usage:
Create a new AsmToSourceMapper object for every binary file, and add the sourcefile via addFile(). This class uses dwarf information which is included in the binary if it was compiled with the -g option. The annotation is stored in the AST as annotation objects i.e. AstBinaryNodeLink / AstSourceNodeLink

Definition at line 175 of file AsmToSourceMapper.h.


Constructor & Destructor Documentation

AsmToSourceMapper::AsmToSourceMapper ( SgBinaryFile *  file  ) 

Constructor, extracts the dwarf information from the binary and stores them in

Definition at line 42 of file AsmToSourceMapper.cpp.

Here is the call graph for this function:


Member Function Documentation

template<typename NodeLink>
void AsmToSourceMapper::addAttribute ( SgNode *  node,
const std::string &  id,
SgNode *  start,
SgNode *  end 
) [private]

Definition at line 398 of file AsmToSourceMapper.cpp.

void AsmToSourceMapper::addFile (  )  [private]

Definition at line 48 of file AsmToSourceMapper.cpp.

Referenced by AsmToSourceMapper().

Here is the caller graph for this function:

void AsmToSourceMapper::annotate ( SgNode *  node,
const std::string &  srcId,
const std::string &  binId 
) [private]

Definition at line 195 of file AsmToSourceMapper.cpp.

Here is the call graph for this function:

void AsmToSourceMapper::annotate ( SgSourceFile *  file  ) 

This function annotates the Source and the binary AST with the mapping information

Definition at line 168 of file AsmToSourceMapper.cpp.

Referenced by annotate(), annotateFiles(), and SrcBinView::dropEvent().

Here is the caller graph for this function:


Member Data Documentation

std::multiset<AsmMappingInfo> AsmToSourceMapper::asmMappingInfos [private]

holds mapping data order by fileId and line number. needs to be a multiset because every source file line could correspond to more than one dwarf line information

Definition at line 194 of file AsmToSourceMapper.h.

Referenced by addFile(), and annotate().

SgBinaryFile* AsmToSourceMapper::file [private]

Definition at line 196 of file AsmToSourceMapper.h.

Referenced by addFile(), and annotate().


The documentation for this class was generated from the following files:
Generated on Tue Sep 15 14:48:48 2009 for RoseQtWidgets by  doxygen 1.4.7