#include <include/frontend.h>
Inheritance diagram for FrontEnd:
Definition at line 108 of file frontend.h.
Public Member Functions | |
void | addDecodedRtl (ADDRESS a, RTL *rtl) |
void | addRefHint (ADDRESS addr, const char *nam) |
void | AddSymbol (ADDRESS addr, const char *nam) |
void | appendSyntheticReturn (PBB pCallBB, UserProc *pProc, RTL *pRtl) |
PBB | createReturnBlock (UserProc *pProc, std::list< RTL * > *BB_rtls, RTL *pRtl) |
void | decode (Prog *prog, ADDRESS a) |
void | decode (Prog *prog, bool decodeMain=true, const char *pname=NULL) |
void | decodeFragment (UserProc *proc, ADDRESS a) |
virtual DecodeResult & | decodeInstruction (ADDRESS pc) |
void | decodeOnly (Prog *prog, ADDRESS a) |
virtual void | extraProcessCall (CallStatement *call, std::list< RTL * > *BB_rtls) |
FrontEnd (BinaryFile *pBF, Prog *prog, BinaryFileFactory *pbff) | |
BinaryFile * | getBinaryFile () |
NJMCDecoder * | getDecoder () |
virtual std::vector< Exp * > & | getDefaultParams ()=0 |
virtual std::vector< Exp * > & | getDefaultReturns ()=0 |
Signature * | getDefaultSignature (const char *name) |
std::vector< ADDRESS > | getEntryPoints () |
virtual platform | getFrontEndId ()=0 |
virtual int | getInst (int addr) |
Signature * | getLibSignature (const char *name) |
virtual ADDRESS | getMainEntryPoint (bool &gotMain)=0 |
Prog * | getProg () |
const char * | getRegName (int idx) |
int | getRegSize (int idx) |
virtual bool | helperFunc (ADDRESS dest, ADDRESS addr, std::list< RTL * > *lrtl) |
bool | isWin32 () |
virtual bool | processProc (ADDRESS uAddr, UserProc *pProc, std::ofstream &os, bool frag=false, bool spec=false) |
void | readLibraryCatalog () |
void | readLibraryCatalog (const char *sPath) |
void | readLibrarySignatures (const char *sPath, callconv cc) |
virtual | ~FrontEnd () |
Destructor. | |
Static Public Member Functions | |
static void | closeInstance (void *dlHandle) |
static FrontEnd * | createById (std::string &str, BinaryFile *pBFi, Prog *prog) |
static FrontEnd * | getInstanceFor (const char *sName, void *&dlHandle, BinaryFile *pBF, NJMCDecoder *&decoder) |
static FrontEnd * | instantiate (BinaryFile *pBF, Prog *prog, BinaryFileFactory *pbff) |
static FrontEnd * | Load (const char *fname, Prog *prog) |
static bool | noReturnCallDest (const char *name) |
Protected Attributes | |
NJMCDecoder * | decoder |
std::map< std::string, Signature * > | librarySignatures |
BinaryFile * | pBF |
BinaryFileFactory * | pbff |
std::map< ADDRESS, RTL * > | previouslyDecoded |
Prog * | prog |
std::map< ADDRESS, std::string > | refHints |
TargetQueue | targetQueue |
|
Definition at line 68 of file frontend.cpp. |
|
Destructor. Virtual to mute a warning Definition at line 42 of file testStmtStubs.cpp. |
|
Definition at line 272 of file frontend.h. References previouslyDecoded. Referenced by Prog::addDecodedRtl(). |
|
Definition at line 138 of file frontend.h. References refHints. |
|
Definition at line 135 of file frontend.h. References BinaryFile::AddSymbol(), and pBF. Referenced by Decompiler::addEntryPoint(), and Boomerang::loadAndDecode(). |
|
Definition at line 1182 of file frontend.cpp. References BasicBlock::addInEdge(), createReturnBlock(), RTL::getAddress(), and BasicBlock::setOutEdge(). |
|
|
|
Definition at line 126 of file frontend.cpp. |
|
Definition at line 1136 of file frontend.cpp. References Cfg::addOutEdge(), RTL::appendStmt(), RTL::clear(), RTL::deleteLastStmt(), Cfg::findRetNode(), RTL::getAddress(), UserProc::getCFG(), BasicBlock::getFirstStmt(), RTL::getList(), UserProc::getTheReturnAddr(), Statement::isReturn(), LOG, Cfg::newBB(), NO_ADDRESS, NULL, ONEWAY, RET, UserProc::setTheReturnAddr(), targetQueue, VERBOSE, and TargetQueue::visit(). Referenced by appendSyntheticReturn(), SparcFrontEnd::case_DD(), and SparcFrontEnd::optimise_CallReturn(). |
|
Definition at line 39 of file testExpStubs.cpp. |
|
|
Definition at line 356 of file frontend.cpp. References Boomerang::get(), LOG, and processProc(). Referenced by Prog::decodeFragment(). |
|
Reimplemented in PentiumFrontEnd. Definition at line 363 of file frontend.cpp. References BinaryFile::GetSectionInfoByAddr(), LOG, NULL, pBF, DecodeResult::reset(), and DecodeResult::valid. Referenced by SparcFrontEnd::processProc(), processProc(), FrontSparcTest::test1(), FrontPentTest::test1(), FrontSparcTest::test2(), FrontPentTest::test2(), FrontSparcTest::test3(), FrontPentTest::test3(), FrontSparcTest::testBranch(), FrontPentTest::testBranch(), and RtlTest::testIsCompare(). |
|
Definition at line 346 of file frontend.cpp. References Proc::getNativeAddress(), Proc::isLib(), processProc(), prog, UserProc::setDecoded(), Prog::setNewProc(), and Prog::wellForm(). |
|
Reimplemented in PentiumFrontEnd. Definition at line 168 of file frontend.h. |
|
Definition at line 159 of file frontend.h. References pBF. Referenced by Prog::setFrontEnd(). |
|
Definition at line 173 of file frontend.h. References decoder. |
|
Implemented in PentiumFrontEnd, PPCFrontEnd, SparcFrontEnd, and ST20FrontEnd. Referenced by Prog::getDefaultParams(). |
|
Implemented in PentiumFrontEnd, PPCFrontEnd, SparcFrontEnd, and ST20FrontEnd. Referenced by Prog::getDefaultReturns(). |
|
Definition at line 408 of file frontend.cpp. References CONV_C, CONV_PASCAL, getFrontEndId(), Signature::instantiate(), isWin32(), NULL, and PLAT_PENTIUM. Referenced by Prog::getDefaultSignature(), and getLibSignature(). |
|
Definition at line 176 of file frontend.cpp. References Type::asFunc(), Signature::clone(), BinaryFile::GetAddressByName(), BinaryFile::getFilename(), getMainEntryPoint(), Type::getNamedType(), FuncType::getSignature(), Type::isFunc(), NO_ADDRESS, pBF, prog, BinaryFile::readNative4(), Signature::setForced(), Signature::setName(), Prog::setNewProc(), and BinaryFile::SymbolByAddress(). Referenced by decode(). |
|
Implemented in PentiumFrontEnd, PPCFrontEnd, SparcFrontEnd, and ST20FrontEnd. Referenced by getDefaultSignature(), Prog::getFrontEndId(), and readLibraryCatalog(). |
|
Definition at line 43 of file testStmtStubs.cpp. |
|
|
|
Definition at line 421 of file frontend.cpp. References getDefaultSignature(), librarySignatures, and LOG. Referenced by Prog::getLibSignature(), and TypeTest::testCompound(). |
|
|
Definition at line 1123 of file frontend.cpp. References prog. |
|
Definition at line 102 of file frontend.cpp. References decoder, NJMCDecoder::getRTLDict(), NULL, and RTLInstDict::RegMap. Referenced by Prog::getRegName(). |
|
Definition at line 110 of file frontend.cpp. References decoder, RTLInstDict::DetRegMap, and NJMCDecoder::getRTLDict(). Referenced by Prog::getRegSize(). |
|
Reimplemented in PentiumFrontEnd, and SparcFrontEnd. Definition at line 220 of file frontend.h. |
|
Definition at line 72 of file frontend.cpp. References BinaryFile::GetMachine(), MACHINE_PENTIUM, MACHINE_PPC, MACHINE_SPARC, MACHINE_ST20, pBF, pbff, and prog. Referenced by Load(). |
|
Definition at line 116 of file frontend.cpp. References BinaryFile::GetFormat(), LOADFMT_PE, and pBF. Referenced by getDefaultSignature(), Prog::isWin32(), and readLibraryCatalog(). |
|
Definition at line 88 of file frontend.cpp. References instantiate(), BinaryFileFactory::Load(), NULL, pBF, pbff, and prog. Referenced by Decompiler::load(), and Boomerang::loadAndDecode(). |
|
Definition at line 120 of file frontend.cpp. Referenced by LibProc::isNoReturn(), and ReturnStatement::updateModifieds(). |
|
|
Definition at line 163 of file frontend.cpp. References Boomerang::get(), getFrontEndId(), Boomerang::getProgPath(), isWin32(), librarySignatures, and Signature::platformName(). |
|
Definition at line 138 of file frontend.cpp. Referenced by Decompiler::load(), Prog::rereadLibSignatures(), TypeTest::testCompound(), and ProcTest::testName(). |
|
Definition at line 381 of file frontend.cpp. |
|
Definition at line 112 of file frontend.h. Referenced by PentiumFrontEnd::decodeInstruction(), getDecoder(), getRegName(), getRegSize(), PentiumFrontEnd::PentiumFrontEnd(), PPCFrontEnd::PPCFrontEnd(), and ST20FrontEnd::ST20FrontEnd(). |
|
Definition at line 119 of file frontend.h. Referenced by getLibSignature(), and readLibraryCatalog(). |
|
|
Definition at line 114 of file frontend.h. Referenced by instantiate(), and Load(). |
|
Definition at line 123 of file frontend.h. Referenced by addDecodedRtl(), SparcFrontEnd::processProc(), and processProc(). |
|
Definition at line 115 of file frontend.h. Referenced by createById(), decode(), PentiumFrontEnd::decodeInstruction(), decodeOnly(), getEntryPoints(), getProg(), PentiumFrontEnd::helperFunc(), instantiate(), Load(), PentiumFrontEnd::PentiumFrontEnd(), PPCFrontEnd::PPCFrontEnd(), processProc(), and SparcFrontEnd::SparcFrontEnd(). |
|
Definition at line 121 of file frontend.h. Referenced by addRefHint(), and processProc(). |
|
Definition at line 117 of file frontend.h. Referenced by createReturnBlock(), SparcFrontEnd::processProc(), and processProc(). |