19 #ifndef __CPUI_FSPEC__ 20 #define __CPUI_FSPEC__ 51 force_left_justify = 1,
56 smallsize_inttype = 32,
57 smallsize_floatext = 64,
58 extracheck_high = 128,
73 void resolveJoin(
void);
76 bool isLeftJustified(
void)
const {
return (((flags&force_left_justify)!=0)||(!spaceid->
isBigEndian())); }
84 int4
getAlign(
void)
const {
return alignment; }
89 bool containedBy(
const Address &addr,int4 sz)
const;
90 int4 justifiedContain(
const Address &addr,int4 sz)
const;
93 int4 getSlot(
const Address &addr,int4 skip)
const;
95 uintb
getBase(
void)
const {
return addressbase; }
96 Address getAddrBySlot(int4 &slot,int4 sz)
const;
98 void extraChecks(list<ParamEntry> &entry);
116 InitData(int4 pos,
ParamEntry *e) { position = pos; entry = e; }
120 class SubsortPosition {
123 SubsortPosition(
void) {}
124 SubsortPosition(int4 pos) { position = pos; }
125 SubsortPosition(
bool val) { position = val ? 1000000 : 0; }
126 bool operator<(
const SubsortPosition &op2) {
return position < op2.position; }
135 first = f; last = l; position = data.position; entry = data.entry; }
138 subsorttype
getSubsort(
void)
const {
return SubsortPosition(position); }
167 indcreate_formed = 128,
189 void markInactive(
void) { flags &= ~((uint4)active); flags |= checked; }
190 void markNoUse(
void) { flags &= ~((uint4)(active|used)); flags |= (checked|defnouse); }
191 void markUnref(
void) { flags |= (unref|checked); slot = -1; }
193 bool isChecked(
void)
const {
return ((flags & checked)!=0); }
194 bool isActive(
void)
const {
return ((flags & active)!=0); }
196 bool isUsed(
void)
const {
return ((flags & used)!=0); }
197 bool isUnref(
void)
const {
return ((flags & unref)!=0); }
200 bool isRemFormed(
void)
const {
return ((flags & rem_formed)!=0); }
209 bool testShrink(
const Address &newaddr,int4 sz)
const;
224 vector<ParamTrial> trial;
226 int4 stackplaceholder;
230 bool needsfinalcheck;
235 void registerTrial(
const Address &addr,int4 sz);
238 const ParamTrial &getTrialForInputVarnode(int4 slot)
const;
239 int4 whichTrial(
const Address &addr,int4 sz)
const;
246 void freePlaceholderSlot(
void);
252 void deleteUnusedTrials(
void);
253 void splitTrial(int4 i,int4 sz);
254 void joinTrial(int4 slot,
const Address &addr,int4 sz);
255 int4 getNumUsed(
void)
const;
263 bool testShrink(int4 i,
const Address &addr,int4 sz)
const {
return trial[i].testShrink(addr,sz); }
270 void shrink(int4 i,
const Address &addr,int4 sz) { trial[i].setAddress(addr,sz); }
286 virtual void saveXmlAttributes(ostream &s,uintb offset)
const;
287 virtual void saveXmlAttributes(ostream &s,uintb offset,int4 size)
const;
288 virtual void printRaw(ostream &s,uintb offset)
const;
289 virtual void saveXml(ostream &s)
const;
290 virtual void restoreXml(
const Element *el);
328 void saveXml(ostream &s)
const;
348 virtual uint4 getType(
void)
const=0;
357 virtual void assignMap(
const vector<Datatype *> &proto,
bool isinput,
358 TypeFactory &typefactory,vector<ParameterPieces> &res)
const=0;
366 virtual void fillinMap(
ParamActive *active)
const=0;
377 virtual bool checkJoin(
const Address &hiaddr,int4 hisize,
const Address &loaddr,int4 losize)
const=0;
387 virtual bool checkSplit(
const Address &loc,int4 size,int4 splitpoint)
const=0;
399 virtual int4 characterizeAsParam(
const Address &loc,int4 size)
const=0;
407 virtual bool possibleParam(
const Address &loc,int4 size)
const=0;
418 virtual bool possibleParamWithSlot(
const Address &loc,int4 size,int4 &slot,int4 &slotsize)
const=0;
426 virtual bool getBiggestContainedParam(
const Address &loc,int4 size,
VarnodeData &res)
const=0;
437 virtual bool unjustifiedContainer(
const Address &loc,int4 size,
VarnodeData &res)
const=0;
454 virtual AddrSpace *getSpacebase(
void)
const=0;
469 virtual int4 getMaxDelay(
void)
const=0;
477 virtual void restoreXml(
const Element *el,
const AddrSpaceManager *manage,vector<EffectRecord> &effectlist,
bool normalstack)=0;
504 void separateFloat(
ParamActive *active,int4 &floatstart,int4 &floatstop,int4 &start,int4 &stop)
const;
505 void forceExclusionGroup(
ParamActive *active)
const;
506 void forceNoUse(
ParamActive *active,int4 start,int4 stop)
const;
507 void forceInactiveChain(
ParamActive *active,int4 maxchain,int4 start,int4 stop)
const;
508 void calcDelay(
void);
509 void populateResolver(
void);
514 const list<ParamEntry> &
getEntry(
void)
const {
return entry; }
515 virtual uint4
getType(
void)
const {
return p_standard; }
516 virtual void assignMap(
const vector<Datatype *> &proto,
bool isinput,
517 TypeFactory &typefactory,vector<ParameterPieces> &res)
const;
519 virtual bool checkJoin(
const Address &hiaddr,int4 hisize,
const Address &loaddr,int4 losize)
const;
520 virtual bool checkSplit(
const Address &loc,int4 size,int4 splitpoint)
const;
521 virtual int4 characterizeAsParam(
const Address &loc,int4 size)
const;
522 virtual bool possibleParam(
const Address &loc,int4 size)
const;
523 virtual bool possibleParamWithSlot(
const Address &loc,int4 size,int4 &slot,int4 &slotsize)
const;
524 virtual bool getBiggestContainedParam(
const Address &loc,int4 size,
VarnodeData &res)
const;
525 virtual bool unjustifiedContainer(
const Address &loc,int4 size,
VarnodeData &res)
const;
530 virtual void restoreXml(
const Element *el,
const AddrSpaceManager *manage,vector<EffectRecord> &effectlist,
bool normalstack);
545 virtual uint4
getType(
void)
const {
return p_standard_out; }
546 virtual void assignMap(
const vector<Datatype *> &proto,
bool isinput,
547 TypeFactory &typefactory,vector<ParameterPieces> &res)
const;
549 virtual bool possibleParam(
const Address &loc,int4 size)
const;
550 virtual void restoreXml(
const Element *el,
const AddrSpaceManager *manage,vector<EffectRecord> &effectlist,
bool normalstack);
565 virtual uint4
getType(
void)
const {
return p_register; }
584 virtual uint4
getType(
void)
const {
return p_merged; }
585 virtual void assignMap(
const vector<Datatype *> &proto,
bool isinput,
586 TypeFactory &typefactory,vector<ParameterPieces> &res)
const {
587 throw LowlevelError(
"Cannot assign prototype before model has been resolved"); }
589 throw LowlevelError(
"Cannot determine prototype before model has been resolved"); }
622 vector<EffectRecord> effectlist;
623 vector<VarnodeData> likelytrash;
624 int4 injectUponEntry;
625 int4 injectUponReturn;
628 bool stackgrowsnegative;
631 void defaultLocalRange(
void);
632 void defaultParamRange(
void);
633 void buildParamList(
const string &strategy);
641 const string &
getName(
void)
const {
return name; }
663 void assignParameterStorage(
const vector<Datatype *> &typelist,vector<ParameterPieces> &res,
bool ignoreOutputError);
675 return input->
checkJoin(hiaddr,hisize,loaddr,losize); }
687 return output->
checkJoin(hiaddr,hisize,loaddr,losize); }
698 return input->
checkSplit(loc,size,splitpoint); }
702 vector<EffectRecord>::const_iterator
effectBegin(
void)
const {
return effectlist.begin(); }
703 vector<EffectRecord>::const_iterator
effectEnd(
void)
const {
return effectlist.end(); }
832 virtual bool isMerged(
void)
const {
return false; }
834 static uint4
lookupEffect(
const vector<EffectRecord> &efflist,
const Address &addr,int4 size);
850 bool operator<(
const PEntry &op2)
const {
return (slot < op2.slot); }
857 vector<PEntry> entry;
863 void addParameter(
const Address &addr,int4 sz);
881 vector<ProtoModel *> modellist;
882 void intersectEffects(
const vector<EffectRecord> &efflist);
883 void intersectLikelyTrash(
const vector<VarnodeData> &trashlist);
892 virtual void restoreXml(
const Element *el);
907 virtual const string &getName(
void)
const=0;
908 virtual Datatype *getType(
void)
const=0;
909 virtual Address getAddress(
void)
const=0;
910 virtual int4 getSize(
void)
const=0;
911 virtual bool isTypeLocked(
void)
const=0;
912 virtual bool isNameLocked(
void)
const=0;
913 virtual bool isSizeTypeLocked(
void)
const=0;
914 virtual bool isIndirectStorage(
void)
const=0;
915 virtual bool isHiddenReturn(
void)
const=0;
916 virtual bool isNameUndefined(
void)
const=0;
917 virtual void setTypeLock(
bool val)=0;
918 virtual void setNameLock(
bool val)=0;
925 virtual void overrideSizeLockType(
Datatype *ct)=0;
931 virtual void resetSizeLockType(
TypeFactory *factory)=0;
939 virtual Symbol *getSymbol(
void)
const=0;
946 if (getAddress() != op2.
getAddress())
return false;
947 if (getType() != op2.
getType())
return false;
956 return !(*
this==op2); }
971 name = nm; addr = ad; type = tp; flags=fl; }
972 virtual const string &
getName(
void)
const {
return name; }
982 virtual void setTypeLock(
bool val);
983 virtual void setNameLock(
bool val);
984 virtual void overrideSizeLockType(
Datatype *ct);
985 virtual void resetSizeLockType(
TypeFactory *factory);
1015 virtual void clearInput(int4 i)=0;
1017 virtual void clearAllInputs(
void)=0;
1018 virtual int4 getNumInputs(
void)
const=0;
1029 virtual void clearOutput(
void)=0;
1038 virtual void saveXml(ostream &s)
const=0;
1057 virtual const string &getName(
void)
const;
1058 virtual Datatype *getType(
void)
const;
1059 virtual Address getAddress(
void)
const;
1060 virtual int4 getSize(
void)
const;
1061 virtual bool isTypeLocked(
void)
const;
1062 virtual bool isNameLocked(
void)
const;
1063 virtual bool isSizeTypeLocked(
void)
const;
1064 virtual bool isIndirectStorage(
void)
const;
1065 virtual bool isHiddenReturn(
void)
const;
1066 virtual bool isNameUndefined(
void)
const;
1067 virtual void setTypeLock(
bool val);
1068 virtual void setNameLock(
bool val);
1069 virtual void overrideSizeLockType(
Datatype *ct);
1070 virtual void resetSizeLockType(
TypeFactory *factory);
1072 virtual Symbol *getSymbol(
void)
const;
1083 vector<ProtoParameter *> inparam;
1090 virtual void clearInput(int4 i);
1091 virtual void clearAllInputs(
void);
1092 virtual int4 getNumInputs(
void)
const;
1095 virtual void clearOutput(
void);
1098 virtual void saveXml(ostream &s)
const;
1108 vector<ProtoParameter *> inparam;
1114 virtual void clearInput(int4 i);
1115 virtual void clearAllInputs(
void);
1116 virtual int4 getNumInputs(
void)
const;
1119 virtual void clearOutput(
void);
1122 virtual void saveXml(ostream &s)
const;
1154 paramshift_applied = 32,
1155 error_inputparam = 64,
1156 error_outputparam = 128,
1157 custom_storage = 256,
1158 unknown_model = 512,
1159 is_constructor = 0x400,
1160 is_destructor = 0x800,
1161 has_thisptr= 0x1000,
1162 is_override = 0x2000
1168 vector<EffectRecord> effectlist;
1169 vector<VarnodeData> likelytrash;
1171 int4 returnBytesConsumed;
1173 void paramShift(int4 paramshift);
1175 void setParamshiftApplied(
bool val) { flags = val ? (flags|paramshift_applied) : (flags & ~((uint4)paramshift_applied)); }
1182 void copyFlowEffects(
const FuncProto &op2);
1195 bool isInputLocked(
void)
const;
1200 void setInputLock(
bool val);
1201 void setOutputLock(
bool val);
1208 void setModelLock(
bool val) { flags = val ? (flags|modellock) : (flags & ~((uint4)modellock)); }
1210 bool isInline(
void)
const {
return ((flags & is_inline)!=0); }
1216 void setInline(
bool val) { flags = val ? (flags|is_inline) : (flags & ~((uint4)is_inline)); }
1230 bool setReturnBytesConsumed(int4 val);
1238 void setNoReturn(
bool val) { flags = val ? (flags|no_return) : (flags & ~((uint4)no_return)); }
1246 void setThisPointer(
bool val) { flags = val ? (flags|has_thisptr) : (flags & ~((uint4)has_thisptr)); }
1254 void setConstructor(
bool val) { flags = val ? (flags|is_constructor) : (flags & ~((uint4)is_constructor)); }
1262 void setDestructor(
bool val) { flags = val ? (flags|is_destructor) : (flags & ~((uint4)is_destructor)); }
1273 void setInputErrors(
bool val) { flags = val ? (flags|error_inputparam) : (flags & ~((uint4)error_inputparam)); }
1278 void setOutputErrors(
bool val) { flags = val ? (flags|error_outputparam) : (flags & ~((uint4)error_outputparam)); }
1284 void resolveExtraPop(
void);
1286 void clearUnlockedInput(
void);
1287 void clearUnlockedOutput(
void);
1288 void clearInput(
void);
1289 void cancelInjectId(
void);
1330 void updateInputTypes(
const vector<Varnode *> &triallist,
ParamActive *activeinput);
1331 void updateInputNoTypes(
const vector<Varnode *> &triallist,
ParamActive *activeinput,
TypeFactory *factory);
1332 void updateOutputTypes(
const vector<Varnode *> &triallist);
1333 void updateOutputNoTypes(
const vector<Varnode *> &triallist,
TypeFactory *factory);
1334 void updateAllTypes(
const vector<string> &namelist,
const vector<Datatype *> &typelist,
bool dtdtdt);
1344 void setDotdotdot(
bool val) { flags = val ? (flags|dotdotdot) : (flags & ~((uint4)dotdotdot)); }
1346 void setOverride(
bool val) { flags = val ? (flags|is_override) : (flags & ~((uint4)is_override)); }
1347 uint4 hasEffect(
const Address &addr,int4 size)
const;
1348 vector<EffectRecord>::const_iterator effectBegin(
void)
const;
1349 vector<EffectRecord>::const_iterator effectEnd(
void)
const;
1350 int4 numLikelyTrash(
void)
const;
1352 int4 characterizeAsInputParam(
const Address &addr,int4 size)
const;
1353 bool possibleInputParam(
const Address &addr,int4 size)
const;
1354 bool possibleOutputParam(
const Address &addr,int4 size)
const;
1401 bool getBiggestContainedInputParam(
const Address &loc,int4 size,
VarnodeData &res)
const;
1403 bool isCompatible(
const FuncProto &op2)
const;
1405 void printRaw(
const string &funcname,ostream &s)
const;
1411 uint4
getComparableFlags(
void)
const {
return (flags & (dotdotdot | is_constructor | is_destructor | has_thisptr )); }
1413 void saveXml(ostream &s)
const;
1441 int4 effective_extrapop;
1443 int4 stackPlaceholderSlot;
1445 int4 matchCallCount;
1448 mutable vector<int4> inputConsume;
1450 bool isoutputactive;
1451 bool isbadjumptable;
1452 Varnode *getSpacebaseRelative(
void)
const;
1456 bool transferLockedInput(vector<Varnode *> &newinput);
1457 bool transferLockedOutput(
Varnode *&newoutput);
1458 void commitNewInputs(
Funcdata &data,vector<Varnode *> &newinput);
1460 void collectOutputTrialVarnodes(vector<Varnode *> &trialvn);
1463 offset_unknown = 0xBADBEEF
1471 const string &
getName(
void)
const {
return name; }
1485 void initActiveInput(
void);
1496 bool checkInputJoin(int4 slot1,
bool ishislot,
Varnode *vn1,
Varnode *vn2)
const;
1497 void doInputJoin(int4 slot1,
bool ishislot);
1498 bool lateRestriction(
const FuncProto &restrictedProto,vector<Varnode *> &newinput,
Varnode *&newoutput);
1503 void abortSpacebaseRelative(
Funcdata &data);
1504 void finalInputCheck(
void);
1506 void checkOutputTrialUse(
Funcdata &data,vector<Varnode *> &trialvn);
1507 void buildInputFromTrials(
Funcdata &data);
1508 void buildOutputFromTrials(
Funcdata &data,vector<Varnode *> &trialvn);
1509 int4 getInputBytesConsumed(int4 slot)
const;
1510 bool setInputBytesConsumed(int4 slot,int4 val)
const;
1511 void paramshiftModifyStart(
void);
1512 bool paramshiftModifyStop(
Funcdata &data);
1513 uint4 hasEffectTranslate(
const Address &addr,int4 size)
const;
1528 static void countMatchingCalls(
const vector<FuncCallSpecs *> &qlst);
1539 slot -= ((stackplaceholder<0)||(slot<stackplaceholder)) ? 1 : 2;
1549 if (address < op2.address)
return true;
1550 if (address != op2.address)
return false;
1551 return (type < op2.type);
1557 if (address != op2.address)
return false;
1558 return (type == op2.type);
1564 if (address != op2.address)
return true;
1565 return (type != op2.type);
bool hasCustomStorage(void) const
Is this a "custom" function prototype.
Definition: fspec.hh:1199
void sortTrials(void)
Sort the trials in formal parameter order.
Definition: fspec.hh:251
ParameterSymbol(void)
Constructor.
Definition: fspec.hh:1056
bool dotdotdot
True if prototype takes variable arguments.
Definition: fspec.hh:1133
A region where processor data is stored.
Definition: space.hh:73
int4 maxdelay
Maximum heritage delay across all parameters.
Definition: fspec.hh:494
A class for analyzing parameters to a sub-function call.
Definition: fspec.hh:1436
virtual bool isMerged(void) const
Is this a merged prototype model.
Definition: fspec.hh:832
ProtoModelMerged(Architecture *g)
Constructor.
Definition: fspec.hh:885
Standard output (return value) model.
Definition: fspec.hh:343
uint4 getType(void) const
Get the type of effect.
Definition: fspec.hh:322
virtual ~ProtoParameter(void)
Destructor.
Definition: fspec.hh:906
int4 getNumMismatch(void) const
Get the number of mismatched trials.
Definition: fspec.hh:866
int4 numgroup
Number of groups in this parameter convention.
Definition: fspec.hh:493
int4 slotGroup(void) const
Get position of this within its parameter group.
Definition: fspec.hh:205
void deriveOutputMap(ParamActive *active) const
Given a list of output trials, derive the most likely output prototype.
Definition: fspec.hh:660
Exception thrown when a prototype can't be modeled properly.
Definition: fspec.hh:28
uintb getSpacebaseOffset(void) const
Get the stack-pointer relative offset at the point of this call site.
Definition: fspec.hh:1475
The base datatype class for the decompiler.
Definition: type.hh:62
ParamUnassignedError(const string &s)
Constructor.
Definition: fspec.hh:29
void setIndCreateFormed(void)
Mark this trial as formed by indirect creation.
Definition: fspec.hh:201
void setThisPointer(bool val)
Toggle the this-call setting for this prototype.
Definition: fspec.hh:1246
void deriveInputMap(ParamActive *active) const
Given a list of input trials, derive the most likely input prototype.
Definition: fspec.hh:653
bool isRecoverSubcall(void) const
Are these trials for a call to a sub-function.
Definition: fspec.hh:242
virtual ProtoStore * clone(void) const
Clone the entire collection of parameter descriptions.
Definition: fspec.cc:2573
int4 getExtraPop(void) const
Get the general extrapop setting for this prototype.
Definition: fspec.hh:1280
int4 getGroupSize(void) const
Get the number of groups occupied by this.
Definition: fspec.hh:81
SubsortPosition subsorttype
The sub-sort object for a rangemap.
Definition: fspec.hh:130
OpCode
The op-code defining a specific p-code operation (PcodeOp)
Definition: opcodes.hh:35
A manager for different address spaces.
Definition: translate.hh:218
EffectRecord(void)
Constructor for use with restoreXml()
Definition: fspec.hh:317
void markUnref(void)
Mark that this trial has no Varnode representative.
Definition: fspec.hh:191
AddrSpace * getSpace(void) const
Get the address space containing this entry.
Definition: fspec.hh:94
type_metatype getType(void) const
Get the data-type class associated with this.
Definition: fspec.hh:85
AddrSpace * getSpacebase(void) const
Get the stack address space.
Definition: fspec.hh:1404
void setDotdotdot(bool val)
Toggle whether this takes variable arguments.
Definition: fspec.hh:1344
rangemap< ParamEntryRange > ParamEntryResolver
A map from offset to ParamEntry.
Definition: fspec.hh:141
vector< Datatype * > intypes
Input data-types.
Definition: fspec.hh:1131
virtual AddrSpace * getSpacebase(void) const
Get the address space associated with any stack based parameters in this list.
Definition: fspec.hh:527
int4 nonfloatgroup
Group of first entry which is not marked float.
Definition: fspec.hh:497
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:584
bool isParamCheckLow(void) const
Return true if there is a low overlap.
Definition: fspec.hh:100
ParamListRegister(void)
Constructor for use with restoreXml()
Definition: fspec.hh:563
void removeParam(int4 i)
Remove the i-th input parameter.
Definition: fspec.hh:1336
bool checkInputSplit(const Address &loc, int4 size, int4 splitpoint) const
Check if it makes sense to split a single storage location into two input parameters.
Definition: fspec.hh:1327
Container for data structures associated with a single function.
Definition: funcdata.hh:45
virtual bool checkJoin(const Address &hiaddr, int4 hisize, const Address &loaddr, int4 losize) const =0
Check if the given two storage locations can represent a single logical parameter.
int4 getSize(void) const
Get the number of bytes in this trial.
Definition: fspec.hh:181
void setInputErrors(bool val)
Toggle the input error setting for this prototype.
Definition: fspec.hh:1273
const ParamTrial & getTrialForInputVarnode(int4 slot) const
Get trial corresponding to the given input Varnode.
Definition: fspec.hh:1536
bool isReverseStack(void) const
Return true if parameters are allocated in reverse order.
Definition: fspec.hh:87
void initialize(const inittype &data, uintb f, uintb l)
Initialize the range.
Definition: fspec.hh:134
void assignParameterStorage(const vector< Datatype *> &typelist, vector< ParameterPieces > &res, bool ignoreOutputError)
Calculate input and output storage locations given a function prototype.
Definition: fspec.cc:1828
void setMaxPass(int4 val)
Set the maximum number of passes.
Definition: fspec.hh:249
AddrSpace * spacebase
Address space containing relative offset parameters.
Definition: fspec.hh:500
virtual bool isTypeLocked(void) const =0
Is the parameter data-type locked.
void deriveInputMap(ParamActive *active) const
Given a list of input trials, derive the most likely inputs for this prototype.
Definition: fspec.hh:1297
subsorttype getSubsort(void) const
Get the sub-subsort object.
Definition: fspec.hh:138
ParamListStandardOut(const ParamListStandardOut &op2)
Copy constructor.
Definition: fspec.hh:544
PcodeOp * getOp(void) const
Get the CALL or CALLIND corresponding to this.
Definition: fspec.hh:1467
void setModelLock(bool val)
Toggle the lock on the prototype model for this.
Definition: fspec.hh:1208
virtual Symbol * getSymbol(void) const
Retrieve the formal Symbol associated with this parameter.
Definition: fspec.hh:987
virtual Datatype * getType(void) const =0
Get the data-type associate with this.
vector< EffectRecord >::const_iterator effectEnd(void) const
Get an iterator to the last EffectRecord.
Definition: fspec.hh:703
A prototype model: a model for passing parameters between functions.
Definition: fspec.hh:615
bool isModelLocked(void) const
Is the prototype model for this locked.
Definition: fspec.hh:1197
uintb linetype
The linear element for a rangemap.
Definition: fspec.hh:129
bool checkInputSplit(const Address &loc, int4 size, int4 splitpoint) const
Check if it makes sense to split a single storage location into two input parameters.
Definition: fspec.hh:697
void setRemFormed(void)
Mark that this is formed by a INT_REM operation.
Definition: fspec.hh:199
void markKilledByCall(void)
Mark that this storage is killed-by-call.
Definition: fspec.hh:192
int4 getMaxInputDelay(void) const
Return the maximum heritage delay across all possible input parameters.
Definition: fspec.hh:1362
void setBadJumpTable(bool val)
Toggle whether call site looked like an indirect jump.
Definition: fspec.hh:1491
uintb getBase(void) const
Get the starting offset of this entry.
Definition: fspec.hh:95
int4 getGroup(void) const
Get the group id this belongs to.
Definition: fspec.hh:80
virtual int4 getMaxDelay(void) const
Return the maximum heritage delay across all possible parameters.
Definition: fspec.hh:529
void initActiveOutput(void)
Turn on analysis recovering the return value.
Definition: fspec.hh:1487
OpCode assumedOutputExtension(const Address &addr, int4 size, VarnodeData &res) const
Get the type of extension and containing return value location for the given storage.
Definition: fspec.hh:1397
int4 getExtraPop(void) const
Get the stack-pointer extrapop for this model.
Definition: fspec.hh:644
ParamListStandardOut(void)
Constructor.
Definition: fspec.hh:543
OpCode assumedOutputExtension(const Address &addr, int4 size, VarnodeData &res) const
Get the type of extension and containing return value location for the given storage.
Definition: fspec.hh:798
bool isUnref(void) const
Does this trial not have a Varnode representative.
Definition: fspec.hh:197
type_metatype
Definition: type.hh:33
virtual bool isHiddenReturn(void) const
Is this a pointer to storage for a return value.
Definition: fspec.hh:980
int4 getScore(void) const
Get the fitness score.
Definition: fspec.hh:865
void setConstructor(bool val)
Toggle whether this prototype is a constructor method.
Definition: fspec.hh:1254
virtual Address getAddress(void) const =0
Get the storage address for this parameter.
virtual void fillinMap(ParamActive *active) const =0
Given an unordered list of storage locations, calculate a function prototype.
bool unjustifiedInputParam(const Address &loc, int4 size, VarnodeData &res) const
Check if the given storage location looks like an unjustified input parameter.
Definition: fspec.hh:772
bool operator!=(const ProtoParameter &op2) const
Compare storage location and data-type for inequality.
Definition: fspec.hh:955
int4 getMaxPass(void) const
What is the maximum number of passes.
Definition: fspec.hh:248
void deriveOutputMap(ParamActive *active) const
Given a list of output trials, derive the most likely return value for this prototype.
Definition: fspec.hh:1304
LowlevelError(const string &s)
Initialize the error with an explanatory string.
Definition: error.hh:47
A collection of parameter descriptions without backing symbols.
Definition: fspec.hh:1106
int4 getOffset(void) const
Get the offset associated with this trial.
Definition: fspec.hh:185
A disjoint set of Ranges, possibly across multiple address spaces.
Definition: address.hh:203
ParamEntryRange(void)
Constructor for use with rangemap.
Definition: fspec.hh:133
void markInactive(void)
Mark that trial is not actively used.
Definition: fspec.hh:189
virtual void clearInput(int4 i)=0
Clear the input parameter at the specified slot.
virtual void assignMap(const vector< Datatype *> &proto, bool isinput, TypeFactory &typefactory, vector< ParameterPieces > &res) const
Given list of data-types, map the list positions to storage locations.
Definition: fspec.hh:585
Class for calculating "goodness of fit" of parameter trials against a prototype model.
Definition: fspec.hh:843
int4 numParams(void) const
Get the number of input parameters.
Definition: fspec.hh:1337
bool isParamCheckHigh(void) const
Return true if there is a high overlap.
Definition: fspec.hh:99
virtual bool isNameUndefined(void) const
Is the name of this parameter undefined.
Definition: fspec.hh:981
Raw components of a function prototype (obtained from parsing source code)
Definition: fspec.hh:1127
bool hasCondExeEffect(void) const
Is this trial possibly affected by conditional execution.
Definition: fspec.hh:204
bool isRemFormed(void) const
Is this formed by a INT_REM operation.
Definition: fspec.hh:200
A union of other input parameter passing models.
Definition: fspec.hh:578
int4 getInjectUponReturn(void) const
Get any upon-return injection id (or -1)
Definition: fspec.hh:1283
ParamListStandard(void)
Construct for use with restoreXml()
Definition: fspec.hh:511
AddrSpace * space
The address space.
Definition: pcoderaw.hh:34
int4 getMaxInputDelay(void) const
Return the maximum heritage delay across all possible input parameters.
Definition: fspec.hh:822
void freePlaceholderSlot(void)
Free the stack placeholder slot.
Definition: fspec.cc:1439
virtual AddrSpace * getSpacebase(void) const =0
Get the address space associated with any stack based parameters in this list.
int4 getParamshift(void) const
Get the parameter shift for this call site.
Definition: fspec.hh:1477
Datatype * getOutputType(void) const
Get the return value data-type.
Definition: fspec.hh:1339
virtual int4 getMaxDelay(void) const =0
Return the maximum heritage delay across all possible parameters.
Unordered parameter passing locations model.
Definition: fspec.hh:344
static uint4 lookupEffect(const vector< EffectRecord > &efflist, const Address &addr, int4 size)
Look up an effect from the given EffectRecord list.
Definition: fspec.cc:1857
bool hasThisPointer(void) const
Is this a prototype for a class method, taking a this pointer.
Definition: fspec.hh:1241
bool isDotdotdot(void) const
Return true if this takes a variable number of arguments.
Definition: fspec.hh:1343
bool checkInputJoin(const Address &hiaddr, int4 hisize, const Address &loaddr, int4 losize) const
Check if the given two input storage locations can represent a single logical parameter.
Definition: fspec.hh:674
int4 numModels(void) const
Get the number of constituent models.
Definition: fspec.hh:887
A parameter with a formal backing Symbol.
Definition: fspec.hh:1052
void setCondExeEffect(void)
Mark this trial as possibly affected by conditional execution.
Definition: fspec.hh:203
ProtoModel * getModel(int4 i) const
Get the i-th model.
Definition: fspec.hh:888
int4 characterizeAsInputParam(const Address &loc, int4 size) const
Characterize whether the given range overlaps parameter storage.
Definition: fspec.hh:717
Templates to define interval map containers.
int4 pointermax
If non-zero, maximum size of a data-type before converting to a pointer.
Definition: fspec.hh:495
const RangeList & getParamRange(void) const
Get the range of (possible) stack parameters.
Definition: fspec.hh:701
Datatype * type
The datatype of the parameter.
Definition: fspec.hh:296
virtual ~ProtoModelMerged(void)
Destructor.
Definition: fspec.hh:886
Address getAddress(void) const
Get the starting address of the affected range.
Definition: fspec.hh:323
int4 getSize(void) const
Get the type size.
Definition: type.hh:106
virtual bool isTypeLocked(void) const
Is the parameter data-type locked.
Definition: fspec.hh:976
Lowest level operation of the p-code language.
Definition: op.hh:58
Standard input parameter model.
Definition: fspec.hh:342
const RangeList & getLocalRange(void) const
Get the range of potential local stack variables.
Definition: fspec.hh:1340
bool hasMatchingModel(const FuncProto *op2) const
Does this have a matching model.
Definition: fspec.hh:1190
ParamEntry(int4 grp)
Constructor for use with restoreXml.
Definition: fspec.hh:78
void shrink(int4 i, const Address &addr, int4 sz)
Shrink the given trial to a new given range.
Definition: fspec.hh:270
bool isUnknownModel(void) const
Is prototype model officially "unknown".
Definition: fspec.hh:1198
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
bool isParamshiftApplied(void) const
Definition: fspec.hh:1174
Address addr
Storage address of the parameter.
Definition: fspec.hh:295
An unstructured model for passing input parameters to a function.
Definition: fspec.hh:561
void markUsed(void)
Mark the trial as a formal parameter.
Definition: fspec.hh:187
Prevents infinite loops.
Definition: varnode.hh:71
void setParamshift(int4 val)
Set a parameter shift for this call site.
Definition: fspec.hh:1476
bool hasThisPointer(void) const
Is this a model for (non-static) class methods.
Definition: fspec.hh:813
void finishPass(void)
Mark that an analysis pass has completed.
Definition: fspec.hh:250
bool isConstructor(void) const
Is this prototype for a class constructor method.
Definition: fspec.hh:1249
A contiguous range of memory that can be used to pass parameters.
Definition: fspec.hh:48
bool isIndCreateFormed(void) const
Is this trial formed by indirect creation.
Definition: fspec.hh:202
bool testShrink(int4 i, const Address &addr, int4 sz) const
Test if the given trial can be shrunk to the given range.
Definition: fspec.hh:263
static FuncCallSpecs * getFspecFromConst(const Address &addr)
Convert FspecSpace addresses to the underlying FuncCallSpecs object.
Definition: fspec.hh:1520
Architecture * getArch(void) const
Get the Architecture owning this.
Definition: fspec.hh:1180
const ParamEntry * getEntry(void) const
Get the model entry associated with this trial.
Definition: fspec.hh:184
ParamListRegister(const ParamListRegister &op2)
Copy constructor.
Definition: fspec.hh:564
uintb offset
The offset within the space.
Definition: pcoderaw.hh:35
bool isOutputActive(void) const
Return true if return value recovery analysis is active.
Definition: fspec.hh:1490
virtual Address getAddress(void) const
Get the storage address for this parameter.
Definition: fspec.hh:974
The interface to a translation engine for a processor.
Definition: translate.hh:293
uint4 hasEffect(const Address &addr, int4 size) const
Determine side-effect of this on the given memory range.
Definition: fspec.cc:1888
vector< EffectRecord >::const_iterator effectBegin(void) const
Get an iterator to the first EffectRecord.
Definition: fspec.hh:702
Is this Varnode storing a pointer to the actual symbol.
Definition: varnode.hh:105
A standard model for passing back return values from a function.
Definition: fspec.hh:541
virtual bool getBiggestContainedParam(const Address &loc, int4 size, VarnodeData &res) const =0
Pass-back the biggest parameter contained within the given range.
void clearActiveInput(void)
Turn off analysis recovering input parameters.
Definition: fspec.hh:1486
ProtoParameter * getParam(int4 i) const
Get the i-th input parameter.
Definition: fspec.hh:1335
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
int4 getAlign(void) const
Get the alignment of this entry.
Definition: fspec.hh:84
bool isConstructor(void) const
Is this model for class constructors.
Definition: fspec.hh:814
void setStackPlaceholderSlot(int4 slot)
Set the slot of the stack-pointer placeholder.
Definition: fspec.hh:1480
virtual bool isMerged(void) const
Is this a merged prototype model.
Definition: fspec.hh:891
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:545
bool isChecked(void) const
Has this trial been checked.
Definition: fspec.hh:193
InitData inittype
Initialization data for a ScopeMapper.
Definition: fspec.hh:131
The lowest level error generated by the decompiler.
Definition: error.hh:44
Description of the indirect effect a sub-function has on a memory range.
Definition: fspec.hh:305
A record describing how logical values are split.
Definition: translate.hh:195
The Name of the Varnode is locked.
Definition: varnode.hh:83
bool hasInputErrors(void) const
Has this prototype been marked as having an incorrect input parameter descriptions.
Definition: fspec.hh:1265
bool possibleOutputParamWithSlot(const Address &loc, int4 size, int4 &slot, int4 &slotsize) const
Pass-back the slot and slot size for the given storage location as a return value.
Definition: fspec.hh:760
void setExtraPop(int4 ep)
Set the general extrapop for this prototype.
Definition: fspec.hh:1281
int4 getMatchCallCount(void) const
Get the number of calls the caller makes to this sub-function.
Definition: fspec.hh:1478
ProtoParameter(void)
Constructor.
Definition: fspec.hh:905
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
void markFullyChecked(void)
Mark that all trials are checked.
Definition: fspec.hh:244
int4 getSlot(void) const
Get the slot associated with this trial.
Definition: fspec.hh:182
virtual Datatype * getType(void) const
Get the data-type associate with this.
Definition: fspec.hh:973
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:565
Class for storing ParamEntry objects in an interval range (rangemap)
Definition: fspec.hh:104
ProtoModel * model
(Optional) model on which prototype is based
Definition: fspec.hh:1128
virtual ~ProtoModel(void)
Destructor.
Definition: fspec.cc:1802
uint4 getComparableFlags(void) const
Get the comparable properties of this prototype.
Definition: fspec.hh:1411
bool possibleOutputParam(const Address &loc, int4 size) const
Does the given storage location make sense as a return value.
Definition: fspec.hh:736
bool isOutputLocked(void) const
Is the output data-type locked.
Definition: fspec.hh:1196
An XML element. A node in the DOM tree.
Definition: xml.hh:150
const RangeList & getParamRange(void) const
Get the range of potential stack parameters.
Definition: fspec.hh:1341
bool isExclusion(void) const
Return true if this holds a single parameter exclusively.
Definition: fspec.hh:86
bool possibleInputParamWithSlot(const Address &loc, int4 size, int4 &slot, int4 &slotsize) const
Pass-back the slot and slot size for the given storage location as an input parameter.
Definition: fspec.hh:748
int4 getReturnBytesConsumed(void) const
Get an estimate of the number of bytes consumed by callers of this prototype.
Definition: fspec.hh:1228
bool isBadJumpTable(void) const
Return true if this call site looked like an indirect jump.
Definition: fspec.hh:1492
vector< ParamEntryResolver * > resolverMap
Map from space id to resolver.
Definition: fspec.hh:499
uintb getOffset(void) const
Get the address offset.
Definition: address.hh:300
uint4 flags
additional attributes of the parameter
Definition: fspec.hh:297
list< ParamEntry > entry
The ordered list of parameter entries.
Definition: fspec.hh:498
void setEntry(const ParamEntry *ent, int4 off)
Set the model entry for this trial.
Definition: fspec.hh:186
virtual int4 characterizeAsParam(const Address &loc, int4 size) const =0
Characterize whether the given range overlaps parameter storage.
int4 getInjectId(void) const
Get the injection id associated with this.
Definition: fspec.hh:1222
bool hasMatchingModel(const ProtoModel *op2) const
Does this use the given model.
Definition: fspec.hh:1191
void clearStackPlaceholderSlot(void)
Release the stack-pointer placeholder.
Definition: fspec.hh:1482
static bool compareByEntryAddress(const FuncCallSpecs *a, const FuncCallSpecs *b)
Compare FuncCallSpecs by function entry address.
Definition: fspec.hh:1527
Datatype * outtype
Return data-type.
Definition: fspec.hh:1130
Does this varnode point to the return value storage location.
Definition: varnode.hh:106
A light-weight class for analyzing pointers and aliasing on the stack.
Definition: varmap.hh:108
int4 getInjectUponReturn(void) const
Get the inject uponreturn id.
Definition: fspec.hh:647
bool thisbeforeret
Does a this parameter come before a hidden return parameter.
Definition: fspec.hh:496
bool isUsed(void) const
Is this trial as a formal parameter.
Definition: fspec.hh:196
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:515
int4 getSize(void) const
Get the size of the memory range in bytes.
Definition: fspec.hh:82
uint4 size
The number of bytes in the location.
Definition: pcoderaw.hh:36
int4 getMinSize(void) const
Get the minimum size of a logical value contained in this.
Definition: fspec.hh:83
A collection of parameter descriptions backed by Symbol information.
Definition: fspec.hh:1080
bool checkInputJoin(const Address &hiaddr, int4 hisz, const Address &loaddr, int4 losz) const
Check if the given two input storage locations can represent a single logical parameter.
Definition: fspec.hh:1316
const string & getModelName(void) const
Get the prototype model name.
Definition: fspec.hh:1192
virtual bool isSizeTypeLocked(void) const
Is the size of the parameter locked.
Definition: fspec.hh:978
bool operator==(const ProtoParameter &op2) const
Compare storage location and data-type for equality.
Definition: fspec.hh:945
bool isStackGrowsNegative(void) const
Return true if the stack grows toward smaller addresses.
Definition: fspec.hh:812
bool isActive(void) const
Is this trial actively used in data-flow.
Definition: fspec.hh:194
virtual ProtoParameter * getOutput(void)=0
Get the return-value description.
An interval map container.
Definition: rangemap.hh:65
ParamTrial(const Address &ad, int4 sz, int4 sl)
Construct from components.
Definition: fspec.hh:179
virtual const string & getName(void) const
Get the name of the parameter ("" for return value)
Definition: fspec.hh:972
bool needsFinalCheck(void) const
Is a final check required.
Definition: fspec.hh:240
int4 getMaxOutputDelay(void) const
Return the maximum heritage delay across all possible return values.
Definition: fspec.hh:1370
virtual bool possibleParamWithSlot(const Address &loc, int4 size, int4 &slot, int4 &slotsize) const =0
Pass-back the slot and slot size for the given storage location as a parameter.
void finalize(void)
Fold-ins are finished, finalize this.
Definition: fspec.hh:583
ParamEntry * getParamEntry(void) const
Get pointer to actual ParamEntry.
Definition: fspec.hh:139
virtual bool isNameLocked(void) const
Is the parameter name locked.
Definition: fspec.hh:977
int4 getNumTrials(void) const
Get the number of trials in this container.
Definition: fspec.hh:236
EffectRecord(const EffectRecord &op2)
Copy constructor.
Definition: fspec.hh:318
uintb getFirst(void) const
Get the first address in the range.
Definition: fspec.hh:136
bool isStackGrowsNegative(void) const
Return true if the stack grows toward smaller addresses.
Definition: fspec.hh:1342
bool getBiggestContainedInputParam(const Address &loc, int4 size, VarnodeData &res) const
Pass-back the biggest input parameter contained within the given range.
Definition: fspec.hh:807
virtual bool checkSplit(const Address &loc, int4 size, int4 splitpoint) const =0
Check if it makes sense to split a single storage location into two parameters.
int4 getInjectUponEntry(void) const
Get the inject uponentry id.
Definition: fspec.hh:646
A function prototype.
Definition: fspec.hh:1147
Container class for all Datatype objects in an Architecture.
Definition: type.hh:380
int4 getNumPasses(void) const
How many trial analysis passes were performed.
Definition: fspec.hh:247
virtual OpCode assumedExtension(const Address &addr, int4 size, VarnodeData &res) const =0
Get the type of extension and containing parameter for the given storage.
int4 getModelExtraPop(void) const
Get the extrapop of the prototype model.
Definition: fspec.hh:1193
void setAddress(const Address &ad, int4 sz)
Reset the memory range of this trial.
Definition: fspec.hh:206
void setExtraPop(int4 ep)
Set the stack-pointer extrapop.
Definition: fspec.hh:645
Architecture * getArch(void) const
Get the owning Architecture.
Definition: fspec.hh:642
int4 numLikelyTrash(void) const
Get the number of likelytrash locations.
Definition: fspec.hh:704
bool checkOutputJoin(const Address &hiaddr, int4 hisize, const Address &loaddr, int4 losize) const
Check if the given two output storage locations can represent a single logical return value...
Definition: fspec.hh:686
int4 getStackPlaceholderSlot(void) const
Get the slot of the stack-pointer placeholder.
Definition: fspec.hh:1479
void clearActiveOutput(void)
Turn off analysis recovering the return value.
Definition: fspec.hh:1488
bool isInputActive(void) const
Return true if input parameter recovery analysis is active.
Definition: fspec.hh:1489
void markActive(void)
Mark that trial is actively used (in data-flow)
Definition: fspec.hh:188
bool isDestructor(void) const
Is this prototype for a class destructor method.
Definition: fspec.hh:1257
The base class for a symbol in a symbol table or scope.
Definition: database.hh:153
Reserved extrapop value meaning the function's extrapop is unknown.
Definition: fspec.hh:636
ParamActive * getActiveOutput(void)
Get the analysis object for return value recovery.
Definition: fspec.hh:1494
const string & getName(void) const
Get the name of the prototype model.
Definition: fspec.hh:641
A standard model for parameters as an ordered list of storage resources.
Definition: fspec.hh:491
void setSlot(int4 val)
Set the slot associated with this trial.
Definition: fspec.hh:183
virtual ~ProtoStore(void)
Constructor.
Definition: fspec.hh:997
ParamListMerged(void)
Constructor for use with restoreXml.
Definition: fspec.hh:580
void markNoUse(void)
Mark trial as definitely not a parameter.
Definition: fspec.hh:190
Container class for ParamTrial objects.
Definition: fspec.hh:223
OpCode assumedInputExtension(const Address &addr, int4 size, VarnodeData &res) const
Get the type of extension and containing input parameter for the given storage.
Definition: fspec.hh:785
string name
Identifier (function name) associated with prototype.
Definition: fspec.hh:1129
bool isDefinitelyNotUsed(void) const
Is this trial as definitely not a parameter.
Definition: fspec.hh:195
virtual void fillinMap(ParamActive *active) const
Given an unordered list of storage locations, calculate a function prototype.
Definition: fspec.hh:588
ParamListMerged(const ParamListMerged &op2)
Copy constructor.
Definition: fspec.hh:581
virtual bool unjustifiedContainer(const Address &loc, int4 size, VarnodeData &res) const =0
Check if the given storage location looks like an unjustified parameter.
const list< ParamEntry > & getEntry(void) const
Get the list of parameter entries.
Definition: fspec.hh:514
const VarnodeData & getLikelyTrash(int4 i) const
Get the i-th likelytrashh location.
Definition: fspec.hh:705
The Dataype of the Varnode is locked.
Definition: varnode.hh:82
A stand-alone parameter with no backing symbol.
Definition: fspec.hh:964
const RangeList & getLocalRange(void) const
Get the range of (possible) local stack variables.
Definition: fspec.hh:700
uintb getLast(void) const
Get the last address in the range.
Definition: fspec.hh:137
A special space for encoding FuncCallSpecs.
Definition: fspec.hh:283
A register or memory register that may be used to pass a parameter or return value.
Definition: fspec.hh:157
int4 getInjectUponEntry(void) const
Get any upon-entry injection id (or -1)
Definition: fspec.hh:1282
void setInline(bool val)
Toggle the in-line setting for functions with this prototype.
Definition: fspec.hh:1216
ProtoModel(Architecture *g)
Constructor for use with restoreXml()
Definition: fspec.cc:1756
void setOverride(bool val)
Toggle whether this is a call site override.
Definition: fspec.hh:1346
bool isKilledByCall(void) const
Is this storage killed-by-call.
Definition: fspec.hh:198
bool isFullyChecked(void) const
Are all trials checked with no new trials expected.
Definition: fspec.hh:243
bool operator!=(const EffectRecord &op2) const
Inequality operator.
Definition: fspec.hh:1561
ParameterBasic(const string &nm, const Address &ad, Datatype *tp, uint4 fl)
Construct from components.
Definition: fspec.hh:970
const Address & getAddress(void) const
Get the starting address of this trial.
Definition: fspec.hh:180
A function parameter viewed as a name, data-type, and storage address.
Definition: fspec.hh:903
virtual void restoreXml(const Element *el)
Restore this model from an XML stream.
Definition: fspec.cc:2247
virtual ~ParamList(void)
Destructor.
Definition: fspec.hh:347
void setDestructor(bool val)
Toggle whether this prototype is a destructor method.
Definition: fspec.hh:1262
bool isBigEndian(void) const
Return true if values in this space are big endian.
Definition: space.hh:408
The PcodeOp and PcodeOpBank classes.
const Address & getEntryAddress(void) const
Get the entry address of the callee.
Definition: fspec.hh:1472
AddrSpace * getSpacebase(void) const
Get the stack space associated with this model.
Definition: fspec.hh:811
int4 getEffectiveExtraPop(void) const
Get the specific extrapop associate with this call site.
Definition: fspec.hh:1474
Basic elements of a parameter: address, data-type, properties.
Definition: fspec.hh:294
bool isNoReturn(void) const
Does a function with this prototype never return.
Definition: fspec.hh:1233
OpCode assumedInputExtension(const Address &addr, int4 size, VarnodeData &res) const
Get the type of extension and containing input parameter for the given storage.
Definition: fspec.hh:1384
bool possibleInputParam(const Address &loc, int4 size) const
Does the given storage location make sense as an input parameter.
Definition: fspec.hh:727
void setAddress(const Address &addr)
Set (override) the callee's entry address.
Definition: fspec.hh:1466
void markNeedsFinalCheck(void)
Mark that a final check is required.
Definition: fspec.hh:241
A prototype model made by merging together other models.
Definition: fspec.hh:880
virtual bool isIndirectStorage(void) const
Is this really a pointer to the true parameter.
Definition: fspec.hh:979
ProtoParameter * getOutput(void) const
Get the return value.
Definition: fspec.hh:1338
int4 getSlot(const Address &addr, int4 skip) const
Calculate the slot occupied by a specific address.
Definition: fspec.cc:231
bool operator<(const EffectRecord &op2) const
Comparator for EffectRecords.
Definition: fspec.hh:1546
virtual ProtoParameter * getInput(int4 i)=0
Get the i-th input parameter (or NULL if it doesn't exist)
bool hasOutputErrors(void) const
Has this prototype been marked as having an incorrect return value description.
Definition: fspec.hh:1268
virtual int4 getNumInputs(void) const =0
Get the number of input parameters for this prototype.
virtual bool possibleParam(const Address &loc, int4 size) const =0
Does the given storage location make sense as a parameter.
bool isOverride(void) const
Return true if this is a call site override.
Definition: fspec.hh:1345
virtual int4 getSize(void) const
Get the number of bytes occupied by this parameter.
Definition: fspec.hh:975
A collection parameter descriptions making up a function prototype.
Definition: fspec.hh:995
void setEffectiveExtraPop(int4 epop)
Set the specific extrapop associate with this call site.
Definition: fspec.hh:1473
void setPlaceholderSlot(void)
Establish a stack placedholder slot.
Definition: fspec.hh:245
ParamTrial & getTrial(int4 i)
Get the i-th trial.
Definition: fspec.hh:237
bool isInline(void) const
Does this function get in-lined during decompilation.
Definition: fspec.hh:1210
vector< string > innames
Identifiers for input types.
Definition: fspec.hh:1132
ParamActive * getActiveInput(void)
Get the analysis object for input parameter recovery.
Definition: fspec.hh:1493
const string & getName(void) const
Get the function name associated with the callee.
Definition: fspec.hh:1471
bool operator==(const EffectRecord &op2) const
Equality operator.
Definition: fspec.hh:1554
Data defining a specific memory location.
Definition: pcoderaw.hh:33
Funcdata * getFuncdata(void) const
Get the Funcdata object associated with the called function.
Definition: fspec.hh:1468
void setOutputErrors(bool val)
Toggle the output error setting for this prototype.
Definition: fspec.hh:1278
A collection of Symbol objects within a single (namespace or functional) scope.
Definition: database.hh:413
int4 getSize(void) const
Get the size of the affected range.
Definition: fspec.hh:324
int4 getMaxOutputDelay(void) const
Return the maximum heritage delay across all possible return values.
Definition: fspec.hh:830
void setNoReturn(bool val)
Toggle the no-return setting for functions with this prototype.
Definition: fspec.hh:1238
bool hasModel(void) const
Does this prototype have a model.
Definition: fspec.hh:1188