#include <include/prog.h>
Definition at line 66 of file prog.h.
Public Member Functions | |
void | addDecodedRtl (ADDRESS a, RTL *rtl) |
Exp * | addReloc (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 () |
Cluster * | findCluster (const char *name) |
Proc * | findContainingProc (ADDRESS uAddr) const |
Proc * | findProc (const char *name) const |
Proc * | findProc (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) |
Cluster * | getDefaultCluster (const char *name) |
std::vector< Exp * > & | getDefaultParams () |
std::vector< Exp * > & | getDefaultReturns () |
Signature * | getDefaultSignature (const char *name) |
const char * | GetDynamicProcName (ADDRESS uNative) |
Proc * | getFirstProc (PROGMAP::const_iterator &it) |
UserProc * | getFirstUserProc (std::list< Proc * >::iterator &it) |
double | getFloatConstant (ADDRESS uaddr, bool &ok, int bits=64) |
platform | getFrontEndId () |
Global * | getGlobal (char *nam) |
ADDRESS | getGlobalAddr (char *nam) |
const char * | getGlobalName (ADDRESS uaddr) |
Type * | getGlobalType (char *nam) |
ADDRESS | getImageBase () |
unsigned | getImageSize () |
LibProc * | getLibraryProc (const char *nam) |
Signature * | getLibSignature (const char *name) |
ADDRESS | getLimitTextHigh () |
ADDRESS | getLimitTextLow () |
MACHINE | getMachine () |
char * | getName () |
std::string | getNameNoPath () const |
std::string | getNameNoPathNoExt () const |
Proc * | getNextProc (PROGMAP::const_iterator &it) |
UserProc * | getNextUserProc (std::list< Proc * >::iterator &it) |
int | getNumProcs () |
int | getNumUserProcs () |
const char * | getPath () |
const char * | getPathAndName () |
Proc * | getProc (int i) const |
const char * | getRegName (int idx) |
int | getRegSize (int idx) |
Cluster * | getRootCluster () |
PSectionInfo | getSectionInfoByAddr (ADDRESS a) |
Statement * | getStmtAtLex (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) |
Type * | guessGlobalType (const char *nam, ADDRESS u) |
bool | isDynamicLinkedProcPointer (ADDRESS dest) |
bool | isProcLabel (ADDRESS addr) |
bool | isReadOnly (ADDRESS a) |
bool | isWin32 () |
ArrayType * | makeArrayType (ADDRESS u, Type *t) |
const char * | newGlobalName (ADDRESS uaddr) |
Proc * | newProc (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) |
Exp * | readNativeAs (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) |
Proc * | setNewProc (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 |
Cluster * | m_rootCluster |
BinaryFile * | pBF |
FrontEnd * | pFE |
Friends | |
class | XMLProgParser |
|
|
|
|
|
|
|
Definition at line 281 of file prog.h. References FrontEnd::addDecodedRtl(), and pFE. Referenced by UserProc::processDecodedICTs(). |
|
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(). |
|
Definition at line 460 of file prog.cpp. References m_name, m_procLabels, m_procs, NULL, pBF, and pFE. |
|
Definition at line 395 of file prog.cpp. References m_procs. |
|
Definition at line 1446 of file prog.cpp. References DEBUG_TA, Proc::isLib(), LOG, and m_procs. |
|
|
|
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(). |
|
Definition at line 1259 of file prog.cpp. References FrontEnd::decode(), Proc::getNativeAddress(), UserProc::isDecoded(), Proc::isLib(), m_procs, NULL, and pFE. |
|
Definition at line 2036 of file prog.cpp. References FrontEnd::decodeFragment(), BinaryFile::getLimitTextHigh(), BinaryFile::getLimitTextLow(), LOG, pBF, and pFE. |
|
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(). |
|
|
|
|
|
Definition at line 880 of file prog.cpp. References globals. |
|
Definition at line 276 of file prog.h. References Cluster::find(), and m_rootCluster. Referenced by Decompiler::getClusterFile(), and getDefaultCluster(). |
|
Definition at line 1082 of file prog.cpp. References UserProc::containsAddr(), Proc::getNativeAddress(), Proc::isLib(), and m_procs. |
|
|
|
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(). |
|
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(). |
|
Definition at line 1425 of file prog.cpp. References Boomerang::get(), Proc::getName(), Proc::isLib(), LOG, and m_procs. |
|
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. |
|
Definition at line 422 of file prog.cpp. References HLLCode::AddGlobal(), Boomerang::get(), Boomerang::getHLLCode(), globals, and NULL. Referenced by Decompiler::generateCode(). |
|
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(). |
|
Definition at line 274 of file prog.cpp. References Proc::getCluster(), Cluster::getStream(), UserProc::isDecoded(), m_procs, NULL, Cluster::openStream(), and UserProc::print(). |
|
Definition at line 1209 of file prog.cpp. References BinaryFile::GetNumSections(), BinaryFile::GetSectionInfo(), NULL, pBF, and SectionInfo::uHostAddr. |
|
Definition at line 403 of file prog.cpp. References Cluster::addChild(), findCluster(), BinaryFile::getFilenameSymbolFor(), LOG, m_rootCluster, NULL, and pBF. Referenced by Proc::Proc(). |
|
Definition at line 851 of file prog.cpp. References FrontEnd::getDefaultParams(), and pFE. |
|
Definition at line 856 of file prog.cpp. References FrontEnd::getDefaultReturns(), and pFE. |
|
Definition at line 846 of file prog.cpp. References FrontEnd::getDefaultSignature(), and pFE. |
|
Definition at line 257 of file prog.h. References BinaryFile::GetDynamicProcName(), and pBF. |
|
Definition at line 1141 of file prog.cpp. References m_procLabels. Referenced by Boomerang::decompile(). |
|
Definition at line 1173 of file prog.cpp. References m_procs. Referenced by Decompiler::generateCode(). |
|
Definition at line 1061 of file prog.cpp. References SectionInfo::bReadOnly, BinaryFile::GetSectionInfoByAddr(), pBF, BinaryFile::readNativeFloat4(), and BinaryFile::readNativeFloat8(). Referenced by UserProc::processFloatConstants(). |
|
|
Definition at line 896 of file prog.cpp. References globals. Referenced by addReloc(). |
|
Definition at line 887 of file prog.cpp. References globals. Referenced by findSwParams(), ConstGlobalConverter::preVisit(), and FrontEnd::processProc(). |
|
Definition at line 865 of file prog.cpp. References globals. Referenced by newGlobalName(), and readNativeAs(). |
|
|
|
Definition at line 264 of file prog.h. References BinaryFile::getImageBase(), and pBF. |
|
Definition at line 263 of file prog.h. References BinaryFile::getImageSize(), and pBF. |
|
Definition at line 817 of file prog.cpp. References findProc(), Proc::isLib(), newProc(), and NO_ADDRESS. Referenced by PentiumFrontEnd::decodeInstruction(), and CallStatement::rangeAnalysis(). |
|
Definition at line 824 of file prog.cpp. References FrontEnd::getLibSignature(), and pFE. Referenced by LibProc::LibProc(), and rereadLibSignatures(). |
|
Definition at line 244 of file prog.h. References BinaryFile::getLimitTextHigh(), and pBF. |
|
Definition at line 243 of file prog.h. References BinaryFile::getLimitTextLow(), and pBF. Referenced by decodeEntryPoint(). |
|
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(). |
|
Definition at line 127 of file prog.cpp. References m_name. Referenced by XMLProgParser::persistToXML(), printCallGraph(), printCallGraphXML(), and ProgTest::testName(). |
|
Definition at line 1115 of file prog.cpp. References m_name. Referenced by getNameNoPathNoExt(). |
|
Definition at line 1126 of file prog.cpp. References getNameNoPath(). Referenced by setFrontEnd(). |
|
Definition at line 1157 of file prog.cpp. References m_procLabels. Referenced by Boomerang::decompile(). |
|
Definition at line 1190 of file prog.cpp. References m_procs. Referenced by Decompiler::generateCode(). |
|
Definition at line 762 of file prog.cpp. References m_procs. |
|
Definition at line 766 of file prog.cpp. References m_procs. |
|
Definition at line 79 of file prog.h. References m_path. Referenced by XMLProgParser::persistToXML(). |
|
|
|
Definition at line 780 of file prog.cpp. References m_procs. Referenced by CfgTest::testDominators(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), CfgTest::testRenameVars(), and CfgTest::testSemiDominators(). |
|
Definition at line 116 of file prog.h. References FrontEnd::getRegName(), and pFE. Referenced by UserProc::getRegName(). |
|
Definition at line 117 of file prog.h. References FrontEnd::getRegSize(), and pFE. |
|
Definition at line 275 of file prog.h. References m_rootCluster. Referenced by Decompiler::generateCode(), Boomerang::objcDecode(), XMLProgParser::parse(), and Proc::Proc(). |
|
Definition at line 241 of file prog.h. References BinaryFile::GetSectionInfoByAddr(), and pBF. Referenced by Global::getInitialValue(), and readNativeAs(). |
|
Definition at line 291 of file prog.cpp. References Proc::getCluster(), UserProc::getStmtAtLex(), UserProc::isDecoded(), m_procs, and NULL. |
|
Definition at line 1033 of file prog.cpp. References BinaryFile::GetSectionInfoByAddr(), SectionInfo::isAddressBss(), pBF, SectionInfo::uHostAddr, and SectionInfo::uNativeAddr. Referenced by guessGlobalType(), and readNativeAs(). |
|
Definition at line 954 of file prog.cpp. References BinaryFile::getSymbols(), and pBF. |
|
Definition at line 254 of file prog.h. References BinaryFile::getTextDelta(), and pBF. Referenced by PentiumDecoder::getDword(). |
|
Definition at line 1462 of file prog.cpp. References DEBUG_TA, Proc::getName(), Proc::isLib(), LOG, and m_procs. |
|
Definition at line 904 of file prog.cpp. References globals. |
|
Definition at line 969 of file prog.cpp. References BinaryFile::GetSizeByName(), getStringConstant(), and pBF. |
|
Definition at line 256 of file prog.h. References BinaryFile::IsDynamicLinkedProcPointer(), and pBF. |
|
Definition at line 1103 of file prog.cpp. References m_procLabels. |
|
Definition at line 245 of file prog.h. References BinaryFile::isReadOnly(), and pBF. |
|
Definition at line 861 of file prog.cpp. References FrontEnd::isWin32(), and pFE. Referenced by newProc(), and CallingConvention::Win32Signature::qualified(). |
|
Definition at line 959 of file prog.cpp. References Type::getSize(), BinaryFile::GetSizeByName(), newGlobalName(), and pBF. Referenced by Unary::descendType(). |
|
Definition at line 1001 of file prog.cpp. References getGlobalName(), globals, LOG, NULL, and VERBOSE. Referenced by makeArrayType(). |
|
|
Definition at line 447 of file prog.cpp. References UserProc::isDecoded(), m_procs, and UserProc::print(). |
|
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. |
|
Definition at line 1594 of file prog.cpp. References entryProcs, Boomerang::get(), getName(), Boomerang::getOutputPath(), lockFileWrite(), and m_procs. Referenced by UserProc::printXML(). |
|
Definition at line 1569 of file prog.cpp. References entryProcs, Boomerang::get(), Boomerang::getOutputPath(), lockFileWrite(), m_procs, and printProcsRecursive(). |
|
|
|
Definition at line 259 of file prog.h. References pFE, and FrontEnd::processProc(). |
|
Definition at line 1479 of file prog.cpp. References Proc::isLib(), and m_procs. |
|
Definition at line 247 of file prog.h. References pBF, and BinaryFile::readNative1(). |
|
Definition at line 248 of file prog.h. References pBF, and BinaryFile::readNative2(). |
|
Definition at line 249 of file prog.h. References pBF, and BinaryFile::readNative4(). Referenced by ConstGlobalConverter::preVisit(), BasicBlock::processSwitch(), and readNativeAs(). |
|
Definition at line 252 of file prog.h. References pBF, and BinaryFile::readNative8(). |
|
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(). |
|
Definition at line 250 of file prog.h. References pBF, and BinaryFile::readNativeFloat4(). |
|
Definition at line 251 of file prog.h. References pBF, and BinaryFile::readNativeFloat8(). |
|
Definition at line 1619 of file prog.cpp. References LOG. |
|
|
|
Definition at line 1802 of file prog.cpp. References Proc::getNativeAddress(), pFE, and FrontEnd::processProc(). Referenced by UserProc::decompile(). |
|
|
|
|
|
Definition at line 746 of file prog.cpp. References Boomerang::alert_remove(), Boomerang::get(), and m_procs. Referenced by PentiumFrontEnd::helperFunc(). |
|
|
|
Definition at line 1340 of file prog.cpp. References StatementList::begin(), DEBUG_UNUSED, StatementList::end(), UserProc::getStatements(), LOG, m_procs, opGlobal, and opWild. |
|
|
|
Remove unused return locations.
Definition at line 1396 of file prog.cpp. References Proc::isLib(), and m_procs. |
|
|
|
Definition at line 728 of file prog.cpp. References UserProc::deleteCFG(), Proc::getNativeAddress(), m_procLabels, and m_procs. |
|
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(). |
|
Definition at line 1253 of file prog.cpp. References entryProcs, findProc(), Proc::isLib(), and NULL. Referenced by FrontEnd::decode(). |
|
|
Definition at line 1021 of file prog.cpp. References globals. |
|
Definition at line 122 of file prog.cpp. References m_name, m_rootCluster, and Cluster::setName(). Referenced by FrontEnd::decode(), and ProgTest::testName(). |
|
|
Definition at line 239 of file prog.h. References pBF, and BinaryFile::SymbolByAddress(). |
|
Definition at line 132 of file prog.cpp. References m_procs. Referenced by FrontEnd::decodeOnly(). |
|
|
|
|
|
|
|
Definition at line 107 of file prog.h. Referenced by decompile(), printCallGraph(), printCallGraphXML(), printSymbolsToFile(), and setEntryPoint(). |
|
|
|
Definition at line 297 of file prog.h. Referenced by addReloc(), dumpGlobals(), generateCode(), getGlobal(), getGlobalAddr(), getGlobalName(), getGlobalType(), globalUsed(), newGlobalName(), XMLProgParser::persistToXML(), and setGlobalType(). |
|
Definition at line 300 of file prog.h. Referenced by XMLProgParser::persistToXML(), and setNewProc(). |
|
Definition at line 293 of file prog.h. Referenced by clear(), getName(), getNameNoPath(), getPathAndName(), Prog(), setFrontEnd(), and setName(). |
|
Definition at line 293 of file prog.h. Referenced by getPath(), getPathAndName(), and Prog(). |
|
Definition at line 295 of file prog.h. Referenced by clear(), findProc(), getFirstProc(), getNextProc(), isProcLabel(), and remProc(). |
|
|
Definition at line 301 of file prog.h. Referenced by findCluster(), generateCode(), getDefaultCluster(), getRootCluster(), XMLProgParser::persistToXML(), setFrontEnd(), and setName(). |
|
|
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(). |