#include <include/signature.h>
Inheritance diagram for Signature:
Definition at line 86 of file signature.h.
Public Member Functions | |
void | addEllipsis () |
virtual void | addParameter (Parameter *param) |
virtual void | addParameter (Exp *e, Type *ty) |
virtual void | addParameter (Type *type, const char *nam=NULL, Exp *e=NULL, const char *boundMax="") |
virtual void | addParameter (const char *nam=NULL) |
void | addPreferedParameter (int n) |
virtual void | addReturn (Return *ret) |
virtual void | addReturn (Exp *e) |
virtual void | addReturn (Type *type, Exp *e=NULL) |
virtual bool | argumentCompare (Assignment &a, Assignment &b) |
virtual Signature * | clone () |
bool | dfaTypeAnalysis (Cfg *cfg) |
virtual int | findParam (const char *nam) |
virtual int | findParam (Exp *e) |
int | findReturn (Exp *e) |
virtual Exp * | getArgumentExp (int n) |
virtual callconv | getConvention () |
Exp * | getEarlyParamExp (int n, Prog *prog) |
Exp * | getFirstArgLoc (Prog *prog) |
virtual const char * | getName () |
virtual unsigned | getNumParams () |
unsigned int | getNumPreferedParams () |
virtual unsigned | getNumReturns () |
virtual const char * | getParamBoundMax (int n) |
virtual Exp * | getParamExp (int n) |
virtual const char * | getParamName (int n) |
virtual Type * | getParamType (int n) |
virtual platform | getPlatform () |
const char * | getPreferedName () |
int | getPreferedParam (int n) |
Type * | getPreferedReturn () |
virtual Exp * | getProven (Exp *left) |
virtual Exp * | getReturnExp (int n) |
Returns & | getReturns () |
virtual Type * | getReturnType (int n) |
const char * | getSigFile () |
virtual int | getStackRegister () throw (StackRegisterNotDefinedException) |
virtual Exp * | getStackWildcard () |
Type * | getTypeFor (Exp *e) |
virtual bool | hasEllipsis () |
virtual bool | isAddrOfStackLocal (Prog *prog, Exp *e) |
bool | isForced () |
virtual bool | isLocalOffsetNegative () |
virtual bool | isLocalOffsetPositive () |
bool | isOpCompatStackLocal (OPER op) |
virtual bool | isPreserved (Exp *e) |
virtual bool | isPromoted () |
bool | isStackLocal (Prog *prog, Exp *e) |
bool | isUnknown () |
void | killEllipsis () |
virtual bool | operator== (Signature &other) |
void | print (std::ostream &out, bool html=false) |
char * | prints () |
void | printToLog () |
virtual Signature * | promote (UserProc *p) |
virtual void | removeParameter (int i) |
virtual void | removeParameter (Exp *e) |
virtual void | removeReturn (Exp *e) |
void | renameParam (const char *oldName, const char *newName) |
virtual bool | returnCompare (Assignment &a, Assignment &b) |
void | setForced (bool f) |
virtual void | setLibraryDefines (StatementList *defs) |
virtual void | setName (const char *nam) |
virtual void | setNumParams (int n) |
virtual void | setParamExp (int n, Exp *e) |
virtual void | setParamName (int n, const char *nam) |
virtual void | setParamType (Exp *e, Type *ty) |
virtual void | setParamType (const char *nam, Type *ty) |
virtual void | setParamType (int n, Type *ty) |
void | setPreferedName (const char *nam) |
void | setPreferedReturn (Type *ty) |
void | setRetType (Type *t) |
void | setReturnExp (int n, Exp *e) |
virtual void | setReturnType (int n, Type *ty) |
void | setSigFile (const char *nam) |
void | setUnknown (bool b) |
Signature (const char *nam) | |
virtual | ~Signature () |
Static Public Member Functions | |
static char * | conventionName (callconv cc) |
static Exp * | getReturnExp2 (BinaryFile *pBF) |
static int | getStackRegister (Prog *prog) throw (StackRegisterNotDefinedException) |
static StatementList & | getStdRetStmt (Prog *prog) |
static Signature * | instantiate (platform plat, callconv cc, const char *nam) |
static char * | platformName (platform plat) |
static void | setABIdefines (Prog *prog, StatementList *defs) |
Protected Member Functions | |
void | appendParameter (Parameter *p) |
void | appendReturn (Return *r) |
Signature () | |
bool | usesNewParam (UserProc *p, Statement *stmt, bool checkreach, int &n) |
Protected Attributes | |
bool | ellipsis |
bool | forced |
std::string | name |
std::vector< Parameter * > | params |
std::string | preferedName |
std::vector< int > | preferedParams |
Type * | preferedReturn |
Type * | rettype |
Returns | returns |
std::string | sigFile |
bool | unknown |
Friends | |
class | XMLProgParser |
Classes | |
class | StackRegisterNotDefinedException |
|
Definition at line 1049 of file signature.cpp. |
|
Definition at line 114 of file signature.h. |
|
Definition at line 261 of file signature.h. Referenced by clone(). |
|
Definition at line 155 of file signature.h. References ellipsis. |
|
Definition at line 1173 of file signature.cpp. References addParameter(), Parameter::getBoundMax(), Parameter::getExp(), Parameter::getName(), Parameter::getType(), NULL, and params. |
|
Definition at line 1133 of file signature.cpp. References addParameter(), and NULL. |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::PPCSignature, and CallingConvention::StdC::ST20Signature. Definition at line 1137 of file signature.cpp. References addParameter(), Type::getCtype(), NULL, and params. |
|
|
Definition at line 248 of file signature.h. References preferedParams. |
|
Definition at line 130 of file signature.h. References returns. |
|
Definition at line 1305 of file signature.cpp. References addReturn(). |
|
|
Definition at line 262 of file signature.h. References params. |
|
Definition at line 264 of file signature.h. References returns. |
|
Reimplemented in CallingConvention::StdC::PentiumSignature, and CallingConvention::StdC::SparcSignature. Definition at line 1851 of file signature.cpp. References Assignment::getLeft(). Referenced by UserProc::insertParameter(). |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::Win32TcSignature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::SparcLibSignature, CallingConvention::StdC::PPCSignature, CallingConvention::StdC::ST20Signature, and CustomSignature. Definition at line 1070 of file signature.cpp. References Type::clone(), cloneVec(), ellipsis, name, NULL, params, preferedName, preferedParams, preferedReturn, rettype, returns, sigFile, Signature(), and unknown. Referenced by FrontEnd::decode(), FrontEnd::getEntryPoints(), CallStatement::rangeAnalysis(), and CallStatement::setSigArguments(). |
|
Definition at line 61 of file signature.cpp. References CONV_C, CONV_PASCAL, and CONV_THISCALL. Referenced by instantiate(), and XMLProgParser::persistToXML(). |
|
Definition at line 1298 of file dfa.cpp. References DEBUG_TA, Cfg::findImplicitParamAssign(), LOG, Statement::meetWithFor(), and params. Referenced by UserProc::dfaTypeAnalysis(). |
|
Definition at line 1285 of file signature.cpp. References getNumParams(), and getParamName(). |
|
Definition at line 1269 of file signature.cpp. References getNumParams(), and getParamExp(). Referenced by removeParameter(), Proc::removeParameter(), and setParamType(). |
|
Definition at line 1292 of file signature.cpp. References getNumReturns(), and returns. Referenced by CallStatement::bypassRef(), and removeReturn(). |
|
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::Win32TcSignature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::PPCSignature, and CallingConvention::StdC::ST20Signature. Definition at line 243 of file signature.h. References CONV_NONE. Referenced by XMLProgParser::persistToXML(). |
|
Definition at line 1543 of file signature.cpp. References Prog::getMachine(), getParamExp(), MACHINE_PENTIUM, MACHINE_SPARC, MACHINE_ST20, and NULL. |
|
Definition at line 1466 of file signature.cpp. References CallingConvention::StdC::ST20Signature::getArgumentExp(), CallingConvention::StdC::SparcSignature::getArgumentExp(), Prog::getMachine(), MACHINE_PENTIUM, MACHINE_SPARC, MACHINE_ST20, and Location::memOf(). |
|
Definition at line 1119 of file signature.cpp. References name. Referenced by Proc::getName(), Proc::Proc(), and renameParam(). |
|
Definition at line 163 of file signature.h. References params. Referenced by CallStatement::addSigParam(), Decompiler::alert_new(), ArgSourceProvider::ArgSourceProvider(), UserProc::findFinalParameters(), findParam(), FuncType::getCtype(), UserProc::getParamType(), FuncType::getReturnAndParam(), Proc::printDetailsXML(), CallStatement::rangeAnalysis(), renameParam(), CallStatement::setSigArguments(), and usesNewParam(). |
|
Definition at line 251 of file signature.h. References preferedParams. |
|
Definition at line 132 of file signature.h. References returns. Referenced by CHLLCode::AddProcDec(), CHLLCode::AddReturnStatement(), CallStatement::calcResults(), findReturn(), CallStatement::generateCode(), FuncType::getCtype(), UserProc::getDefinitions(), FuncType::getReturnAndParam(), Proc::printDetailsXML(), and UserProc::removeRedundantReturns(). |
|
Definition at line 1227 of file signature.cpp. Referenced by CallStatement::dfaTypeAnalysis(). |
|
Definition at line 1215 of file signature.cpp. References params. Referenced by CallStatement::addSigParam(), ArgSourceProvider::exists(), UserProc::findFinalParameters(), findParam(), getArgumentExp(), getEarlyParamExp(), ArgSourceProvider::nextArgLoc(), Proc::printDetailsXML(), CallStatement::rangeAnalysis(), and usesNewParam(). |
|
Definition at line 1210 of file signature.cpp. References params. Referenced by UserProc::addParameterSymbols(), Decompiler::alert_new(), CallStatement::dfaTypeAnalysis(), findParam(), UserProc::getParamType(), and Proc::printDetailsXML(). |
|
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::Win32TcSignature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::PPCSignature, and CallingConvention::StdC::ST20Signature. Definition at line 242 of file signature.h. References PLAT_GENERIC. Referenced by XMLProgParser::persistToXML(). |
|
Definition at line 250 of file signature.h. References preferedName. |
|
Definition at line 252 of file signature.h. References preferedParams. |
|
Definition at line 249 of file signature.h. References preferedReturn. |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::Win32TcSignature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::SparcLibSignature, CallingConvention::StdC::PPCSignature, and CallingConvention::StdC::ST20Signature. Definition at line 228 of file signature.h. References NULL. Referenced by CallStatement::bypassRef(), and LibProc::getProven(). |
|
Definition at line 133 of file signature.h. References returns. Referenced by CHLLCode::AddProcDec(), CallStatement::calcResults(), UserProc::getDefinitions(), Proc::printDetailsXML(), and UserProc::removeRedundantReturns(). |
|
Definition at line 1496 of file signature.cpp. References BinaryFile::GetMachine(), MACHINE_PENTIUM, MACHINE_SPARC, MACHINE_ST20, NULL, and Location::regOf(). |
|
Definition at line 140 of file signature.h. References returns. |
|
Definition at line 135 of file signature.h. References returns. Referenced by CHLLCode::AddProcDec(), FuncType::getCtype(), FuncType::getReturnAndParam(), and Proc::printDetailsXML(). |
|
Definition at line 147 of file signature.h. References sigFile. Referenced by Decompiler::getSigFile(). |
|
Definition at line 1614 of file signature.cpp. References MACHINE_PENTIUM, MACHINE_PPC, MACHINE_SPARC, and MACHINE_ST20. |
|
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::PPCSignature, and CallingConvention::StdC::ST20Signature. Definition at line 202 of file signature.h. References NULL. |
|
Definition at line 1566 of file signature.cpp. References StatementList::append(), Prog::getMachine(), MACHINE_PENTIUM, MACHINE_SPARC, MACHINE_ST20, Location::memOf(), opPC, and opPlus. |
|
Definition at line 2016 of file signature.cpp. References returns. |
|
Definition at line 177 of file signature.h. References ellipsis. Referenced by CallStatement::ellipsisProcessing(), and ArgSourceProvider::exists(). |
|
Definition at line 1369 of file signature.cpp. References CONV_C, CONV_PASCAL, CONV_THISCALL, conventionName(), NULL, PLAT_PENTIUM, PLAT_PPC, PLAT_SPARC, PLAT_ST20, and platformName(). Referenced by FrontEnd::getDefaultSignature(), and Prog::newProc(). |
|
Reimplemented in CallingConvention::StdC::SparcSignature. Definition at line 1639 of file signature.cpp. References Exp::getOper(), getStackRegister(), Unary::getSubExp1(), Exp::getSubExp1(), Exp::isIntConst(), isLocalOffsetNegative(), isLocalOffsetPositive(), isStackLocal(), Exp::isSubscript(), opAddrOf, opMinus, opPlus, Location::regOf(), and sp. Referenced by Binary::descendType(), isStackLocal(), and UserProc::mapExpressionsToLocals(). |
|
Definition at line 124 of file signature.h. References forced. Referenced by CHLLCode::AddProcDec(), UserProc::findFinalParameters(), print(), UserProc::removeRedundantParameters(), and UserProc::removeRedundantReturns(). |
|
Definition at line 217 of file signature.h. Referenced by isAddrOfStackLocal(), and isOpCompatStackLocal(). |
|
Reimplemented in CallingConvention::StdC::SparcSignature, and CallingConvention::StdC::PPCSignature. Definition at line 219 of file signature.h. Referenced by isAddrOfStackLocal(), and isOpCompatStackLocal(). |
|
Definition at line 1841 of file signature.cpp. References isLocalOffsetNegative(), isLocalOffsetPositive(), opMinus, and opPlus. |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, and CallingConvention::StdC::PPCSignature. Definition at line 229 of file signature.h. Referenced by LibProc::isPreserved(). |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, CallingConvention::StdC::PPCSignature, CallingConvention::StdC::ST20Signature, and CustomSignature. Definition at line 234 of file signature.h. Referenced by UserProc::isLocalOrParamPattern(). |
|
Definition at line 1630 of file signature.cpp. References addr(), Exp::getSubExp1(), isAddrOfStackLocal(), Exp::isMemOf(), and Exp::isSubscript(). Referenced by Assignment::dfaTypeAnalysis(), CallingConvention::StdC::SparcSignature::isAddrOfStackLocal(), isAddrOfStackLocal(), and DfaLocalMapper::processExp(). |
|
Definition at line 121 of file signature.h. References unknown. Referenced by Decompiler::alert_new(). |
|
Definition at line 156 of file signature.h. References ellipsis. |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, and CallingConvention::StdC::ST20Signature. Definition at line 1104 of file signature.cpp. References params, and returns. Referenced by CallingConvention::StdC::SparcSignature::operator==(), CallingConvention::StdC::ST20Signature::operator==(), CallingConvention::StdC::PentiumSignature::operator==(), and CallingConvention::Win32Signature::operator==(). |
|
Definition at line 48 of file signature.cpp. References PLAT_M68K, PLAT_MIPS, PLAT_PARISC, PLAT_PENTIUM, PLAT_PPC, PLAT_SPARC, and PLAT_ST20. Referenced by instantiate(), XMLProgParser::persistToXML(), and FrontEnd::readLibraryCatalog(). |
|
Definition at line 1394 of file signature.cpp. References isForced(), and returns. Referenced by UserProc::print(), prints(), and printToLog(). |
|
Definition at line 1420 of file signature.cpp. References debug_buffer, DEBUG_BUFSIZE, and print(). |
|
Definition at line 1428 of file signature.cpp. Referenced by Prog::newProc(). |
|
|
Definition at line 1194 of file signature.cpp. References params. |
|
Definition at line 1188 of file signature.cpp. References findParam(). Referenced by Proc::removeParameter(), and UserProc::removeRedundantParameters(). |
|
Definition at line 1310 of file signature.cpp. References findReturn(), and returns. Referenced by Proc::removeReturn(). |
|
Definition at line 1276 of file signature.cpp. References getName(), getNumParams(), and params. Referenced by Proc::renameParam(). |
|
Reimplemented in CallingConvention::StdC::PentiumSignature, and CallingConvention::StdC::SparcSignature. Definition at line 1847 of file signature.cpp. References Assignment::getLeft(). |
|
Definition at line 1514 of file signature.cpp. References StatementList::append(), Prog::getMachine(), MACHINE_PENTIUM, MACHINE_PPC, MACHINE_SPARC, MACHINE_ST20, and StatementList::size(). |
|
Definition at line 125 of file signature.h. References forced. Referenced by FrontEnd::getEntryPoints(). |
|
Reimplemented in CallingConvention::Win32Signature, CallingConvention::StdC::PentiumSignature, CallingConvention::StdC::SparcSignature, and CallingConvention::StdC::PPCSignature. Definition at line 230 of file signature.h. Referenced by CallStatement::updateDefines(). |
|
Definition at line 1124 of file signature.cpp. References name. Referenced by FrontEnd::getEntryPoints(), and Proc::setName(). |
|
Definition at line 1200 of file signature.cpp. References params. |
|
Definition at line 1263 of file signature.cpp. References params. |
|
Definition at line 1258 of file signature.cpp. References params. |
|
Definition at line 1249 of file signature.cpp. References findParam(), LOG, and params. |
|
Definition at line 1240 of file signature.cpp. References findParam(), LOG, and params. |
|
Definition at line 1236 of file signature.cpp. References params. Referenced by UserProc::setParamType(). |
|
Definition at line 247 of file signature.h. References preferedName. |
|
Definition at line 246 of file signature.h. References preferedReturn. |
|
Definition at line 139 of file signature.h. References rettype. |
|
Definition at line 134 of file signature.h. References returns. |
|
Definition at line 1320 of file signature.cpp. References returns. |
|
Definition at line 148 of file signature.h. References sigFile. |
|
Definition at line 122 of file signature.h. References unknown. |
|
Definition at line 1435 of file signature.cpp. References StatementSet::begin(), StatementSet::end(), getNumParams(), getParamExp(), Statement::printAsUse(), Statement::usesExp(), and VERBOSE. |
|
Definition at line 260 of file signature.h. |
|
|
Definition at line 98 of file signature.h. Referenced by isForced(), and setForced(). |
|
|
|
|
|
|
|
|
Definition at line 89 of file signature.h. Referenced by clone(), getSigFile(), and setSigFile(). |
|
Definition at line 95 of file signature.h. Referenced by clone(), CallingConvention::StdC::SparcSignature::clone(), CallingConvention::StdC::ST20Signature::clone(), CallingConvention::StdC::PPCSignature::clone(), CallingConvention::StdC::PentiumSignature::clone(), isUnknown(), and setUnknown(). |