Prog Class Reference

#include <include/prog.h>

List of all members.


Detailed Description

Definition at line 66 of file prog.h.

Public Member Functions

void addDecodedRtl (ADDRESS a, RTL *rtl)
ExpaddReloc (Exp *e, ADDRESS lc)
void clear ()
bool clusterUsed (Cluster *c)
void conTypeAnalysis ()
bool createDotFile (const char *, bool bMainOnly=false) const
void decodeEntryPoint (ADDRESS a)
void decodeEverythingUndecoded ()
void decodeFragment (UserProc *proc, ADDRESS a)
void decompile ()
void decompileProcs ()
void dfaTypeAnalysis ()
void dumpGlobals ()
ClusterfindCluster (const char *name)
ProcfindContainingProc (ADDRESS uAddr) const
ProcfindProc (const char *name) const
ProcfindProc (ADDRESS uAddr) const
void finishDecode ()
void fromSSAform ()
void generateCode (Cluster *cluster=NULL, UserProc *proc=NULL, bool intermixRTL=false)
void generateCode (std::ostream &os)
void generateDotFile ()
void generateRTL (Cluster *cluster=NULL, UserProc *proc=NULL)
const void * getCodeInfo (ADDRESS uAddr, const char *&last, int &delta)
ClustergetDefaultCluster (const char *name)
std::vector< Exp * > & getDefaultParams ()
std::vector< Exp * > & getDefaultReturns ()
SignaturegetDefaultSignature (const char *name)
const char * GetDynamicProcName (ADDRESS uNative)
ProcgetFirstProc (PROGMAP::const_iterator &it)
UserProcgetFirstUserProc (std::list< Proc * >::iterator &it)
double getFloatConstant (ADDRESS uaddr, bool &ok, int bits=64)
platform getFrontEndId ()
GlobalgetGlobal (char *nam)
ADDRESS getGlobalAddr (char *nam)
const char * getGlobalName (ADDRESS uaddr)
TypegetGlobalType (char *nam)
ADDRESS getImageBase ()
unsigned getImageSize ()
LibProcgetLibraryProc (const char *nam)
SignaturegetLibSignature (const char *name)
ADDRESS getLimitTextHigh ()
ADDRESS getLimitTextLow ()
MACHINE getMachine ()
char * getName ()
std::string getNameNoPath () const
std::string getNameNoPathNoExt () const
ProcgetNextProc (PROGMAP::const_iterator &it)
UserProcgetNextUserProc (std::list< Proc * >::iterator &it)
int getNumProcs ()
int getNumUserProcs ()
const char * getPath ()
const char * getPathAndName ()
ProcgetProc (int i) const
const char * getRegName (int idx)
int getRegSize (int idx)
ClustergetRootCluster ()
PSectionInfo getSectionInfoByAddr (ADDRESS a)
StatementgetStmtAtLex (Cluster *cluster, unsigned int begin, unsigned int end)
char * getStringConstant (ADDRESS uaddr, bool knownString=false)
std::map< ADDRESS, std::string > & getSymbols ()
int getTextDelta ()
void globalTypeAnalysis ()
bool globalUsed (ADDRESS uaddr, Type *knownType=NULL)
TypeguessGlobalType (const char *nam, ADDRESS u)
bool isDynamicLinkedProcPointer (ADDRESS dest)
bool isProcLabel (ADDRESS addr)
bool isReadOnly (ADDRESS a)
bool isWin32 ()
ArrayTypemakeArrayType (ADDRESS u, Type *t)
const char * newGlobalName (ADDRESS uaddr)
ProcnewProc (const char *name, ADDRESS uNative, bool bLib=false)
void print (std::ostream &out)
void printCallGraph ()
void printCallGraphXML ()
void printSymbolsToFile ()
void processConstants ()
bool processProc (int addr, UserProc *proc)
 Prog (const char *name)
 Prog ()
void rangeAnalysis ()
int readNative1 (ADDRESS a)
int readNative2 (ADDRESS a)
int readNative4 (ADDRESS a)
QWord readNative8 (ADDRESS a)
ExpreadNativeAs (ADDRESS uaddr, Type *type)
float readNativeFloat4 (ADDRESS a)
double readNativeFloat8 (ADDRESS a)
void readSymbolFile (const char *fname)
void recoverReturnLocs ()
void reDecode (UserProc *proc)
void removeInterprocEdges ()
void removeNullStmts ()
void removeProc (const char *name)
void removeRestoreStmts (StatementSet &rs)
void removeUnusedGlobals ()
void removeUnusedLocals ()
bool removeUnusedReturns ()
 Remove unused return locations.
void removeUnusedStmts ()
void remProc (UserProc *proc)
void rereadLibSignatures ()
void setEntryPoint (ADDRESS a)
void setFrontEnd (FrontEnd *fe)
void setGlobalType (const char *name, Type *ty)
void setName (const char *name)
ProcsetNewProc (ADDRESS uNative)
const char * symbolByAddress (ADDRESS dest)
bool wellForm ()
virtual ~Prog ()

Public Attributes

bool bRegisterCall
bool bRegisterJump
std::list< UserProc * > entryProcs

Protected Attributes

DataIntervalMap globalMap
std::set< Global * > globals
int m_iNumberedProc
std::string m_name
std::string m_path
PROGMAP m_procLabels
std::list< Proc * > m_procs
Clusterm_rootCluster
BinaryFilepBF
FrontEndpFE

Friends

class XMLProgParser


Constructor & Destructor Documentation

Prog::Prog  ) 
 

Definition at line 85 of file prog.cpp.

Prog::~Prog  )  [virtual]
 

Definition at line 112 of file prog.cpp.

References m_procs, pBF, and pFE.

Prog::Prog const char *  name  ) 
 

Definition at line 102 of file prog.cpp.

References m_name, and m_path.


Member Function Documentation

void Prog::addDecodedRtl ADDRESS  a,
RTL rtl
[inline]
 

Definition at line 281 of file prog.h.

References FrontEnd::addDecodedRtl(), and pFE.

Referenced by UserProc::processDecodedICTs().

Exp * Prog::addReloc Exp e,
ADDRESS  lc
 

Definition at line 2047 of file prog.cpp.

References getGlobal(), BinaryFile::GetSizeByName(), BinaryFile::getSymbols(), Location::global(), globals, Exp::isConst(), BinaryFile::IsRelocationAt(), NULL, opAddrOf, and pBF.

Referenced by PentiumDecoder::addReloc().

void Prog::clear  ) 
 

Definition at line 460 of file prog.cpp.

References m_name, m_procLabels, m_procs, NULL, pBF, and pFE.

bool Prog::clusterUsed Cluster c  ) 
 

Definition at line 395 of file prog.cpp.

References m_procs.

void Prog::conTypeAnalysis  ) 
 

Definition at line 1446 of file prog.cpp.

References DEBUG_TA, Proc::isLib(), LOG, and m_procs.

bool Prog::createDotFile const char *  ,
bool  bMainOnly = false
const
 

void Prog::decodeEntryPoint ADDRESS  a  ) 
 

Definition at line 1234 of file prog.cpp.

References FrontEnd::decode(), findProc(), finishDecode(), BinaryFile::getLimitTextHigh(), getLimitTextLow(), Proc::isLib(), LOG, NULL, pBF, pFE, and VERBOSE.

Referenced by Decompiler::decode().

void Prog::decodeEverythingUndecoded  ) 
 

Definition at line 1259 of file prog.cpp.

References FrontEnd::decode(), Proc::getNativeAddress(), UserProc::isDecoded(), Proc::isLib(), m_procs, NULL, and pFE.

void Prog::decodeFragment UserProc proc,
ADDRESS  a
 

Definition at line 2036 of file prog.cpp.

References FrontEnd::decodeFragment(), BinaryFile::getLimitTextHigh(), BinaryFile::getLimitTextLow(), LOG, pBF, and pFE.

void Prog::decompile  ) 
 

Definition at line 1271 of file prog.cpp.

References entryProcs, LOG, m_procs, and VERBOSE.

Referenced by Decompiler::decompile(), Boomerang::decompile(), Boomerang::parseCmd(), and StatementTest::testRecursion().

void Prog::decompileProcs  ) 
 

void Prog::dfaTypeAnalysis  ) 
 

void Prog::dumpGlobals  ) 
 

Definition at line 880 of file prog.cpp.

References globals.

Cluster* Prog::findCluster const char *  name  )  [inline]
 

Definition at line 276 of file prog.h.

References Cluster::find(), and m_rootCluster.

Referenced by Decompiler::getClusterFile(), and getDefaultCluster().

Proc * Prog::findContainingProc ADDRESS  uAddr  )  const
 

Definition at line 1082 of file prog.cpp.

References UserProc::containsAddr(), Proc::getNativeAddress(), Proc::isLib(), and m_procs.

Proc * Prog::findProc const char *  name  )  const
 

Definition at line 808 of file prog.cpp.

References m_procs, and NULL.

Proc * Prog::findProc ADDRESS  uAddr  )  const
 

Definition at line 799 of file prog.cpp.

References m_procLabels, and NULL.

Referenced by UserProc::assignProcsToCalls(), FrontEnd::decode(), decodeEntryPoint(), Proc::getFirstCaller(), getLibraryProc(), Decompiler::getRtlForProc(), Decompiler::getSigFile(), SparcFrontEnd::handleCall(), Boomerang::parseCmd(), FrontEnd::processProc(), Decompiler::renameProc(), setEntryPoint(), setNewProc(), and StatementTest::testBypass().

void Prog::finishDecode  ) 
 

Definition at line 145 of file prog.cpp.

References UserProc::assignProcsToCalls(), UserProc::finalSimplify(), UserProc::isDecoded(), and m_procs.

Referenced by decodeEntryPoint(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), and CfgTest::testRenameVars().

void Prog::fromSSAform  ) 
 

Definition at line 1425 of file prog.cpp.

References Boomerang::get(), Proc::getName(), Proc::isLib(), LOG, and m_procs.

void Prog::generateCode Cluster cluster = NULL,
UserProc proc = NULL,
bool  intermixRTL = false
 

Definition at line 181 of file prog.cpp.

References HLLCode::AddGlobal(), Cluster::closeStreams(), Boomerang::get(), getFrontEndId(), Boomerang::getHLLCode(), Cluster::getOutPath(), BinaryFile::GetSectionInfoByName(), globals, m_rootCluster, Cluster::makeDirs(), NULL, Cluster::openStream(), opList, opNil, pBF, PLAT_PENTIUM, BinaryFile::readNative1(), SectionInfo::uNativeAddr, and SectionInfo::uSectionSize.

void Prog::generateCode std::ostream &  os  ) 
 

Definition at line 422 of file prog.cpp.

References HLLCode::AddGlobal(), Boomerang::get(), Boomerang::getHLLCode(), globals, and NULL.

Referenced by Decompiler::generateCode().

void Prog::generateDotFile  ) 
 

Definition at line 160 of file prog.cpp.

References Cfg::generateDotFile(), Boomerang::get(), UserProc::getCFG(), Proc::getName(), UserProc::isDecoded(), and m_procs.

Referenced by Boomerang::decompile().

void Prog::generateRTL Cluster cluster = NULL,
UserProc proc = NULL
 

Definition at line 274 of file prog.cpp.

References Proc::getCluster(), Cluster::getStream(), UserProc::isDecoded(), m_procs, NULL, Cluster::openStream(), and UserProc::print().

const void * Prog::getCodeInfo ADDRESS  uAddr,
const char *&  last,
int &  delta
 

Definition at line 1209 of file prog.cpp.

References BinaryFile::GetNumSections(), BinaryFile::GetSectionInfo(), NULL, pBF, and SectionInfo::uHostAddr.

Cluster * Prog::getDefaultCluster const char *  name  ) 
 

Definition at line 403 of file prog.cpp.

References Cluster::addChild(), findCluster(), BinaryFile::getFilenameSymbolFor(), LOG, m_rootCluster, NULL, and pBF.

Referenced by Proc::Proc().

std::vector< Exp * > & Prog::getDefaultParams  ) 
 

Definition at line 851 of file prog.cpp.

References FrontEnd::getDefaultParams(), and pFE.

std::vector< Exp * > & Prog::getDefaultReturns  ) 
 

Definition at line 856 of file prog.cpp.

References FrontEnd::getDefaultReturns(), and pFE.

Signature * Prog::getDefaultSignature const char *  name  ) 
 

Definition at line 846 of file prog.cpp.

References FrontEnd::getDefaultSignature(), and pFE.

const char* Prog::GetDynamicProcName ADDRESS  uNative  )  [inline]
 

Definition at line 257 of file prog.h.

References BinaryFile::GetDynamicProcName(), and pBF.

Proc * Prog::getFirstProc PROGMAP::const_iterator &  it  ) 
 

Definition at line 1141 of file prog.cpp.

References m_procLabels.

Referenced by Boomerang::decompile().

UserProc * Prog::getFirstUserProc std::list< Proc * >::iterator &  it  ) 
 

Definition at line 1173 of file prog.cpp.

References m_procs.

Referenced by Decompiler::generateCode().

double Prog::getFloatConstant ADDRESS  uaddr,
bool &  ok,
int  bits = 64
 

Definition at line 1061 of file prog.cpp.

References SectionInfo::bReadOnly, BinaryFile::GetSectionInfoByAddr(), pBF, BinaryFile::readNativeFloat4(), and BinaryFile::readNativeFloat8().

Referenced by UserProc::processFloatConstants().

platform Prog::getFrontEndId  ) 
 

Definition at line 842 of file prog.cpp.

References FrontEnd::getFrontEndId(), and pFE.

Referenced by CHLLCode::AddAssignmentStatement(), generateCode(), CallingConvention::StdC::PPCSignature::qualified(), CallingConvention::StdC::SparcSignature::qualified(), CallingConvention::StdC::ST20Signature::qualified(), CallingConvention::StdC::PentiumSignature::qualified(), and CallingConvention::Win32Signature::qualified().

Global * Prog::getGlobal char *  nam  ) 
 

Definition at line 896 of file prog.cpp.

References globals.

Referenced by addReloc().

ADDRESS Prog::getGlobalAddr char *  nam  ) 
 

Definition at line 887 of file prog.cpp.

References globals.

Referenced by findSwParams(), ConstGlobalConverter::preVisit(), and FrontEnd::processProc().

const char * Prog::getGlobalName ADDRESS  uaddr  ) 
 

Definition at line 865 of file prog.cpp.

References globals.

Referenced by newGlobalName(), and readNativeAs().

Type * Prog::getGlobalType char *  nam  ) 
 

Definition at line 1014 of file prog.cpp.

References globals, and NULL.

ADDRESS Prog::getImageBase  )  [inline]
 

Definition at line 264 of file prog.h.

References BinaryFile::getImageBase(), and pBF.

unsigned Prog::getImageSize  )  [inline]
 

Definition at line 263 of file prog.h.

References BinaryFile::getImageSize(), and pBF.

LibProc * Prog::getLibraryProc const char *  nam  ) 
 

Definition at line 817 of file prog.cpp.

References findProc(), Proc::isLib(), newProc(), and NO_ADDRESS.

Referenced by PentiumFrontEnd::decodeInstruction(), and CallStatement::rangeAnalysis().

Signature * Prog::getLibSignature const char *  name  ) 
 

Definition at line 824 of file prog.cpp.

References FrontEnd::getLibSignature(), and pFE.

Referenced by LibProc::LibProc(), and rereadLibSignatures().

ADDRESS Prog::getLimitTextHigh  )  [inline]
 

Definition at line 244 of file prog.h.

References BinaryFile::getLimitTextHigh(), and pBF.

ADDRESS Prog::getLimitTextLow  )  [inline]
 

Definition at line 243 of file prog.h.

References BinaryFile::getLimitTextLow(), and pBF.

Referenced by decodeEntryPoint().

MACHINE Prog::getMachine  )  [inline]
 

Definition at line 237 of file prog.h.

References BinaryFile::GetMachine(), and pBF.

Referenced by Signature::getEarlyParamExp(), Signature::getFirstArgLoc(), Signature::getStdRetStmt(), Decompiler::load(), and Signature::setABIdefines().

char * Prog::getName  ) 
 

Definition at line 127 of file prog.cpp.

References m_name.

Referenced by XMLProgParser::persistToXML(), printCallGraph(), printCallGraphXML(), and ProgTest::testName().

std::string Prog::getNameNoPath  )  const
 

Definition at line 1115 of file prog.cpp.

References m_name.

Referenced by getNameNoPathNoExt().

std::string Prog::getNameNoPathNoExt  )  const
 

Definition at line 1126 of file prog.cpp.

References getNameNoPath().

Referenced by setFrontEnd().

Proc * Prog::getNextProc PROGMAP::const_iterator &  it  ) 
 

Definition at line 1157 of file prog.cpp.

References m_procLabels.

Referenced by Boomerang::decompile().

UserProc * Prog::getNextUserProc std::list< Proc * >::iterator &  it  ) 
 

Definition at line 1190 of file prog.cpp.

References m_procs.

Referenced by Decompiler::generateCode().

int Prog::getNumProcs  ) 
 

Definition at line 762 of file prog.cpp.

References m_procs.

int Prog::getNumUserProcs  ) 
 

Definition at line 766 of file prog.cpp.

References m_procs.

const char* Prog::getPath  )  [inline]
 

Definition at line 79 of file prog.h.

References m_path.

Referenced by XMLProgParser::persistToXML().

const char* Prog::getPathAndName  )  [inline]
 

Definition at line 80 of file prog.h.

References m_name, and m_path.

Proc * Prog::getProc int  i  )  const
 

Definition at line 780 of file prog.cpp.

References m_procs.

Referenced by CfgTest::testDominators(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), CfgTest::testRenameVars(), and CfgTest::testSemiDominators().

const char* Prog::getRegName int  idx  )  [inline]
 

Definition at line 116 of file prog.h.

References FrontEnd::getRegName(), and pFE.

Referenced by UserProc::getRegName().

int Prog::getRegSize int  idx  )  [inline]
 

Definition at line 117 of file prog.h.

References FrontEnd::getRegSize(), and pFE.

Cluster* Prog::getRootCluster  )  [inline]
 

Definition at line 275 of file prog.h.

References m_rootCluster.

Referenced by Decompiler::generateCode(), Boomerang::objcDecode(), XMLProgParser::parse(), and Proc::Proc().

PSectionInfo Prog::getSectionInfoByAddr ADDRESS  a  )  [inline]
 

Definition at line 241 of file prog.h.

References BinaryFile::GetSectionInfoByAddr(), and pBF.

Referenced by Global::getInitialValue(), and readNativeAs().

Statement * Prog::getStmtAtLex Cluster cluster,
unsigned int  begin,
unsigned int  end
 

Definition at line 291 of file prog.cpp.

References Proc::getCluster(), UserProc::getStmtAtLex(), UserProc::isDecoded(), m_procs, and NULL.

char * Prog::getStringConstant ADDRESS  uaddr,
bool  knownString = false
 

Definition at line 1033 of file prog.cpp.

References BinaryFile::GetSectionInfoByAddr(), SectionInfo::isAddressBss(), pBF, SectionInfo::uHostAddr, and SectionInfo::uNativeAddr.

Referenced by guessGlobalType(), and readNativeAs().

std::map< ADDRESS, std::string > & Prog::getSymbols  ) 
 

Definition at line 954 of file prog.cpp.

References BinaryFile::getSymbols(), and pBF.

int Prog::getTextDelta  )  [inline]
 

Definition at line 254 of file prog.h.

References BinaryFile::getTextDelta(), and pBF.

Referenced by PentiumDecoder::getDword().

void Prog::globalTypeAnalysis  ) 
 

Definition at line 1462 of file prog.cpp.

References DEBUG_TA, Proc::getName(), Proc::isLib(), LOG, and m_procs.

bool Prog::globalUsed ADDRESS  uaddr,
Type knownType = NULL
 

Definition at line 904 of file prog.cpp.

References globals.

Type * Prog::guessGlobalType const char *  nam,
ADDRESS  u
 

Definition at line 969 of file prog.cpp.

References BinaryFile::GetSizeByName(), getStringConstant(), and pBF.

bool Prog::isDynamicLinkedProcPointer ADDRESS  dest  )  [inline]
 

Definition at line 256 of file prog.h.

References BinaryFile::IsDynamicLinkedProcPointer(), and pBF.

bool Prog::isProcLabel ADDRESS  addr  ) 
 

Definition at line 1103 of file prog.cpp.

References m_procLabels.

bool Prog::isReadOnly ADDRESS  a  )  [inline]
 

Definition at line 245 of file prog.h.

References BinaryFile::isReadOnly(), and pBF.

bool Prog::isWin32  ) 
 

Definition at line 861 of file prog.cpp.

References FrontEnd::isWin32(), and pFE.

Referenced by newProc(), and CallingConvention::Win32Signature::qualified().

ArrayType * Prog::makeArrayType ADDRESS  u,
Type t
 

Definition at line 959 of file prog.cpp.

References Type::getSize(), BinaryFile::GetSizeByName(), newGlobalName(), and pBF.

Referenced by Unary::descendType().

const char * Prog::newGlobalName ADDRESS  uaddr  ) 
 

Definition at line 1001 of file prog.cpp.

References getGlobalName(), globals, LOG, NULL, and VERBOSE.

Referenced by makeArrayType().

Proc * Prog::newProc const char *  name,
ADDRESS  uNative,
bool  bLib = false
 

Definition at line 667 of file prog.cpp.

References Signature::addReturn(), CONV_C, Proc::getSignature(), Signature::instantiate(), Type::isVoid(), isWin32(), LOG, NULL, PLAT_PENTIUM, Signature::printToLog(), Location::regOf(), and Proc::setSignature().

Referenced by getLibraryProc(), Boomerang::objcDecode(), setNewProc(), StatementTest::testEmpty(), StatementTest::testEndlessLoop(), StatementTest::testFlow(), StatementTest::testKill(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), and StatementTest::testUseOverKill().

void Prog::print std::ostream &  out  ) 
 

Definition at line 447 of file prog.cpp.

References UserProc::isDecoded(), m_procs, and UserProc::print().

void Prog::printCallGraph  ) 
 

Definition at line 1491 of file prog.cpp.

References entryProcs, Boomerang::get(), UserProc::getCallees(), getName(), Proc::getName(), Proc::getNativeAddress(), Boomerang::getOutputPath(), Proc::isLib(), lockFileWrite(), and NO_ADDRESS.

void Prog::printCallGraphXML  ) 
 

Definition at line 1594 of file prog.cpp.

References entryProcs, Boomerang::get(), getName(), Boomerang::getOutputPath(), lockFileWrite(), and m_procs.

Referenced by UserProc::printXML().

void Prog::printSymbolsToFile  ) 
 

Definition at line 1569 of file prog.cpp.

References entryProcs, Boomerang::get(), Boomerang::getOutputPath(), lockFileWrite(), m_procs, and printProcsRecursive().

void Prog::processConstants  ) 
 

bool Prog::processProc int  addr,
UserProc proc
[inline]
 

Definition at line 259 of file prog.h.

References pFE, and FrontEnd::processProc().

void Prog::rangeAnalysis  ) 
 

Definition at line 1479 of file prog.cpp.

References Proc::isLib(), and m_procs.

int Prog::readNative1 ADDRESS  a  )  [inline]
 

Definition at line 247 of file prog.h.

References pBF, and BinaryFile::readNative1().

int Prog::readNative2 ADDRESS  a  )  [inline]
 

Definition at line 248 of file prog.h.

References pBF, and BinaryFile::readNative2().

int Prog::readNative4 ADDRESS  a  )  [inline]
 

Definition at line 249 of file prog.h.

References pBF, and BinaryFile::readNative4().

Referenced by ConstGlobalConverter::preVisit(), BasicBlock::processSwitch(), and readNativeAs().

QWord Prog::readNative8 ADDRESS  a  )  [inline]
 

Definition at line 252 of file prog.h.

References pBF, and BinaryFile::readNative8().

Exp * Prog::readNativeAs ADDRESS  uaddr,
Type type
 

Definition at line 1688 of file prog.cpp.

References Type::asPointer(), getGlobalName(), PointerType::getPointsTo(), getSectionInfoByAddr(), getStringConstant(), Location::global(), NULL, readNative4(), Type::resolvesToChar(), and Type::resolvesToPointer().

Referenced by Global::getInitialValue().

float Prog::readNativeFloat4 ADDRESS  a  )  [inline]
 

Definition at line 250 of file prog.h.

References pBF, and BinaryFile::readNativeFloat4().

double Prog::readNativeFloat8 ADDRESS  a  )  [inline]
 

Definition at line 251 of file prog.h.

References pBF, and BinaryFile::readNativeFloat8().

void Prog::readSymbolFile const char *  fname  ) 
 

Definition at line 1619 of file prog.cpp.

References LOG.

void Prog::recoverReturnLocs  ) 
 

void Prog::reDecode UserProc proc  ) 
 

Definition at line 1802 of file prog.cpp.

References Proc::getNativeAddress(), pFE, and FrontEnd::processProc().

Referenced by UserProc::decompile().

void Prog::removeInterprocEdges  ) 
 

void Prog::removeNullStmts  ) 
 

void Prog::removeProc const char *  name  ) 
 

Definition at line 746 of file prog.cpp.

References Boomerang::alert_remove(), Boomerang::get(), and m_procs.

Referenced by PentiumFrontEnd::helperFunc().

void Prog::removeRestoreStmts StatementSet rs  ) 
 

void Prog::removeUnusedGlobals  ) 
 

Definition at line 1340 of file prog.cpp.

References StatementList::begin(), DEBUG_UNUSED, StatementList::end(), UserProc::getStatements(), LOG, m_procs, opGlobal, and opWild.

void Prog::removeUnusedLocals  ) 
 

bool Prog::removeUnusedReturns  ) 
 

Remove unused return locations.

Returns:
true if any returns are removed

Definition at line 1396 of file prog.cpp.

References Proc::isLib(), and m_procs.

void Prog::removeUnusedStmts  ) 
 

void Prog::remProc UserProc proc  ) 
 

Definition at line 728 of file prog.cpp.

References UserProc::deleteCFG(), Proc::getNativeAddress(), m_procLabels, and m_procs.

void Prog::rereadLibSignatures  ) 
 

Definition at line 828 of file prog.cpp.

References Boomerang::alert_update_signature(), Boomerang::get(), getLibSignature(), m_procs, pFE, and FrontEnd::readLibraryCatalog().

Referenced by Decompiler::rereadLibSignatures().

void Prog::setEntryPoint ADDRESS  a  ) 
 

Definition at line 1253 of file prog.cpp.

References entryProcs, findProc(), Proc::isLib(), and NULL.

Referenced by FrontEnd::decode().

void Prog::setFrontEnd FrontEnd fe  ) 
 

Definition at line 93 of file prog.cpp.

References FrontEnd::getBinaryFile(), BinaryFile::getFilename(), getNameNoPathNoExt(), m_name, m_rootCluster, pBF, and pFE.

Referenced by Decompiler::load(), Boomerang::loadAndDecode(), StatementTest::testBypass(), CfgTest::testDominators(), StatementTest::testEmpty(), StatementTest::testEndlessLoop(), FrontPentTest::testFindMain(), StatementTest::testFlow(), StatementTest::testKill(), ProgTest::testName(), ProcTest::testName(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), StatementTest::testRecursion(), CfgTest::testRenameVars(), CfgTest::testSemiDominators(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), and StatementTest::testUseOverKill().

void Prog::setGlobalType const char *  name,
Type ty
 

Definition at line 1021 of file prog.cpp.

References globals.

void Prog::setName const char *  name  ) 
 

Definition at line 122 of file prog.cpp.

References m_name, m_rootCluster, and Cluster::setName().

Referenced by FrontEnd::decode(), and ProgTest::testName().

Proc * Prog::setNewProc ADDRESS  uNative  ) 
 

Definition at line 486 of file prog.cpp.

References findProc(), BinaryFile::IsDynamicLinkedProc(), BinaryFile::IsJumpToAnotherAddr(), BinaryFile::IsStaticLinkedLibProc(), LOG, m_iNumberedProc, newProc(), NO_ADDRESS, NULL, pBF, BinaryFile::SymbolByAddress(), and VERBOSE.

Referenced by SparcDecoder::decodeInstruction(), PPCDecoder::decodeInstruction(), PentiumDecoder::decodeInstruction(), FrontEnd::decodeOnly(), FrontEnd::getEntryPoints(), FrontEnd::processProc(), and CallStatement::rangeAnalysis().

const char* Prog::symbolByAddress ADDRESS  dest  )  [inline]
 

Definition at line 239 of file prog.h.

References pBF, and BinaryFile::SymbolByAddress().

bool Prog::wellForm  ) 
 

Definition at line 132 of file prog.cpp.

References m_procs.

Referenced by FrontEnd::decodeOnly().


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Definition at line 303 of file prog.h.


Member Data Documentation

bool Prog::bRegisterCall
 

Definition at line 269 of file prog.h.

bool Prog::bRegisterJump
 

Definition at line 268 of file prog.h.

std::list<UserProc*> Prog::entryProcs
 

Definition at line 107 of file prog.h.

Referenced by decompile(), printCallGraph(), printCallGraphXML(), printSymbolsToFile(), and setEntryPoint().

DataIntervalMap Prog::globalMap [protected]
 

Definition at line 299 of file prog.h.

std::set<Global*> Prog::globals [protected]
 

Definition at line 297 of file prog.h.

Referenced by addReloc(), dumpGlobals(), generateCode(), getGlobal(), getGlobalAddr(), getGlobalName(), getGlobalType(), globalUsed(), newGlobalName(), XMLProgParser::persistToXML(), and setGlobalType().

int Prog::m_iNumberedProc [protected]
 

Definition at line 300 of file prog.h.

Referenced by XMLProgParser::persistToXML(), and setNewProc().

std::string Prog::m_name [protected]
 

Definition at line 293 of file prog.h.

Referenced by clear(), getName(), getNameNoPath(), getPathAndName(), Prog(), setFrontEnd(), and setName().

std::string Prog::m_path [protected]
 

Definition at line 293 of file prog.h.

Referenced by getPath(), getPathAndName(), and Prog().

PROGMAP Prog::m_procLabels [protected]
 

Definition at line 295 of file prog.h.

Referenced by clear(), findProc(), getFirstProc(), getNextProc(), isProcLabel(), and remProc().

std::list<Proc*> Prog::m_procs [protected]
 

Definition at line 294 of file prog.h.

Referenced by clear(), clusterUsed(), conTypeAnalysis(), decodeEverythingUndecoded(), decompile(), findContainingProc(), findProc(), finishDecode(), fromSSAform(), generateDotFile(), generateRTL(), getFirstUserProc(), getNextUserProc(), getNumProcs(), getNumUserProcs(), getProc(), getStmtAtLex(), globalTypeAnalysis(), XMLProgParser::persistToXML(), print(), printCallGraphXML(), printSymbolsToFile(), rangeAnalysis(), removeProc(), removeUnusedGlobals(), removeUnusedReturns(), remProc(), rereadLibSignatures(), wellForm(), and ~Prog().

Cluster* Prog::m_rootCluster [protected]
 

Definition at line 301 of file prog.h.

Referenced by findCluster(), generateCode(), getDefaultCluster(), getRootCluster(), XMLProgParser::persistToXML(), setFrontEnd(), and setName().

BinaryFile* Prog::pBF [protected]
 

Definition at line 289 of file prog.h.

Referenced by addReloc(), clear(), decodeEntryPoint(), decodeFragment(), generateCode(), getCodeInfo(), getDefaultCluster(), GetDynamicProcName(), getFloatConstant(), getImageBase(), getImageSize(), getLimitTextHigh(), getLimitTextLow(), getMachine(), getSectionInfoByAddr(), getStringConstant(), getSymbols(), getTextDelta(), guessGlobalType(), isDynamicLinkedProcPointer(), isReadOnly(), makeArrayType(), readNative1(), readNative2(), readNative4(), readNative8(), readNativeFloat4(), readNativeFloat8(), setFrontEnd(), setNewProc(), symbolByAddress(), and ~Prog().

FrontEnd* Prog::pFE [protected]
 

Definition at line 290 of file prog.h.

Referenced by addDecodedRtl(), clear(), decodeEntryPoint(), decodeEverythingUndecoded(), decodeFragment(), getDefaultParams(), getDefaultReturns(), getDefaultSignature(), getFrontEndId(), getLibSignature(), getRegName(), getRegSize(), isWin32(), processProc(), reDecode(), rereadLibSignatures(), setFrontEnd(), and ~Prog().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:45 2006 for Boomerang by  doxygen 1.4.6