decompiler  1.0.0
Classes
action.hh File Reference

Action, Rule, and other associates classes supporting transformations on function data-flow. More...

#include "block.hh"

Classes

class  ActionGroupList
 The list of groups defining a root Action. More...
 
class  Action
 Large scale transformations applied to the varnode/op graph. More...
 
class  ActionGroup
 A group of actions (generally) applied in sequence. More...
 
class  ActionRestartGroup
 Action which checks if restart (sub)actions have been generated and restarts itself. More...
 
class  Rule
 Class for performing a single transformation on a PcodeOp or Varnode. More...
 
class  ActionPool
 A pool of Rules that apply simultaneously. More...
 
class  ActionDatabase
 Database of root Action objects that can be used to transform a function. More...
 

Detailed Description

Action, Rule, and other associates classes supporting transformations on function data-flow.

TokenSplit::bloc_e
@ bloc_e
End of a control-flow section.
Definition: prettyprint.hh:300
RuleShiftPiece::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3437
EmitPrettyPrint::endDocument
virtual void endDocument(int4 id)
End a whole document of output.
Definition: prettyprint.cc:856
InjectCallfixupGhidra::restoreXml
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.cc:83
PrintC::option_inplace_ops
bool option_inplace_ops
Set to true if we should use '+=' '&=' etc.
Definition: printc.hh:116
TypeOp::inheritsSign
bool inheritsSign(void) const
Return true if the op-code inherits it signedness from its inputs.
Definition: typeop.hh:107
CircleRange::convertToBoolean
bool convertToBoolean(void)
Convert this to boolean.
Definition: rangeutil.cc:61
Architecture::infer_pointers
bool infer_pointers
True if we should infer pointers from constants that are likely addresses.
Definition: architecture.hh:129
Funcdata::spacebase
void spacebase(void)
Mark registers that map to a virtual address space.
Definition: funcdata.cc:202
Funcdata::recoverJumpTable
JumpTable * recoverJumpTable(PcodeOp *op, FlowInfo *flow, int4 &failuremode)
Recover destinations for a BRANCHIND by analyzing nearby data and control-flow.
Definition: funcdata_block.cc:559
PrintLanguage::NodePending::vn
const Varnode * vn
The implied Varnode.
Definition: printlanguage.hh:180
Database::mapScope
const Scope * mapScope(const Scope *qpoint, const Address &addr, const Address &usepoint) const
Determine the lowest-level Scope which might contain the given address as a Symbol.
Definition: database.cc:2962
FuncCallSpecs::lateRestriction
bool lateRestriction(const FuncProto &restrictedProto, vector< Varnode * > &newinput, Varnode *&newoutput)
Update this prototype to match a given (more specialized) prototype.
Definition: fspec.cc:4443
EmitNoXml::endVarDecl
virtual void endVarDecl(int4 id)
End a variable declaration.
Definition: prettyprint.hh:234
ValueSet::Equation
An external that can be applied to a ValueSet.
Definition: rangeutil.hh:119
OpBehaviorFloatNotEqual
CPUI_FLOAT_NOTEQUAL behavior.
Definition: opbehavior.hh:356
Rule::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: action.hh:243
Scope::clearUnlocked
virtual void clearUnlocked(void)=0
Clear all unlocked symbols from this scope.
Merge::collectCorrectable
bool collectCorrectable(const vector< Varnode * > &vlist, list< PcodeOp * > &oplist, vector< int4 > &slotlist, PcodeOp *op)
Check for for p-code op intersections that are correctable.
Definition: merge.cc:690
TypeOpIntAnd
Information about the INT_AND op-code.
Definition: typeop.hh:431
BlockGraph::spliceBlock
void spliceBlock(FlowBlock *bl)
Splice given FlowBlock together with its output.
Definition: block.cc:1497
LoadImageXml::manage
const AddrSpaceManager * manage
Manager of addresses.
Definition: loadimage_xml.hh:31
GhidraDecompCapability::GhidraDecompCapability
GhidraDecompCapability(const GhidraDecompCapability &op2)
Not implemented.
power2Divide
int4 power2Divide(int4 n, uint8 divisor, uint8 &q, uint8 &r)
Unsigned division of a power of 2 (upto 2^127) by a 64-bit divisor.
Definition: address.cc:870
SubvariableFlow::createNewOut
void createNewOut(ReplaceOp *rop, uintb mask)
Create a new, non-shadowing, subgraph variable node as an operation output.
Definition: subflow.cc:1028
OpBehaviorIntRight
CPUI_INT_RIGHT behavior.
Definition: opbehavior.hh:269
PrototypePieces::outtype
Datatype * outtype
Return data-type.
Definition: fspec.hh:1130
Comment::encodeCommentType
static uint4 encodeCommentType(const string &name)
Convert name string to comment property.
Definition: comment.cc:74
MemoryBank::getPageSize
int4 getPageSize(void) const
Get the number of bytes in a page for this memory bank.
Definition: memstate.hh:74
DynamicHash::buildVnDown
void buildVnDown(const Varnode *vn)
Add in edges between the given Varnode and any PcodeOp that reads it.
Definition: dynamic.cc:122
AncestorRealistic::State::vn
Varnode * vn
Varnode input to op, along path.
Definition: funcdata.hh:576
SubfloatFlow::setReplacement
TransformVar * setReplacement(Varnode *vn)
Create and return a placeholder associated with the given Varnode.
Definition: subflow.cc:1719
EmulateSnippet::getTempValue
uintb getTempValue(uintb offset) const
Retrieve a temporary register value directly.
Definition: emulateutil.cc:386
RuleFuncPtrEncoding
Eliminate ARM/THUMB style masking of the low order bits on function pointers.
Definition: ruleaction.hh:1399
Action::rule_oneactperfunc
@ rule_oneactperfunc
Makes a change only once per function.
Definition: action.hh:56
BlockGraph::orderBlocks
void orderBlocks(void)
Definition: block.hh:332
OpBehaviorIntZext
CPUI_INT_ZEXT behavior.
Definition: opbehavior.hh:173
AliasChecker::hasLocalAlias
bool hasLocalAlias(Varnode *vn) const
Return true if it looks like the given Varnode is aliased by a pointer.
Definition: varmap.cc:553
FlowBlock::addInEdge
void addInEdge(FlowBlock *b, uint4 lab)
Add an edge coming into this.
Definition: block.cc:62
ActionCopyMarker::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:978
PathMeld::clear
void clear(void)
Clear this to be an empty container.
Definition: jumptable.cc:914
PcodeOpBank::markIncidentalCopy
void markIncidentalCopy(PcodeOp *firstop, PcodeOp *lastop)
Mark any COPY ops in the given range as incidental.
Definition: op.cc:806
ActionMarkIndirectOnly::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:341
InjectPayload::output
vector< InjectParameter > output
List of output parameters.
Definition: pcodeinject.hh:93
HeritageInfo::delay
int4 delay
How many passes to delay heritage of this space.
Definition: heritage.hh:88
HighVariable::symbol
Symbol * symbol
The Symbol this HighVariable is tied to.
Definition: variable.hh:66
PrintLanguage::opFloatMult
virtual void opFloatMult(const PcodeOp *op)=0
Emit a FLOAT_MULT operator.
Architecture::trim_recurse_max
int4 trim_recurse_max
How many levels to let parameter trims recurse.
Definition: architecture.hh:122
ProtoModelMerged::modellist
vector< ProtoModel * > modellist
Constituent models being merged.
Definition: fspec.hh:881
DynamicHash::opedge
vector< ToOpEdge > opedge
The edges in the sub-graph.
Definition: dynamic.hh:68
comment.hh
A database interface for high-level language comments.
InjectPayloadGhidra
An injection payload that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:39
Translate::getRegisterName
virtual string getRegisterName(AddrSpace *base, uintb off, int4 size) const =0
Get the name of a register given its location.
AncestorRealistic::trial
ParamTrial * trial
Current trial being analyzed for suitability.
Definition: funcdata.hh:604
PcodeEmitCache::opcache
vector< PcodeOpRaw * > & opcache
The cache of current p-code ops.
Definition: emulate.hh:279
AddrSpaceManager::AddrSpaceManager
AddrSpaceManager(void)
Construct an empty address space manager.
Definition: translate.cc:178
ValueSet::numParams
int4 numParams
Number of input parameters to defining operation.
Definition: rangeutil.hh:130
CompilerTag::id
string id
Unique id for this compiler.
Definition: sleigh_arch.hh:32
circularqueue
A circular buffer template.
Definition: prettyprint.hh:605
TypeOpIntLess
Information about the INT_LESS op-code.
Definition: typeop.hh:333
PathMeld::getEarliestOp
PcodeOp * getEarliestOp(int4 pos) const
Find earliest PcodeOp that has a specific common Varnode as input.
Definition: jumptable.cc:981
ProtoStore::saveXml
virtual void saveXml(ostream &s) const =0
Save any parameters that are not backed by symbols to an XML stream.
MapIterator::operator++
MapIterator & operator++(void)
Pre-increment the iterator.
Definition: database.cc:757
TypeOpCallother::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:720
JumpBasicOverride::setupTrivial
void setupTrivial(void)
Convert this to a trivial model.
Definition: jumptable.cc:1754
Cover::getCoverBlock
const CoverBlock & getCoverBlock(int4 i) const
Get the CoverBlock corresponding to the i-th block.
Definition: cover.cc:251
RuleSubvarSext
Perform SubvariableFlow analysis triggered by INT_SEXT.
Definition: ruleaction.hh:1314
Emulate::executeBinary
virtual void executeBinary(void)=0
Execute a binary arithmetic/logical operation.
OptionCommentHeader
Toggle whether different comment types are emitted by the decompiler in the header for a function.
Definition: options.hh:177
transform.hh
Classes for building large scale transforms of function data-flow.
PrintC::opFloatLess
virtual void opFloatLess(const PcodeOp *op)
Emit a FLOAT_LESS operator.
Definition: printc.hh:266
Varnode::create_index
uint4 create_index
A unique one-up index assigned to Varnode at its creation.
Definition: varnode.hh:125
PrintC::opIntScarry
virtual void opIntScarry(const PcodeOp *op)
Emit a INT_SCARRY operator.
Definition: printc.hh:245
PcodeOp::usesSpacebasePtr
bool usesSpacebasePtr(void) const
Return true if this LOADs or STOREs from a dynamic spacebase pointer.
Definition: op.hh:209
ArchitectureGhidra::readToAnyBurst
static int4 readToAnyBurst(istream &s)
Read the next message protocol marker.
Definition: ghidra_arch.cc:62
Funcdata::newVarnodeOut
Varnode * newVarnodeOut(int4 s, const Address &m, PcodeOp *op)
Create a new output Varnode.
Definition: funcdata_varnode.cc:99
ConditionalJoin::moveCbranch
void moveCbranch(void)
Remove the other CBRANCH.
Definition: blockaction.cc:2023
RulePtrsubUndo
Remove PTRSUB operations with mismatched data-type information.
Definition: ruleaction.hh:1038
ValueSet::typeCode
int4 typeCode
0=pure constant 1=stack relative
Definition: rangeutil.hh:129
RangeHint::fixed
@ fixed
A data-type with a fixed size.
Definition: varmap.hh:75
RuleSplitFlow::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7336
HighVariable::unmerged
@ unmerged
Set if part of a multi-entry Symbol but did not get merged with other SymbolEntrys.
Definition: variable.hh:54
TypeOpFloatMult
Information about the FLOAT_MULT op-code.
Definition: typeop.hh:594
GhidraCommand::sout
ostream & sout
The output stream to the Ghidra client.
Definition: ghidra_process.hh:74
ScopeMapper::scope
Scope * scope
The Scope owning this address range.
Definition: database.hh:810
LanedRegister::LanedIterator
Class for iterating over possible lane sizes.
Definition: transform.hh:92
FloatFormat::normalized
@ normalized
A normal floating-point number.
Definition: float.hh:34
FlowInfo::testHardInlineRestrictions
bool testHardInlineRestrictions(Funcdata *inlinefd, PcodeOp *op, Address &retaddr)
For in-lining using the hard model, make sure some restrictions are met.
Definition: flow.cc:1106
ProtoModelMerged::intersectLikelyTrash
void intersectLikelyTrash(const vector< VarnodeData > &trashlist)
Fold likelytrash locations into this model.
Definition: fspec.cc:2150
FlushNative
Command to flush all symbols associated with a Program (executable)
Definition: ghidra_process.hh:135
TypeOpIntCarry
Information about the INT_CARRY op-code.
Definition: typeop.hh:383
RuleCondNegate::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:927
TraceDAG::BlockTrace::derivedbp
BranchPoint * derivedbp
BranchPoint blocker this traces into.
Definition: blockaction.hh:133
PcodeOpRaw::behave
OpBehavior * behave
The opcode for this operation.
Definition: pcoderaw.hh:95
ScopeInternal::getCategorySymbol
virtual Symbol * getCategorySymbol(int4 cat, int4 ind) const
Retrieve a Symbol by index within a specific category.
Definition: database.cc:2672
Scope::queryByAddr
SymbolEntry * queryByAddr(const Address &addr, const Address &usepoint) const
Get Symbol with matching address.
Definition: database.cc:1153
ProtoParameter::getName
virtual const string & getName(void) const =0
Get the name of the parameter ("" for return value)
ActionFuncLinkOutOnly::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1501
partmap::getValue
_valuetype & getValue(const _linetype &pnt)
Get the value object at a point.
Definition: partmap.hh:81
RuleConcatCommute
Commute PIECE with INT_AND, INT_OR, and INT_XOR.
Definition: ruleaction.hh:764
ConditionalExecution::getNewMulti
Varnode * getNewMulti(PcodeOp *op, BlockBasic *bl)
Create a MULTIEQUAL in the given block that will hold data-flow from the given PcodeOp.
Definition: condexe.cc:557
SeqNum::restoreXml
static SeqNum restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore a SeqNum from parsed XML.
Definition: address.cc:56
AddrSpace::AddrSpace
AddrSpace(AddrSpaceManager *m, const Translate *t, spacetype tp, const string &nm, uint4 size, uint4 ws, int4 ind, uint4 fl, int4 dl)
Definition: space.cc:39
TokenSplit::tokenstring
@ tokenstring
A token representing actual content.
Definition: prettyprint.hh:284
EmulateSnippet::executeCallother
virtual void executeCallother(void)
Standard behavior for a user-defined p-code op.
Definition: emulateutil.cc:246
Scope::findByName
virtual void findByName(const string &name, vector< Symbol * > &res) const =0
Find a Symbol by name within this Scope.
BfdArchitecture::BfdArchitecture
BfdArchitecture(const string &fname, const string &targ, ostream *estream)
Constructor.
Definition: bfd_arch.cc:122
RuleFloatCast::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1380
SetAction::actionstring
string actionstring
The root Action to switch to.
Definition: ghidra_process.hh:204
RuleSignNearMult::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1201
ScopeInternal::nametree
SymbolNameTree nametree
The set of Symbol objects, sorted by name.
Definition: database.hh:730
ActionAssignHigh::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:330
LoopBody::getCurrentBounds
FlowBlock * getCurrentBounds(FlowBlock **top, FlowBlock *graph)
Return current loop bounds (head and bottom).
Definition: blockaction.cc:90
ParameterBasic::resetSizeLockType
virtual void resetSizeLockType(TypeFactory *factory)
Clear this parameter's data-type preserving any size-lock.
Definition: fspec.cc:2295
EmulateMemory::executeMultiequal
virtual void executeMultiequal(void)
Standard behavior for a MULTIEQUAL (phi-node)
Definition: emulate.cc:296
CPUI_FLOAT_ROUND
@ CPUI_FLOAT_ROUND
Round towards nearest.
Definition: opcodes.hh:106
AddrSpaceManager::constantspace
AddrSpace * constantspace
Quick reference to constant space.
Definition: translate.hh:223
ConstantPoolInternal::getRecord
virtual const CPoolRecord * getRecord(const vector< uintb > &refs) const
Retrieve a constant pool record (CPoolRecord) given a reference to it.
Definition: cpool.cc:209
RuleTrivialArith::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2362
TypeUnicode::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:351
rangeutil.hh
Documentation for the CircleRange class.
FlowBlock::FlowBlock
FlowBlock(void)
Construct a block with no edges.
Definition: block.cc:50
SeqNum::getTime
uintm getTime(void) const
Get the time field of a sequence number.
Definition: address.hh:129
xml_escape
void xml_escape(ostream &s, const char *str)
Send the given character array to a stream, escaping characters with special XML meaning.
Range::operator<
bool operator<(const Range &op2) const
Sorting operator for Ranges.
Definition: address.hh:189
TokenSplit::size
int4 size
Number of content characters or other size information.
Definition: prettyprint.hh:343
JumpTable::switchVarConsume
uintb switchVarConsume
Bits of the switch variable being consumed.
Definition: jumptable.hh:517
RuleOrCollapse::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:144
PrintCCapability::printCCapability
static PrintCCapability printCCapability
The singleton instance.
Definition: printc.hh:33
SubvariableFlow::oplist
list< ReplaceOp > oplist
Storage for subgraph op nodes.
Definition: subflow.hh:88
OptionJumpLoad::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:736
Heritage::clearInfoList
void clearInfoList(void)
Reset heritage status for all address spaces.
Definition: heritage.cc:143
ActionPool::rule_index
int4 rule_index
Iterator over Rules for one OpCode.
Definition: action.hh:263
RuleConcatLeftShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4589
SubvariableFlow::PatchRecord::parameter_patch
@ parameter_patch
Convert a CALL/CALLIND/RETURN/BRANCHIND parameter into logical value.
Definition: subflow.hh:69
SegmentOp::getNumVariableTerms
virtual int4 getNumVariableTerms(void) const
Get the number of input Varnodes expected.
Definition: userop.hh:213
ContextDatabase::saveTracked
static void saveTracked(ostream &s, const Address &addr, const TrackedSet &vec)
Save all tracked register values for a specific address to an XML stream.
Definition: globalcontext.cc:69
Funcdata::clearSymbolLinks
void clearSymbolLinks(HighVariable *high)
Clear Symbols attached to Varnodes in the given HighVariable.
Definition: funcdata_varnode.cc:927
HighVariable::printCover
void printCover(ostream &s) const
Print details of the cover for this (for debug purposes)
Definition: variable.hh:99
ContextDatabase::getRegionToChangePoint
virtual void getRegionToChangePoint(vector< uintm * > &res, const Address &addr, int4 num, uintm mask)=0
Grab the context blob(s) starting at the given address up to the first point of change.
TypeArray::TypeArray
TypeArray(int4 n, Datatype *ao)
Construct given an array size and element data-type.
Definition: type.hh:257
CastStrategy::SIGNED_EXTENSION
@ SIGNED_EXTENSION
The value is promoted using signed extension.
Definition: cast.hh:50
PrintC::genericFunctionName
virtual string genericFunctionName(const Address &addr)
Create a generic function name base on the entry point address.
Definition: printc.cc:2874
Translate::getAllRegisters
virtual void getAllRegisters(map< VarnodeData, string > &reglist) const =0
Get a list of all register names and the corresponding location.
ParamList::assumedExtension
virtual OpCode assumedExtension(const Address &addr, int4 size, VarnodeData &res) const =0
Get the type of extension and containing parameter for the given storage.
Action::Action
Action(uint4 f, const string &nm, const string &g)
Base constructor for an Action.
Definition: action.cc:25
TreeHandler::endPrefixMapping
virtual void endPrefixMapping(const string &prefix)
Finish the current prefix.
Definition: xml.hh:228
ScopeGhidra::flagbaseDefault
partmap< Address, uint4 > flagbaseDefault
Default boolean properties on memory.
Definition: database_ghidra.hh:40
AddrSpaceManager::restoreXmlSpace
AddrSpace * restoreXmlSpace(const Element *el, const Translate *trans)
Add a space to the model based an on XML tag.
Definition: translate.cc:200
JumpModel::buildAddresses
virtual void buildAddresses(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable, vector< LoadTable > *loadpoints) const =0
Construct the explicit list of target addresses (the Address Table) from this model.
Heritage::deadRemovalAllowed
bool deadRemovalAllowed(AddrSpace *spc) const
Return true if it is safe to remove dead code.
Definition: heritage.cc:2394
ParamUnassignedError
Exception thrown when a prototype can't be modeled properly.
Definition: fspec.hh:28
ConditionalJoin::cbranch1
PcodeOp * cbranch1
CBRANCH at bottom of block1.
Definition: blockaction.hh:249
TrackedContext::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore this from an XML stream.
Definition: globalcontext.cc:47
ProtoStore
A collection parameter descriptions making up a function prototype.
Definition: fspec.hh:995
PrintLanguage::Atom::ct
const Datatype * ct
A type associated with the token.
Definition: printlanguage.hh:202
ConditionalExecution::iblock
BlockBasic * iblock
The block where flow is (unnecessarily) coming together.
Definition: condexe.hh:135
ProtoModel::getMaxOutputDelay
int4 getMaxOutputDelay(void) const
Return the maximum heritage delay across all possible return values.
Definition: fspec.hh:830
Action::lcount
int4 lcount
Changes not including last call to apply()
Definition: action.hh:78
LaneDivide::buildStore
bool buildStore(PcodeOp *op, int4 numLanes, int4 skipLanes)
Split a given CPUI_STORE operation into a sequence of STOREs of individual lanes.
Definition: subflow.cc:2161
PcodeOpBank::fallthru
PcodeOp * fallthru(const PcodeOp *op) const
Find the PcodeOp considered a fallthru of the given PcodeOp.
Definition: op.cc:845
PrintC::emitCommentFuncHeader
void emitCommentFuncHeader(const Funcdata *fd)
Emit comments in the given function's header.
Definition: printc.cc:2788
ActionOutputPrototype::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3848
EmitPrettyPrint::stopComment
virtual void stopComment(int4 id)
End a comment block.
Definition: prettyprint.cc:1121
Scope::getCategorySymbol
virtual Symbol * getCategorySymbol(int4 cat, int4 ind) const =0
Retrieve a Symbol by index within a specific category.
PrintC::type_expr_nospace
static OpToken type_expr_nospace
Type declaration with no space.
Definition: printc.hh:111
ActionExtraPopSetup::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1366
CommentDatabaseInternal::saveXml
virtual void saveXml(ostream &s) const
Save all comments in the container to an XML stream.
Definition: comment.cc:239
FloatFormat::size
int4 size
Size of float in bytes (this format)
Definition: float.hh:41
PrintC::emitPrototypeOutput
void emitPrototypeOutput(const FuncProto *proto, const Funcdata *fd)
Emit the output data-type of a function prototype.
Definition: printc.cc:1807
Heritage::processJoins
void processJoins(void)
Split join-space Varnodes up into their real components.
Definition: heritage.cc:1838
BlockGraph::newBlock
FlowBlock * newBlock(void)
Build a new plain FlowBlock.
Definition: block.cc:1559
JumpBasicOverride::setAddresses
void setAddresses(const vector< Address > &adtable)
Manually set the address table for this model.
Definition: jumptable.cc:1651
ValueSetSolver::generateTrueEquation
void generateTrueEquation(Varnode *vn, PcodeOp *op, int4 slot, int4 type, const CircleRange &range)
Generate an equation given a true constraint and the input/output Varnodes it affects.
Definition: rangeutil.cc:2052
BreakTableCallBack::addresscallback
map< Address, BreakCallBack * > addresscallback
a container of pcode based breakpoints
Definition: emulate.hh:140
ContentHandler
The SAX interface for parsing XML documents.
Definition: xml.hh:77
RuleFuncPtrEncoding::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1402
Rule2Comp2Sub::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6263
EmulatePcodeOp::glb
Architecture * glb
The underlying Architecture for the program being emulated.
Definition: emulateutil.hh:43
Varnode::namelock
@ namelock
The Name of the Varnode is locked.
Definition: varnode.hh:83
Symbol::flags
uint4 flags
Varnode-like properties of the symbol.
Definition: database.hh:162
PrintLanguage::readUtf16
static int4 readUtf16(const uint1 *buf, bool bigend)
Read a 2-byte UTF16 element from a byte array.
Definition: printlanguage.cc:528
VarnodeCompareDefLoc::operator()
bool operator()(const Varnode *a, const Varnode *b) const
Functional comparison operator.
Definition: varnode.cc:52
ParamList::p_standard
@ p_standard
Standard input parameter model.
Definition: fspec.hh:342
ActionMarkImplied::isPossibleAlias
static bool isPossibleAlias(Varnode *vn1, Varnode *vn2, int4 depth)
Check for possible duplicate value.
Definition: coreaction.cc:2814
ConstantPool::restoreXmlRecord
const CPoolRecord * restoreXmlRecord(const vector< uintb > &refs, const Element *el, TypeFactory &typegrp)
Restore a CPoolRecord given a reference and an XML stream.
Definition: cpool.cc:166
AddrSpace::index
int4 index
An integer identifier for the space.
Definition: space.hh:107
Architecture::getModel
ProtoModel * getModel(const string &nm) const
Get a specific PrototypeModel.
Definition: architecture.cc:171
MemoryState::setValue
void setValue(AddrSpace *spc, uintb off, int4 size, uintb cval)
Set a value on the memory state.
Definition: memstate.cc:650
ParamListStandard::checkJoin
virtual bool checkJoin(const Address &hiaddr, int4 hisize, const Address &loaddr, int4 losize) const
Check if the given two storage locations can represent a single logical parameter.
Definition: fspec.cc:887
ContextInternal::FreeArray::reset
void reset(int4 sz)
Resize the context blob, preserving old values.
Definition: globalcontext.cc:261
CircleRange::setNZMask
bool setNZMask(uintb nzmask, int4 size)
Set the range based on a putative mask.
Definition: rangeutil.cc:670
RuleBoolZext
Simplify boolean expressions of the form zext(V) * -1.
Definition: ruleaction.hh:508
PrintLanguage::only_branch
@ only_branch
Print only the branch instruction.
Definition: printlanguage.hh:146
SplitVarnode
Definition: double.hh:22
ParamEntryRange::SubsortPosition
Helper class for subsorting on position.
Definition: fspec.hh:120
ConditionMarker::finalJudgement
bool finalJudgement(Varnode *vn)
Determine if the two boolean expressions always produce the same or complementary values.
Definition: condexe.cc:293
PcodeOp::inrefs
vector< Varnode * > inrefs
The ordered list of input Varnodes for this op.
Definition: op.hh:122
ActionGroup::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: action.cc:489
Element::addChild
void addChild(Element *child)
Add a new child Element to the model, with this as the parent.
Definition: xml.hh:175
RuleAndCommute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:321
ProtoModel::lookupEffect
static uint4 lookupEffect(const vector< EffectRecord > &efflist, const Address &addr, int4 size)
Look up an effect from the given EffectRecord list.
Definition: fspec.cc:1854
TypeOp::recoverInputUnary
uintb recoverInputUnary(int4 sizeout, uintb out, int4 sizein) const
Reverse the unary op-code operation, recovering a constant input value.
Definition: typeop.hh:101
ParameterBasic::setTypeLock
virtual void setTypeLock(bool val)
Toggle the lock on the data-type.
Definition: fspec.cc:2262
BfdArchitecture::saveXml
virtual void saveXml(ostream &s) const
Serialize this architecture to XML.
Definition: bfd_arch.cc:129
PrintLanguage
The base class API for emitting a high-level language.
Definition: printlanguage.hh:134
ProtoParameter::overrideSizeLockType
virtual void overrideSizeLockType(Datatype *ct)=0
Change (override) the data-type of a size-locked parameter.
OptionSetAction
Establish a new root Action for the decompiler.
Definition: options.hh:195
HighVariable::compareJustLoc
static bool compareJustLoc(const Varnode *a, const Varnode *b)
Compare based on storage location.
Definition: variable.cc:184
Funcdata::markIndirectCreation
void markIndirectCreation(PcodeOp *indop, bool possibleOutput)
Convert CPUI_INDIRECT into an indirect creation.
Definition: funcdata_op.cc:686
Funcdata::opSetAllInput
void opSetAllInput(PcodeOp *op, const vector< Varnode * > &vvec)
Set all input Varnodes for the given PcodeOp simultaneously.
Definition: funcdata_op.cc:240
rangemap::AddrRange
The internal sub-range object for the interval map.
Definition: rangemap.hh:75
PcodeOp::commutative
@ commutative
Order of input parameters does not matter.
Definition: op.hh:83
PcodeOpRaw::in
vector< VarnodeData * > in
Raw varnode inputs to this op.
Definition: pcoderaw.hh:98
MemoryHashOverlay::MemoryHashOverlay
MemoryHashOverlay(AddrSpace *spc, int4 ws, int4 ps, int4 hashsize, MemoryBank *ul)
Constructor for hash overlay.
Definition: memstate.cc:600
TypeOpPtradd::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1635
PcodeEmit::restoreXmlOp
void restoreXmlOp(const Element *el, const AddrSpaceManager *trans)
Emit pcode directly from an XML tag.
Definition: translate.cc:884
SubvariableFlow::doesAndClear
static int4 doesAndClear(PcodeOp *andop, uintb mask)
Return slot of constant if INT_AND op clears all bits in mask, otherwise -1.
Definition: subflow.cc:40
FunctionSymbol::getBytesConsumed
virtual int4 getBytesConsumed(void) const
Get number of bytes consumed within the address->symbol map.
Definition: database.hh:262
EmulatePcodeCache::EmulatePcodeCache
EmulatePcodeCache(Translate *t, MemoryState *s, BreakTable *b)
Pcode cache emulator constructor.
Definition: emulate.cc:329
EmitXml::beginStatement
virtual int4 beginStatement(const PcodeOp *op)
Begin a source code statement.
Definition: prettyprint.cc:122
RuleFloatCast::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:8095
ScopeInternal::insertNameTree
void insertNameTree(Symbol *sym)
Insert a Symbol into the nametree.
Definition: database.cc:2571
AncestorRealistic::State::seen_solid1
@ seen_solid1
Indicates a solid movement into anything other than slot 0 occurred.
Definition: funcdata.hh:572
Translate::printAssembly
virtual int4 printAssembly(AssemblyEmit &emit, const Address &baseaddr) const =0
Disassemble a single machine instruction.
TransformOp::opc
OpCode opc
Opcode of the new op.
Definition: transform.hh:75
ConditionalJoin::findDups
bool findDups(void)
Search for duplicate conditional expressions.
Definition: blockaction.cc:1892
ValueSet::addEquation
void addEquation(int4 slot, int4 type, const CircleRange &constraint)
Insert an equation restricting this value set.
Definition: rangeutil.cc:1535
ConditionalJoin::mergeneed
map< MergePair, Varnode * > mergeneed
Map from the MergePair of Varnodes to the merged Varnode.
Definition: blockaction.hh:252
ValueSetRead::equationTypeCode
int4 equationTypeCode
Type code of the associated equation.
Definition: rangeutil.hh:183
Database::setRange
void setRange(Scope *scope, const RangeList &rlist)
Set the ownership range for a Scope.
Definition: database.cc:2859
SleighBase::reregisterContext
void reregisterContext(void)
Reregister context fields for a new executable.
Definition: sleighbase.cc:67
EffectRecord::type
uint4 type
The type of effect.
Definition: fspec.hh:315
PcodeOpBank::begin
PcodeOpTree::const_iterator begin(const Address &addr) const
Start of all PcodeOps at one Address.
Definition: op.cc:881
Action::count_apply
uint4 count_apply
Number of times apply() made changes.
Definition: action.hh:84
DynamicHash::uniqueHash
void uniqueHash(const Varnode *root, Funcdata *fd)
Select a unique hash for the given Varnode.
Definition: dynamic.cc:330
ActionFinalStructure
Perform final organization of the control-flow structure.
Definition: blockaction.hh:309
Database::~Database
~Database(void)
Destructor.
Definition: database.cc:2776
PcodeOp::returns
@ returns
This instruction returns to caller.
Definition: op.hh:70
ActionSegmentize::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: coreaction.hh:125
Funcdata::jumpvec
vector< JumpTable * > jumpvec
List of jump-tables for this function.
Definition: funcdata.hh:74
Merge::findSingleCopy
static void findSingleCopy(HighVariable *high, vector< Varnode * > &singlelist)
Find instance Varnodes that copied to from outside the given HighVariable.
Definition: merge.cc:919
TypeOpFloatAdd::TypeOpFloatAdd
TypeOpFloatAdd(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1391
FlowInfo::outofbounds_present
@ outofbounds_present
Indicate we have encountered flow out of the specified range.
Definition: flow.hh:66
AddrSpace::getDeadcodeDelay
int4 getDeadcodeDelay(void) const
Get number of passes before deadcode removal is allowed.
Definition: space.hh:310
EmitPrettyPrint::tagType
virtual void tagType(const char *ptr, syntax_highlight hl, const Datatype *ct)
Emit a data-type identifier.
Definition: prettyprint.cc:1026
BlockSwitch::getSwitchType
const Datatype * getSwitchType(void) const
Get the data-type of the switch variable.
Definition: block.cc:3122
Heritage::getInfo
const HeritageInfo * getInfo(AddrSpace *spc) const
Get the heriage status for the given address space.
Definition: heritage.hh:223
FuncProto::custom_storage
@ custom_storage
Parameter storage is custom (not derived from ProtoModel)
Definition: fspec.hh:1157
RuleShiftAnd::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:817
PrintLanguage::~PrintLanguage
virtual ~PrintLanguage(void)
Destructor.
Definition: printlanguage.cc:73
PcodeOp::call
@ call
This instruction calls a subroutine.
Definition: op.hh:69
Merge::merge
bool merge(HighVariable *high1, HighVariable *high2, bool isspeculative)
Perform low-level details of merging two HighVariables if possible.
Definition: merge.cc:1377
ProtoModel::possibleInputParam
bool possibleInputParam(const Address &loc, int4 size) const
Does the given storage location make sense as an input parameter.
Definition: fspec.hh:727
TypeOpIntSrem::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1316
JumpValuesRange::clone
virtual JumpValues * clone(void) const
Clone this iterator.
Definition: jumptable.cc:312
ArchitectureGhidra::getCPoolRef
Document * getCPoolRef(const vector< uintb > &refs)
Resolve a constant pool reference.
Definition: ghidra_arch.cc:661
PcodeOp::mark
@ mark
Used by many algorithms that need to detect loops or avoid repeats.
Definition: op.hh:82
AddrSpace::programspecific
@ programspecific
Space is specific to a particular loadimage.
Definition: space.hh:80
GuardRecord::oneOffMatch
static int4 oneOffMatch(PcodeOp *op1, PcodeOp *op2)
Return 1 if the two given PcodeOps produce exactly the same value, 0 if otherwise.
Definition: jumptable.cc:640
CommentDatabase::addCommentNoDuplicate
virtual bool addCommentNoDuplicate(uint4 tp, const Address &fad, const Address &ad, const string &txt)=0
Add a new comment to the container, making sure there is no duplicate.
TokenSplit::cinv_t
@ cinv_t
End of an arbitrary (invisible) grouping.
Definition: prettyprint.hh:320
RuleLogic2Bool::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2854
SleighArchitecture::restoreXmlHeader
void restoreXmlHeader(const Element *el)
Restore from XML basic attributes of an executable.
Definition: sleigh_arch.cc:322
PrintLanguage::opIntSrem
virtual void opIntSrem(const PcodeOp *op)=0
Emit a INT_SREM operator.
RuleDumptyHump::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4859
RuleStructOffset0::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6006
PrintLanguage::opIntAnd
virtual void opIntAnd(const PcodeOp *op)=0
Emit a INT_AND operator.
RuleDoubleArithShift
Simplify two sequential INT_SRIGHT: (x s>> #c) s>> #d => x s>> saturate(#c + #d)
Definition: ruleaction.hh:368
TypeOpCpoolref::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:768
Varnode::persist
@ persist
Persists after (and before) function.
Definition: varnode.hh:91
BreakTableCallBack::setEmulate
virtual void setEmulate(Emulate *emu)
Associate an emulator with all breakpoints in the table.
Definition: emulate.cc:52
sleigh_arch.hh
Architecture objects that use a Translate object derived from Sleigh.
RuleDoubleIn::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: double.cc:2865
PcodeEmit
Abstract class for emitting pcode to an application.
Definition: translate.hh:76
ProtoStore::clone
virtual ProtoStore * clone(void) const =0
Clone the entire collection of parameter descriptions.
Funcdata::switchEdge
void switchEdge(FlowBlock *inblock, BlockBasic *outbefore, FlowBlock *outafter)
Switch an outgoing edge from the given source block to flow into another block.
Definition: funcdata_block.cc:960
ConditionalExecution::getReplacementRead
Varnode * getReplacementRead(PcodeOp *op, BlockBasic *bl)
Find a replacement Varnode for the output of the given PcodeOp that is read in the given block.
Definition: condexe.cc:588
AddrSpace::compareByIndex
static bool compareByIndex(const AddrSpace *a, const AddrSpace *b)
Compare two spaces by their index.
Definition: space.hh:522
PrototypePieces::model
ProtoModel * model
(Optional) model on which prototype is based
Definition: fspec.hh:1128
Varnode::updateType
bool updateType(Datatype *ct, bool lock, bool override)
(Possibly) set the Datatype given various restrictions
Definition: varnode.cc:419
AddrSpaceManager::iopspace
AddrSpace * iopspace
Space for internal pcode op pointers.
Definition: translate.hh:226
FlowInfo::visited
map< Address, VisitStat > visited
Map of machine instructions that have been visited so far.
Definition: flow.hh:89
AddrSpaceManager::insertResolver
void insertResolver(AddrSpace *spc, AddressResolver *rsolv)
Override the base resolver for a space.
Definition: translate.cc:413
LoadGuard::isGuarded
bool isGuarded(const Address &addr) const
Does this guard apply to the given address.
Definition: heritage.cc:666
RuleConcatShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1952
PrintLanguage::opIntScarry
virtual void opIntScarry(const PcodeOp *op)=0
Emit a INT_SCARRY operator.
AddrSpace::byteToAddress
static uintb byteToAddress(uintb val, uint4 ws)
Scale from byte units to addressable units.
Definition: space.hh:496
ProtoStore::setInput
virtual ProtoParameter * setInput(int4 i, const string &nm, const ParameterPieces &pieces)=0
Establish name, data-type, storage of a specific input parameter.
ParamTrial::ParamTrial
ParamTrial(const Address &ad, int4 sz, int4 sl)
Construct from components.
Definition: fspec.hh:179
LaneDescription::extension
bool extension(int4 numLanes, int4 skipLanes, int4 bytePos, int4 size, int4 &resNumLanes, int4 &resSkipLanes) const
Decide if a given subset of lanes can be extended naturally for this description.
Definition: transform.cc:154
ConditionMarker::bool2vn
Varnode * bool2vn
If the first param to binaryop is defined by BOOL_NEGATE, this is the unnegated Varnode.
Definition: condexe.hh:37
CommentSorter::header_basic
@ header_basic
Basic header comments.
Definition: comment.hh:191
PrintC::opPiece
virtual void opPiece(const PcodeOp *op)
Emit a PIECE operator.
Definition: printc.hh:284
ScoreProtoModel::PEntry::origIndex
int4 origIndex
Original index of trial.
Definition: fspec.hh:847
ActionDirectWrite::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1280
MemoryBank::getPage
virtual void getPage(uintb addr, uint1 *res, int4 skip, int4 size) const
Retrieve data from a memory page.
Definition: memstate.cc:91
CommentDatabaseInternal::clearType
virtual void clearType(const Address &fad, uint4 tp)
Clear all comments matching (one of) the indicated types.
Definition: comment.cc:155
SleighArchitecture::buildPcodeInjectLibrary
virtual PcodeInjectLibrary * buildPcodeInjectLibrary(void)
Build the injection library.
Definition: sleigh_arch.cc:162
GuardRecord
A (putative) switch variable Varnode and a constraint imposed by a CBRANCH.
Definition: jumptable.hh:130
InjectContext::glb
Architecture * glb
Architecture associated with the injection.
Definition: pcodeinject.hh:58
InjectParameter::index
int4 index
Unique index assigned (for cross referencing associated Varnode in the InjectContext)
Definition: pcodeinject.hh:36
Heritage::refineWrite
void refineWrite(Varnode *vn, const Address &addr, const vector< int4 > &refine, vector< Varnode * > &newvn)
Split up an output Varnode based on the given refinement.
Definition: heritage.cc:1396
PrintC::pushPrototypeInputs
void pushPrototypeInputs(const FuncProto *proto)
Push input parameters.
Definition: printc.cc:146
EmitPrettyPrint::spaces
virtual void spaces(int4 num, int4 bump=0)
Emit a sequence of space characters as part of source code.
Definition: prettyprint.cc:1145
EmulateFunction::setExecuteAddress
virtual void setExecuteAddress(const Address &addr)
Set the address of the next instruction to emulate.
Definition: jumptable.cc:131
PrintJava::isArrayType
static bool isArrayType(const Datatype *ct)
Does the given data-type reference a java array.
Definition: printjava.cc:113
Architecture::buildPcodeInjectLibrary
virtual PcodeInjectLibrary * buildPcodeInjectLibrary(void)=0
Build the injection library.
FuncCallSpecs::activeinput
ParamActive activeinput
Info for recovering input parameters.
Definition: fspec.hh:1446
TypeOpFloatFloat2Float::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:639
ParamTrial
A register or memory register that may be used to pass a parameter or return value.
Definition: fspec.hh:157
Scope::clearAttribute
virtual void clearAttribute(Symbol *sym, uint4 attr)=0
Clear boolean Varnode properties on a Symbol.
FuncProto::modellock
@ modellock
Set if the PrototypeModel is locked for this prototype.
Definition: fspec.hh:1151
RuleAndMask::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:124
LoadImage::filename
string filename
Name of the loadimage.
Definition: loadimage.hh:73
JumpBasicOverride::findStartOp
int4 findStartOp(Varnode *vn)
Return the PcodeOp (within the PathMeld set) that takes the given Varnode as input.
Definition: jumptable.cc:1663
TypeOpCast::TypeOpCast
TypeOpCast(TypeFactory *t)
Constructor.
Definition: typeop.cc:1595
ActionLaneDivide::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:111
BlockGraph::buildDomSubTree
void buildDomSubTree(vector< FlowBlock * > &res, FlowBlock *root) const
Collect nodes from a dominator sub-tree.
Definition: block.cc:1973
Varnode::printInfo
void printInfo(ostream &s) const
Print raw attribute info about the Varnode.
Definition: varnode.cc:255
RulePropagateCopy
Propagate the input of a COPY to all the places that read the output.
Definition: ruleaction.hh:639
AddrSpace::getHighest
uintb getHighest(void) const
Get the highest byte-scaled address.
Definition: space.hh:339
OptionAllowContextSet
Toggle whether the disassembly engine is allowed to modify context.
Definition: options.hh:207
Heritage::bumpDeadcodeDelay
void bumpDeadcodeDelay(Varnode *vn)
Increase the heritage delay for the given Varnode and request a restart.
Definition: heritage.cc:2128
RulePtrsubCharConstant
Cleanup: Set-up to print string constants.
Definition: ruleaction.hh:1094
RuleHumptyDumpty::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4806
AddrSpaceManager::findJoin
JoinRecord * findJoin(uintb offset) const
Find JoinRecord for offset in the join space.
Definition: translate.cc:679
TypeOpIntSext::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:361
LocationMap::themap
map< Address, SizePass > themap
Heritaged addresses mapped to range size and pass number.
Definition: heritage.hh:47
SetAction
Command to set the root Action used by the decompiler or toggle output components.
Definition: ghidra_process.hh:203
ParamTrial::slot
int4 slot
Slot assigned to this trial.
Definition: fspec.hh:174
ExternRefSymbol::ExternRefSymbol
ExternRefSymbol(Scope *sc, const Address &ref, const string &nm)
Construct given a placeholder address.
Definition: database.cc:722
EmulatePcodeCache::setExecuteAddress
virtual void setExecuteAddress(const Address &addr)
Set current execution address.
Definition: emulate.cc:432
RuleSubZext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:847
EmitPrettyPrint::tagOp
virtual void tagOp(const char *ptr, syntax_highlight hl, const PcodeOp *op)
Emit an operation token.
Definition: prettyprint.cc:1008
CPoolRecord::check_cast
@ check_cast
Pointer to object, new name in token, new data-type in type.
Definition: cpool.hh:55
TypePointer::TypePointer
TypePointer(void)
Internal constructor for use with restoreXml.
Definition: type.hh:226
BlockGraph
A control-flow block built out of sub-components.
Definition: block.hh:270
BlockBasic::flipInPlaceTest
virtual int4 flipInPlaceTest(vector< PcodeOp * > &fliplist) const
Test normalizing the conditional branch in this.
Definition: block.cc:2254
OtherSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: space.cc:420
Funcdata::findJumpTable
JumpTable * findJumpTable(const PcodeOp *op) const
Find a jump-table associated with a given BRANCHIND.
Definition: funcdata_block.cc:440
CPoolRecord::byteData
uint1 * byteData
For string literals, the raw byte data of the string.
Definition: cpool.hh:69
ConditionalJoin::data
Funcdata & data
The function being analyzed.
Definition: blockaction.hh:240
LoopBody::clearExitMarks
void clearExitMarks(FlowBlock *graph)
Clear the mark on all the exits to this loop.
Definition: blockaction.cc:423
FuncCallSpecs::setFuncdata
void setFuncdata(Funcdata *f)
Set the Funcdata object associated with the called function.
Definition: fspec.cc:4016
AddrSpace::printRaw
virtual void printRaw(ostream &s, uintb offset) const
Write an address in this space to a stream.
Definition: space.cc:188
TokenSplit::field_t
@ field_t
A field name for a structured data-type.
Definition: prettyprint.hh:313
RuleConcatShift
Simplify INT_RIGHT canceling PIECE: concat(V,W) >> c => zext(V)
Definition: ruleaction.hh:378
TokenSplit::tagField
void tagField(const char *ptr, EmitXml::syntax_highlight h, const Datatype *ct, int4 o)
Create an identifier for a field within a structured data-type.
Definition: prettyprint.hh:482
ValueSetSolver::orderPartition
Partition orderPartition
Value sets in iteration order.
Definition: rangeutil.hh:291
HighEdge
A record for caching a Cover intersection test between two HighVariable objects.
Definition: merge.hh:29
Heritage::refineRead
void refineRead(Varnode *vn, const Address &addr, const vector< int4 > &refine, vector< Varnode * > &newvn)
Split up a free Varnode based on the given refinement.
Definition: heritage.cc:1362
CircleRange::mask
uintb mask
Bit mask defining the size (modulus) and stop of the range.
Definition: rangeutil.hh:51
FlowInfo::glb
Architecture * glb
Owner of the function.
Definition: flow.hh:79
OverlaySpace::getBaseSpace
AddrSpace * getBaseSpace(void) const
Get the address space being overlayed.
Definition: space.cc:656
SubvariableFlow::tryCallPull
bool tryCallPull(PcodeOp *op, ReplaceVarnode *rvn, int4 slot)
Determine if the given subgraph variable can act as a parameter to the given CALL op.
Definition: subflow.cc:205
SegmentOp::supportsfarpointer
bool supportsfarpointer
Is true if the joined pair base:near acts as a far pointer.
Definition: userop.hh:204
OpBehaviorFloatSqrt
CPUI_FLOAT_SQRT behavior.
Definition: opbehavior.hh:436
Heritage::discoverIndexedStackPointers
bool discoverIndexedStackPointers(AddrSpace *spc, vector< PcodeOp * > &freeStores, bool checkFreeStores)
Trace input stack-pointer to any indexed loads.
Definition: heritage.cc:829
PrintC::emitBlockGoto
virtual void emitBlockGoto(const BlockGoto *bl)
Emit a block ending with a goto statement.
Definition: printc.cc:2379
OpBehaviorIntRight::recoverInputBinary
virtual uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering an input value.
Definition: opbehavior.cc:407
ActionActiveReturn::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1686
Architecture::parseDefaultProto
void parseDefaultProto(const Element *el)
Apply default prototype model configuration.
Definition: architecture.cc:770
PrintC::opIntNotEqual
virtual void opIntNotEqual(const PcodeOp *op)
Emit a INT_NOTEQUAL operator.
Definition: printc.hh:235
RawLoadImage::RawLoadImage
RawLoadImage(const string &f)
RawLoadImage constructor.
Definition: loadimage.cc:37
ActionConstbase::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:667
LoopBody::immed_container
LoopBody * immed_container
Immediately containing loop body, or NULL.
Definition: blockaction.hh:51
JumpTable::indirect
PcodeOp * indirect
CPUI_BRANCHIND linked to this jump-table.
Definition: jumptable.hh:516
ConditionalJoin::execute
void execute(void)
Execute the merge.
Definition: blockaction.cc:2082
FuncProto::clearInput
void clearInput(void)
Clear all input parameters regardless of lock.
Definition: fspec.cc:3162
TypeOp::TypeOp
TypeOp(TypeFactory *t, OpCode opc, const string &n)
Constructor.
Definition: typeop.cc:150
ProtoParameter::isNameLocked
virtual bool isNameLocked(void) const =0
Is the parameter name locked.
BlockIf::gototarget
FlowBlock * gototarget
The target FlowBlock of the unstructured edge (if present)
Definition: block.hh:555
RuleSubvarZext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1306
RuleOrPredicate::MultiPredicate::op
PcodeOp * op
Base MULTIEQUAL op.
Definition: condexe.hh:214
ProtoStore::clearInput
virtual void clearInput(int4 i)=0
Clear the input parameter at the specified slot.
ActionDirectWrite::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:241
Architecture::getLanedRegister
const LanedRegister * getLanedRegister(const Address &loc, int4 size) const
Get LanedRegister associated with storage.
Definition: architecture.cc:228
TypeOpSegment::TypeOpSegment
TypeOpSegment(TypeFactory *t)
Constructor.
Definition: typeop.cc:1718
CircleRange::newStride
static bool newStride(uintb mask, int4 step, int4 oldStep, uint4 rem, uintb &myleft, uintb &myright)
Recalculate range based on new stride.
Definition: rangeutil.cc:101
RuleAddMultCollapse::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3762
Funcdata::forceGoto
bool forceGoto(const Address &pcop, const Address &pcdest)
Force a specific control-flow edge to be marked as unstructured.
Definition: funcdata_block.cc:658
RangeList::longestFit
uintb longestFit(const Address &addr, uintb maxsize) const
Find size of biggest Range containing given address.
Definition: address.cc:446
RuleBooleanNegate::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:501
AliasChecker::gatherAdditiveBase
static void gatherAdditiveBase(Varnode *startvn, vector< AddBase > &addbase)
Gather result Varnodes for all sums that the given starting Varnode is involved in.
Definition: varmap.cc:583
JumpBasicOverride::getTableSize
virtual int4 getTableSize(void) const
Return the number of entries in the address table.
Definition: jumptable.hh:444
PrintC::opReturn
virtual void opReturn(const PcodeOp *op)
Emit a RETURN operator.
Definition: printc.cc:562
FlowInfo::generateBlocks
void generateBlocks(void)
Generate basic blocks from the raw control-flow.
Definition: flow.cc:797
AddForm
Definition: double.hh:90
EmitXml::endVarDecl
virtual void endVarDecl(int4 id)
End a variable declaration.
Definition: prettyprint.cc:115
Rule::count_tests
uint4 count_tests
Number of times this Rule has attempted to apply.
Definition: action.hh:207
RuleSubfloatConvert::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7725
PrintLanguageCapability::name
string name
Unique identifier for language capability.
Definition: printlanguage.hh:42
PrintC::dereference
static OpToken dereference
The pointer dereference operator.
Definition: printc.hh:76
RuleSegment::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7206
FuncProto::injectid
int4 injectid
(If non-negative) id of p-code snippet that should replace this function
Definition: fspec.hh:1170
ConditionMarker::matchflip
bool matchflip
True if the compared CBRANCH keys on the opposite boolean value of the root.
Definition: condexe.hh:41
PrintLanguage::opFloatAbs
virtual void opFloatAbs(const PcodeOp *op)=0
Emit a FLOAT_ABS operator.
EmitPrettyPrint::tagLabel
virtual void tagLabel(const char *ptr, syntax_highlight hl, const AddrSpace *spc, uintb off)
Emit a code label identifier.
Definition: prettyprint.cc:1053
ghidra_arch.hh
Ghidra specific architecture information and connection to a Ghidra client.
Rule2Comp2Sub::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6269
PcodeOpRaw::setOutput
void setOutput(VarnodeData *o)
Set the output varnode for this op.
Definition: pcoderaw.hh:174
RangeList::getLastSignedRange
const Range * getLastSignedRange(AddrSpace *spaceid) const
Get the last Range viewing offsets as signed.
Definition: address.cc:496
TypeOpIntLeft
Information about the INT_LEFT op-code.
Definition: typeop.hh:447
PcodeInjectLibrary::manualCallFixup
virtual int4 manualCallFixup(const string &name, const string &snippetstring)=0
Manually add a call-fixup payload given a compilable snippet of p-code source.
OptionDatabase::~OptionDatabase
~OptionDatabase(void)
Destructor.
Definition: options.cc:84
ContextInternal
An in-memory implementation of the ContextDatabase interface.
Definition: globalcontext.hh:256
JumpModelTrivial::buildLabels
virtual void buildLabels(Funcdata *fd, vector< Address > &addresstable, vector< uintb > &label, const JumpModel *orig) const
Recover case labels associated with the Address table.
Definition: jumptable.cc:399
PcodeInjectLibraryGhidra
A p-code injection library that uses a Ghidra client to generate/compile the injection p-code.
Definition: inject_ghidra.hh:80
JumpTable::isOverride
bool isOverride(void) const
Return true if this table was manually overridden.
Definition: jumptable.cc:2273
merge.hh
Utilities for merging low-level Varnodes into high-level variables.
Action::printStatistics
virtual void printStatistics(ostream &s) const
Dump statistics to stream.
Definition: action.cc:91
CoverBlock::intersect
int4 intersect(const CoverBlock &op2) const
Compute intersection with another CoverBlock.
Definition: cover.cc:57
TypePointer::TypePointer
TypePointer(int4 s, Datatype *pt, uint4 ws)
Construct from a size, pointed-to type, and wordsize.
Definition: type.hh:231
JoinSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: space.cc:634
SubfloatFlow::worklist
vector< TransformVar * > worklist
Current list of placeholders that still need to be traced.
Definition: subflow.hh:154
ActionDatabase::~ActionDatabase
~ActionDatabase(void)
Destructor.
Definition: action.cc:950
Varnode::getHigh
HighVariable * getHigh(void) const
Get the high-level variable associated with this Varnode.
Definition: varnode.cc:80
TypeOpIntSrem
Information about the INT_SREM op-code.
Definition: typeop.hh:509
XmlArchitecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: xml_arch.cc:107
RuleDivOpt::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6929
AddrSpace::name
string name
Name of this space.
Definition: space.hh:103
MapIterator::MapIterator
MapIterator(const vector< EntryMap * > *m, vector< EntryMap * >::const_iterator cm, list< SymbolEntry >::const_iterator ci)
Construct iterator at a specific position.
Definition: database.hh:342
SubvariableFlow::processNextWork
bool processNextWork(void)
Extend the subgraph from the next node in the worklist.
Definition: subflow.cc:1243
SleighArchitecture::target
string target
The language id of the active load-image.
Definition: sleigh_arch.hh:95
OptionDatabase::OptionDatabase
OptionDatabase(Architecture *g)
Construct given the owning Architecture.
Definition: options.cc:48
TypeEnum::TypeEnum
TypeEnum(int4 s, type_metatype m)
Construct from a size and meta-type (TYPE_INT or TYPE_UINT)
Definition: type.hh:288
TypeOpIntCarry::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:386
AddrSpace
A region where processor data is stored.
Definition: space.hh:73
EmulateFunction::executeCallother
virtual void executeCallother(void)
Standard behavior for a user-defined p-code op.
Definition: jumptable.cc:116
count_leading_zeros
int4 count_leading_zeros(uintb val)
Return the number of leading zero bits in the given value.
Definition: address.cc:743
OpBehaviorFloatSqrt::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:437
Funcdata::clearBlocks
void clearBlocks(void)
Clear all basic blocks.
Definition: funcdata_block.cc:32
Scope::isReadOnly
bool isReadOnly(const Address &addr, int4 size, const Address &usepoint) const
Is the given memory range marked as read-only.
Definition: database.cc:1691
PrintLanguage::typetoken
@ typetoken
Emit atom as operator.
Definition: printlanguage.hh:160
OpBehaviorIntSdiv
CPUI_INT_SDIV behavior.
Definition: opbehavior.hh:299
ActionConstantPtr::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1096
OpBehaviorIntSrem
CPUI_INT_SREM behavior.
Definition: opbehavior.hh:313
ConstantPoolGhidra::ghidra
ArchitectureGhidra * ghidra
The connection with the Ghidra client.
Definition: cpool_ghidra.hh:32
JumpTable::addresstable
vector< Address > addresstable
Raw addresses in the jump-table.
Definition: jumptable.hh:511
TypeOpBinary::metain
type_metatype metain
The metatype of the inputs.
Definition: typeop.hh:157
FloatFormat::maxexponent
int4 maxexponent
Maximum possible exponent.
Definition: float.hh:48
Symbol::name
string name
The local name of the symbol.
Definition: database.hh:159
SplitFlow::addOp
bool addOp(PcodeOp *op, TransformVar *rvn, int4 slot)
Split given op into its lanes.
Definition: subflow.cc:1466
LoadImageGhidra::LoadImageGhidra
LoadImageGhidra(ArchitectureGhidra *g)
Constructor.
Definition: loadimage_ghidra.cc:18
MultForm
Definition: double.hh:240
DocumentStorage::openDocument
Document * openDocument(const string &filename)
Open and parse an XML file.
ProtoModel::assignParameterStorage
void assignParameterStorage(const vector< Datatype * > &typelist, vector< ParameterPieces > &res, bool ignoreOutputError)
Calculate input and output storage locations given a function prototype.
Definition: fspec.cc:1825
ParamListStandard::nonfloatgroup
int4 nonfloatgroup
Group of first entry which is not marked float.
Definition: fspec.hh:497
FloatingEdge::getCurrentEdge
FlowBlock * getCurrentEdge(int4 &outedge, FlowBlock *graph)
Get the current form of the edge.
Definition: blockaction.cc:25
ScopeLocal::restructure
bool restructure(MapState &state)
Merge hints into a formal Symbol layout of the address space.
Definition: varmap.cc:1042
FlowInfo::fallthru
void fallthru(void)
Process (the next) sequence of instructions in fall-thru order.
Definition: flow.cc:531
ScopeInternal::end
virtual MapIterator end(void) const
Ending iterator to mapped SymbolEntrys.
Definition: database.cc:1801
ActionNormalizeSetup::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3652
CommentSorter::Subsort
The sorting key for placing a Comment within a specific basic block.
Definition: comment.hh:196
JumpBasicOverride::normaddress
Address normaddress
Dynamic info for recovering normalized switch variable.
Definition: jumptable.hh:430
ActionExtraPopSetup::stackspace
AddrSpace * stackspace
The stack space to analyze.
Definition: coreaction.hh:641
bit_transitions
int4 bit_transitions(uintb val, int4 sz)
Calculate the number of bit transitions in the sized value.
Definition: address.cc:788
EquateSymbol::restoreXml
virtual void restoreXml(const Element *el)
Restore this Symbol from an XML stream.
Definition: database.cc:648
SubvariableFlow::bitsize
int4 bitsize
Number of bits in logical variable.
Definition: subflow.hh:81
SpacebaseSpace::baseloc
VarnodeData baseloc
location data of the base register
Definition: translate.hh:175
ghidra_process.hh
The formal commands that can be issued to the decompiler by the Ghidra client.
ScopeGhidra::clearAttribute
virtual void clearAttribute(Symbol *sym, uint4 attr)
Clear boolean Varnode properties on a Symbol.
Definition: database_ghidra.hh:76
Scope::rangetree
RangeList rangetree
Range of data addresses owned by this scope.
Definition: database.hh:416
CollapseStructure::ruleBlockOr
bool ruleBlockOr(FlowBlock *bl)
Attempt to apply a BlockCondition structure.
Definition: blockaction.cc:1301
TraceDAG::pushBranches
void pushBranches(void)
Push the trace through, removing edges as necessary.
Definition: blockaction.cc:976
OpToken::negate
OpToken * negate
The token representing the negation of this token.
Definition: printlanguage.hh:99
TransformManager::newIop
TransformVar * newIop(Varnode *vn)
Make placeholder for special iop constant.
Definition: transform.cc:407
RuleSubvarShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7657
PrintC::emitLocalVarDecls
void emitLocalVarDecls(const Funcdata *fd)
Emit variable declarations for a function.
Definition: printc.cc:1869
Heritage::StackNode::vn
Varnode * vn
Varnode being traversed.
Definition: heritage.hh:184
ContextGhidra::glb
ArchitectureGhidra * glb
Architecture and connection to the Ghidra client.
Definition: ghidra_context.hh:32
RuleDoubleSub
Simplify chained SUBPIECE: sub( sub(V,c), d) => sub(V, c+d)
Definition: ruleaction.hh:348
CPUI_FLOAT_NAN
@ CPUI_FLOAT_NAN
Not-a-number test (NaN)
Definition: opcodes.hh:91
Heritage::guardStores
void guardStores(const Address &addr, int4 size, vector< Varnode * > &write)
Guard STORE ops in preparation for the renaming algorithm.
Definition: heritage.cc:1169
PcodeOpRaw::setBehavior
void setBehavior(OpBehavior *be)
Set the opcode for this op.
Definition: pcoderaw.hh:117
Varnode::insert
@ insert
Definition: varnode.hh:76
RuleSborrow::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3079
ActionReturnSplit::gatherReturnGotos
static void gatherReturnGotos(FlowBlock *parent, vector< FlowBlock * > &vec)
Gather all blocks that have goto edge to a RETURN.
Definition: blockaction.cc:2186
RuleConcatLeftShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:837
Address::Address
Address(void)
Create an invalid address.
Definition: address.hh:234
TypeFactory::enumtype
type_metatype enumtype
Default enumeration meta-type (when parsing C)
Definition: type.hh:384
PcodeOpRaw::numInput
int4 numInput(void) const
Get the number of input varnodes to this op.
Definition: pcoderaw.hh:206
RuleSubfloatConvert::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7731
FlowBlock::f_whiledo_overflow
@ f_whiledo_overflow
Set if the conditional block of a whiledo is too big to print as while(cond) { ...
Definition: block.hh:89
AddrSpace::getWordSize
uint4 getWordSize(void) const
Get the addressable unit size.
Definition: space.hh:325
Emulate::executeMultiequal
virtual void executeMultiequal(void)=0
Standard behavior for a MULTIEQUAL (phi-node)
RuleBitUndistribute
Undo distributed operations through INT_AND, INT_OR, and INT_XOR.
Definition: ruleaction.hh:488
AddrSpace::addressSize
uint4 addressSize
Size of an address into this space in bytes.
Definition: space.hh:104
TypePointer
Datatype object representing a pointer.
Definition: type.hh:219
TypeOpIntSlessEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:328
Funcdata::opInsert
void opInsert(PcodeOp *op, BlockBasic *bl, list< PcodeOp * >::iterator iter)
Insert the given PcodeOp at specific point in a basic block.
Definition: funcdata_op.cc:148
EmulatePcodeOp::executeMultiequal
virtual void executeMultiequal(void)
Standard behavior for a MULTIEQUAL (phi-node)
Definition: emulateutil.cc:94
VarnodeData::space
AddrSpace * space
The address space.
Definition: pcoderaw.hh:34
OpToken::space
@ space
No explicitly printed token.
Definition: printlanguage.hh:89
FloatingEdge::top
FlowBlock * top
Starting FlowBlock of the edge.
Definition: blockaction.hh:30
JoinRecord::unified
VarnodeData unified
Special entry representing entire symbol in one chunk.
Definition: translate.hh:198
ConstantPoolGhidra::empty
virtual bool empty(void) const
Is the container empty of records.
Definition: cpool_ghidra.hh:38
CPUI_PIECE
@ CPUI_PIECE
Concatenate.
Definition: opcodes.hh:114
PrintC::emitFunctionDeclaration
virtual void emitFunctionDeclaration(const Funcdata *fd)
Emit a function declaration.
Definition: printc.cc:2186
ParamEntry::getAddrBySlot
Address getAddrBySlot(int4 &slot, int4 sz) const
Calculate the storage address assigned when allocating a parameter of a given size.
Definition: fspec.cc:257
ValueSetSolver::visit
int4 visit(ValueSet *vertex, Partition &part)
Recursively walk the data-flow graph finding partitions.
Definition: rangeutil.cc:1977
ConstantPoolGhidra
An implementation of ConstantPool using a Ghidra client as the backing storage.
Definition: cpool_ghidra.hh:31
LoadImageXml::loadFill
virtual void loadFill(uint1 *ptr, int4 size, const Address &addr)
Get data from the LoadImage.
Definition: loadimage_xml.cc:192
JumpBasic2::checkNormalDominance
bool checkNormalDominance(void) const
Check if the block that defines the normalized switch variable dominates the block containing the swi...
Definition: jumptable.cc:1590
ActionMergeAdjacent::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:369
OpBehaviorFloatInt2Float::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:654
PcodeInjectLibrary::getBehaviors
virtual const vector< OpBehavior * > & getBehaviors(void)=0
Get the array of op-code behaviors for initializing and emulator.
PcodeEmitCache::inst
const vector< OpBehavior * > & inst
Array of behaviors for translating OpCode.
Definition: emulate.hh:281
EmitXml::getMaxLineSize
virtual int4 getMaxLineSize(void) const
Get the current maximum line size.
Definition: prettyprint.hh:185
RuleDivTermAdd
Simplify expressions associated with optimized division expressions.
Definition: ruleaction.hh:1139
TypeOpFloatSub::TypeOpFloatSub
TypeOpFloatSub(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1412
JumpModelTrivial::isOverride
virtual bool isOverride(void) const
Return true if this model was manually overridden.
Definition: jumptable.hh:326
PcodeOp::nocollapse
@ nocollapse
This op cannot be collapsed further.
Definition: op.hh:71
RuleConcatZext
Commute PIECE with INT_ZEXT: concat(zext(V),W) => zext(concat(V,W))
Definition: ruleaction.hh:784
AddrSpace::getMinimumPtrSize
int4 getMinimumPtrSize(void) const
Get the minimum pointer size for this space.
Definition: space.hh:352
RuleConcatZext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4395
PrintC::unary_minus
static OpToken unary_minus
The unary minus operator.
Definition: printc.hh:73
ProtoStore::clearAllInputs
virtual void clearAllInputs(void)=0
Clear all input parameters (and any backing symbols)
FlowBlock
Description of a control-flow block containing PcodeOps.
Definition: block.hh:60
Funcdata::adjustInputVarnodes
void adjustInputVarnodes(const Address &addr, int4 size)
Adjust input Varnodes contained in the given range.
Definition: funcdata_varnode.cc:370
WidenerNone::freezeIteration
int4 freezeIteration
The iteration at which all change ceases.
Definition: rangeutil.hh:253
ParamListStandardOut
A standard model for passing back return values from a function.
Definition: fspec.hh:541
Architecture::postSpecFile
virtual void postSpecFile(void)
Let components initialize after Translate is built.
Definition: architecture.cc:601
CommentDatabase::saveXml
virtual void saveXml(ostream &s) const =0
Save all comments in the container to an XML stream.
CircleRange::left
uintb left
Left boundary of the open range [left,right)
Definition: rangeutil.hh:49
TransformManager::newOp
TransformOp * newOp(int4 numParams, OpCode opc, TransformOp *follow)
Create a new placeholder op that will not replace an existing op.
Definition: transform.cc:522
TypeFactory::orderRecurse
void orderRecurse(vector< Datatype * > &deporder, DatatypeSet &mark, Datatype *ct) const
Write out dependency list.
Definition: type.cc:1595
RuleNegateIdentity::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:495
ArchitectureGhidra::segvHandler
static void segvHandler(int4 sig)
Handler for a segment violation (SIGSEGV) signal.
Definition: ghidra_arch.cc:27
RawBinaryArchitecture::RawBinaryArchitecture
RawBinaryArchitecture(const string &fname, const string &targ, ostream *estream)
Constructor.
Definition: raw_arch.cc:78
FlowInfo::obank
PcodeOpBank & obank
Container for generated p-code.
Definition: flow.hh:81
FlowBlock::f_goto_goto
@ f_goto_goto
(Block ends in) non-structured branch
Definition: block.hh:76
Emulate::emu_halted
bool emu_halted
Set to true if the emulator is halted.
Definition: emulate.hh:170
PrintC::less_than
static OpToken less_than
The less than operator.
Definition: printc.hh:85
TokenSplit::docu_b
@ docu_b
Start of a document.
Definition: prettyprint.hh:295
Merge::trimOpInput
void trimOpInput(PcodeOp *op, int4 slot)
Trim the input HighVariable of the given PcodeOp so that its Cover is tiny.
Definition: merge.cc:581
ScopeGhidra::dump2Cache
Symbol * dump2Cache(Document *doc) const
Parse a response into the cache.
Definition: database_ghidra.cc:117
BlockDoWhile::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:605
PcodeOpBank::useroplist
list< PcodeOp * > useroplist
List of user-defined PcodeOps.
Definition: op.hh:251
VarnodeBank::find
Varnode * find(int4 s, const Address &loc, const Address &pc, uintm uniq=~((uintm) 0)) const
Find a Varnode.
Definition: varnode.cc:1064
partmap.hh
The partmap<> template mapping a linear space to value objects.
PrintLanguageCapability::getDefault
static PrintLanguageCapability * getDefault(void)
Retrieve the default language capability.
Definition: printlanguage.cc:25
UserOpManage::segmentop
vector< SegmentOp * > segmentop
Segment operations supported by this Architecture.
Definition: userop.hh:253
TypeOpFloatDiv
Information about the FLOAT_DIV op-code.
Definition: typeop.hh:587
Scope::restoreXml
virtual void restoreXml(const Element *el)=0
Restore this Scope from a <scope> XML tag.
ActionPrototypeWarnings::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:1011
ConditionalExecution::iblock2posta_true
bool iblock2posta_true
Does true branch go to path post a.
Definition: condexe.hh:138
AddrSpaceManager::copySpaces
void copySpaces(const AddrSpaceManager *op2)
Copy spaces from another manager.
Definition: translate.cc:387
Funcdata::newUnique
Varnode * newUnique(int4 s, Datatype *ct=(Datatype *) 0)
Create a new temporary Varnode.
Definition: funcdata_varnode.cc:81
ActionConditionalExe
Search for and remove various forms of redundant CBRANCH operations.
Definition: condexe.hh:172
ContextInternal::getDefaultValue
virtual uintm * getDefaultValue(void)
Retrieve the memory region holding all default context values.
Definition: globalcontext.hh:284
ParamMeasure
Definition: paramid.hh:21
SleighArchitecture::collectSpecFiles
static void collectSpecFiles(ostream &errs)
Gather specification files in normal locations.
Definition: sleigh_arch.cc:301
TokenSplit::tagtype
tag_type tagtype
Type of token.
Definition: prettyprint.hh:326
PrintC::array_expr
static OpToken array_expr
Array adornment for a type declaration.
Definition: printc.hh:113
PrintC::addressof
static OpToken addressof
The address of operator.
Definition: printc.hh:75
PrintLanguage::emitBlockCopy
virtual void emitBlockCopy(const BlockCopy *bl)=0
Emit a basic block (with any labels)
TokenSplit::synt_t
@ synt_t
Other unspecified syntax.
Definition: prettyprint.hh:316
OpBehaviorFloatAdd::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:584
Emulate::executeCallother
virtual void executeCallother(void)=0
Standard behavior for a user-defined p-code op.
ConditionalJoin::cutDownMultiequals
void cutDownMultiequals(BlockBasic *exit, int4 in1, int4 in2)
Substitute new joined Varnode in the given exit block.
Definition: blockaction.cc:1961
PcodeOp::compareOrder
int4 compareOrder(const PcodeOp *bop) const
Compare the control-flow order of this and bop.
Definition: op.cc:606
Funcdata::hasUnimplemented
bool hasUnimplemented(void) const
Does this function have instructions marked as unimplemented.
Definition: funcdata.hh:196
ActionMarkExplicit::processMultiplier
static void processMultiplier(Varnode *vn, int4 max)
For a given multi-descendant Varnode, decide if it should be explicit.
Definition: coreaction.cc:2677
HighVariable::instanceIndex
int4 instanceIndex(const Varnode *vn) const
Find the index of a specific Varnode member.
Definition: variable.cc:440
Merge::processHighDominantCopy
void processHighDominantCopy(HighVariable *high)
Try to replace COPYs into the given HighVariable with a single dominant COPY.
Definition: merge.cc:1206
MemoryBank
Memory storage/state for a single AddressSpace.
Definition: memstate.hh:36
ContextCache::first
uintb first
Starting offset of the current valid range.
Definition: globalcontext.hh:313
HeritageInfo::space
AddrSpace * space
The address space this record describes.
Definition: heritage.hh:87
FloatFormat::opNotEqual
uintb opNotEqual(uintb a, uintb b) const
Inequality comparison (!=)
Definition: float.cc:365
TokenSplit::opar_t
@ opar_t
Open parenthesis.
Definition: prettyprint.hh:317
ConditionalExecution::execute
void execute(void)
Eliminate the unnecessary path join at iblock.
Definition: condexe.cc:824
ActionReturnRecovery::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1819
PrintC::opFloatRound
virtual void opFloatRound(const PcodeOp *op)
Emit a FLOAT_ROUND operator.
Definition: printc.hh:281
Funcdata::opSetOutput
void opSetOutput(PcodeOp *op, Varnode *vn)
Set a specific output Varnode for the given PcodeOp.
Definition: funcdata_op.cc:68
PcodeOpRaw::setSeqNum
void setSeqNum(const Address &a, uintm b)
Set the sequence number.
Definition: pcoderaw.hh:147
Heritage::calcMultiequals
void calcMultiequals(const vector< Varnode * > &write)
Calculate blocks that should contain MULTIEQUALs for one address range.
Definition: heritage.cc:1996
Action::break_action
@ break_action
Break if a change has been made.
Definition: action.hh:74
EmitNoXml::endReturnType
virtual void endReturnType(int4 id)
End a return type declaration.
Definition: prettyprint.hh:232
ActionRestartGroup
Action which checks if restart (sub)actions have been generated and restarts itself.
Definition: action.hh:171
XmlArchitecture::adjustvma
long adjustvma
The amount to adjust the virtual memory address.
Definition: xml_arch.hh:35
RuleSignDiv2::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7006
PrintLanguage::opFloatEqual
virtual void opFloatEqual(const PcodeOp *op)=0
Emit a FLOAT_EQUAL operator.
EmitPrettyPrint::startIndent
virtual int4 startIndent(void)
Start a new indent level.
Definition: prettyprint.cc:1154
RuleSelectCse::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:74
RuleTrivialShift
Simplify trivial shifts: V << 0 => V, V << #64 => 0
Definition: ruleaction.hh:558
CollapseStructure::ruleBlockCat
bool ruleBlockCat(FlowBlock *bl)
Attempt to apply a BlockList structure.
Definition: blockaction.cc:1264
Architecture::evalfp_current
ProtoModel * evalfp_current
Function proto to use when evaluating current function.
Definition: architecture.hh:140
Funcdata::setJumptableRecovery
void setJumptableRecovery(bool val)
Toggle whether this is being used for jump-table recovery.
Definition: funcdata.hh:141
ValueSet::Equation::range
CircleRange range
The range constraint.
Definition: rangeutil.hh:123
FuncProto::saveXml
void saveXml(ostream &s) const
Save this to an XML stream as a <prototype> tag.
Definition: fspec.cc:3640
TransformVar::constant_iop
@ constant_iop
Special iop constant encoding a PcodeOp reference.
Definition: transform.hh:37
partmap::bounds
const _valuetype & bounds(const _linetype &pnt, _linetype &before, _linetype &after, int &valid) const
Get the value object for a given point and return the range over which the value object applies.
Definition: partmap.hh:172
RulePullsubIndirect
Pull-back SUBPIECE through INDIRECT.
Definition: ruleaction.hh:237
RuleDivTermAdd2::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1154
ScopeKey
A key for looking up child symbol scopes within a parent, based on name.
Definition: database.hh:383
BlockGraph::newBlockMultiGoto
BlockMultiGoto * newBlockMultiGoto(FlowBlock *bl, int4 outedge)
Build a new BlockMultiGoto.
Definition: block.cc:1620
OpBehaviorInt2Comp
CPUI_INT_2COMP behavior.
Definition: opbehavior.hh:226
EmulateSnippet::glb
Architecture * glb
The underlying Architecture for the program being emulated.
Definition: emulateutil.hh:112
BlockSwitch::CaseOrder::isexit
bool isexit
Does this case flow to the exit block.
Definition: block.hh:641
RuleAndCompare::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1743
TypeArray::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:269
CPUI_CPOOLREF
@ CPUI_CPOOLREF
Recover a value from the constant pool.
Definition: opcodes.hh:121
pcode_left
uintb pcode_left(uintb val, int4 sa)
Definition: address.hh:482
PrintC::printCharacterConstant
bool printCharacterConstant(ostream &s, const Address &addr, int4 charsize) const
Print a quoted (unicode) string at the given address.
Definition: printc.cc:1248
Translate::oneInstruction
virtual int4 oneInstruction(PcodeEmit &emit, const Address &baseaddr) const =0
Transform a single machine instruction into pcode.
FlowBlock::restrictedByConditional
bool restrictedByConditional(const FlowBlock *cond) const
Check if the condition from the given block holds for this block.
Definition: block.cc:381
PrintC::buildTypeStack
void buildTypeStack(const Datatype *ct, vector< const Datatype * > &typestack)
Prepare to push components of a data-type declaration.
Definition: printc.cc:120
OptionAllowContextSet::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:586
ParamList::getRangeList
virtual void getRangeList(AddrSpace *spc, RangeList &res) const =0
For a given address space, collect all the parameter locations within that space.
UserPcodeOp::name
string name
Low-level name of p-code operator.
Definition: userop.hh:38
EmitPrettyPrint::getMaxLineSize
virtual int4 getMaxLineSize(void) const
Get the current maximum line size.
Definition: prettyprint.hh:768
VarnodeBank::setInput
Varnode * setInput(Varnode *vn)
Mark a Varnode as an input to the function.
Definition: varnode.cc:982
RuleLessOne::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1368
ActionPool::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: action.cc:860
RuleAndOrLump
Collapse constants in logical expressions: (V & c) & d => V & (c & d)
Definition: ruleaction.hh:151
EmitXml::tagComment
virtual void tagComment(const char *ptr, syntax_highlight hl, const AddrSpace *spc, uintb off)
Emit a comment string as part of the generated source code.
Definition: prettyprint.cc:259
FlowBlock::isLoopDAGIn
bool isLoopDAGIn(int4 i) const
Is the i-th incoming edge part of the DAG sub-graph.
Definition: block.hh:252
OverlaySpace::OverlaySpace
OverlaySpace(AddrSpaceManager *m, const Translate *t)
Constructor.
Definition: space.cc:648
Action::status_end
@ status_end
getFuncdata has completed once (for onceperfunc)
Definition: action.hh:67
ConstantPoolInternal::CheapSorter::a
uintb a
The first integer in a reference.
Definition: cpool.hh:167
CollapseStructure::collapseInternal
int4 collapseInternal(FlowBlock *targetbl)
The main collapsing loop.
Definition: blockaction.cc:1748
ActionRestartGroup::maxrestarts
int4 maxrestarts
Maximum number of restarts allowed.
Definition: action.hh:172
OptionCurrentAction::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:559
LanguageDescription::truncations
vector< TruncationTag > truncations
Address space truncations required by this processor.
Definition: sleigh_arch.hh:61
TokenSplit::tagLine
void tagLine(int4 indent)
Create a line break token with special indentation.
Definition: prettyprint.hh:582
crc32.hh
Table and function for computing a CRC32.
RuleSubvarSubpiece::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7290
Scope::resolveExternalRefFunction
virtual Funcdata * resolveExternalRefFunction(ExternRefSymbol *sym) const =0
Convert an external reference to the referenced function.
SubvariableFlow::PatchRecord::compare_patch
@ compare_patch
Turn compare op inputs into logical values.
Definition: subflow.hh:68
ArchitectureGhidra::buildSpecFile
virtual void buildSpecFile(DocumentStorage &store)
Load any relevant specification files.
Definition: ghidra_arch.cc:248
CommentDatabaseGhidra::cache
CommentDatabaseInternal cache
A cache of Comment objects received from the Ghidra client.
Definition: comment_ghidra.hh:32
TypePointer::wordsize
uint4 wordsize
What size unit does the pointer address.
Definition: type.hh:223
ProtoModel::deriveInputMap
void deriveInputMap(ParamActive *active) const
Given a list of input trials, derive the most likely input prototype.
Definition: fspec.hh:653
PrintLanguage::no_branch
@ no_branch
Do not print branch instruction.
Definition: printlanguage.hh:145
Action::rule_debug
@ rule_debug
Print debug messages specifically for this action.
Definition: action.hh:57
CircleRange::getSize
uintb getSize(void) const
Get the size of this range.
Definition: rangeutil.cc:254
ActionStackPtrFlow::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: coreaction.hh:92
ProtoStoreInternal::getNumInputs
virtual int4 getNumInputs(void) const
Get the number of input parameters for this prototype.
Definition: fspec.cc:2656
FlowBlock::findDups
static void findDups(const vector< BlockEdge > &ref, vector< FlowBlock * > &duplist)
Find blocks that are at the end of multiple edges.
Definition: block.cc:477
OpBehaviorIntSext::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:250
StackSolver::vnlist
vector< Varnode * > vnlist
The indexed set of variables, one for each reference to the stack-pointer.
Definition: coreaction.cc:33
ProtoStoreSymbol::inparam
vector< ProtoParameter * > inparam
Cache of allocated input parameters.
Definition: fspec.hh:1083
RangeList::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore this RangeList from an XML stream.
Definition: address.cc:554
TypeFactoryGhidra::findById
virtual Datatype * findById(const string &n, uint8 id)
Search by name and id.
Definition: typegrp_ghidra.cc:19
CommentSorter::Subsort::index
int4 index
Either the basic block index or -1 for a function header.
Definition: comment.hh:197
SeqNum::SeqNum
SeqNum(Address::mach_extreme ex)
Create an extremal sequence number.
Definition: address.cc:41
CastStrategy::isSubpieceCast
virtual bool isSubpieceCast(Datatype *outtype, Datatype *intype, uint4 offset) const =0
Is truncating an input data-type, producing an output data-type, considered a cast.
Scope::isNameUsed
virtual bool isNameUsed(const string &name) const =0
Check if the given name is used within this scope.
BfdArchitectureCapability::bfdArchitectureCapability
static BfdArchitectureCapability bfdArchitectureCapability
The singleton instance.
Definition: bfd_arch.hh:26
AddrSpace::delay
int4 delay
Delay in heritaging this space.
Definition: space.hh:108
ArchitectureGhidra::setSendParamMeasures
void setSendParamMeasures(bool val)
Toggle whether recovered parameter information is emitted as part of the main decompile action.
Definition: ghidra_arch.hh:123
HighVariable::printInfo
void printInfo(ostream &s) const
Print information about this HighVariable to stream.
Definition: variable.cc:410
Widener::checkFreeze
virtual bool checkFreeze(const ValueSet &valueSet)=0
Check if the given value set has been frozen for the remainder of the iteration process.
SleighBase::varnode_xref
map< VarnodeData, string > varnode_xref
A map from Varnodes in the register space to register names.
Definition: sleighbase.hh:32
Funcdata::beginOpAll
PcodeOpTree::const_iterator beginOpAll(void) const
Start of all (alive) PcodeOp objects sorted by sequence number.
Definition: funcdata.hh:467
FlowInfo::target
PcodeOp * target(const Address &addr) const
Return first p-code op for instruction at given address.
Definition: flow.cc:113
TokenSplit::ptr_second
union TokenSplit::@22 ptr_second
Additional markup associated with the token.
AddrSpace::getSpacebase
virtual const VarnodeData & getSpacebase(int4 i) const
Get a base register that creates this virtual space.
Definition: space.hh:455
Address::overlap
int4 overlap(int4 skip, const Address &op, int4 size) const
Determine how two address ranges overlap.
Definition: address.cc:147
RuleSubvarZext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7677
Architecture::parseDeadcodeDelay
void parseDeadcodeDelay(const Element *el)
Apply dead-code delay configuration.
Definition: architecture.cc:955
ValueSetRead
A special form of ValueSet associated with the read point of a Varnode.
Definition: rangeutil.hh:176
OpBehavior::registerInstructions
static void registerInstructions(vector< OpBehavior * > &inst, const Translate *trans)
Build all pcode behaviors.
Definition: opbehavior.cc:22
FuncProto::deriveOutputMap
void deriveOutputMap(ParamActive *active) const
Given a list of output trials, derive the most likely return value for this prototype.
Definition: fspec.hh:1304
ProtoParameter::setTypeLock
virtual void setTypeLock(bool val)=0
Toggle the lock on the data-type.
PrintLanguage::emitScopeVarDecls
virtual bool emitScopeVarDecls(const Scope *scope, int4 cat)=0
Emit all the variable declarations for a given scope.
Translate::alignment
int4 alignment
Byte modulo on which instructions are aligned.
Definition: translate.hh:297
BlockSwitch::jump
JumpTable * jump
Definition: block.hh:631
PartialSymbolEntry::parent
const Datatype * parent
The parent data-type owning the field.
Definition: printc.hh:48
ParamTrial::defnouse
@ defnouse
Trial is definitely not used.
Definition: fspec.hh:162
Override::restoreXml
void restoreXml(const Element *el, Architecture *glb)
Read in override commands from XML.
Definition: override.cc:349
CPUI_INT_NEGATE
@ CPUI_INT_NEGATE
Logical/bitwise negation (~)
Definition: opcodes.hh:66
OpBehaviorNotEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:174
JumpBasic2::findUnnormalized
virtual void findUnnormalized(uint4 maxaddsub, uint4 maxleftright, uint4 maxext)
Recover the unnormalized switch variable.
Definition: jumptable.cc:1605
ActionReturnSplit
Split the epilog code of the function.
Definition: blockaction.hh:322
GhidraTranslate::getAllRegisters
virtual void getAllRegisters(map< VarnodeData, string > &reglist) const
Get a list of all register names and the corresponding location.
Definition: ghidra_translate.hh:48
ContextDatabase::getContext
virtual const uintm * getContext(const Address &addr) const =0
Get the context blob of values associated with a given address.
LowlevelError
The lowest level error generated by the decompiler.
Definition: error.hh:44
PrintC::opFloatNan
virtual void opFloatNan(const PcodeOp *op)
Emit a FLOAT_NAN operator.
Definition: printc.hh:268
EmulatePcodeCache::numCurrentOps
int4 numCurrentOps(void) const
Return number of pcode ops in translation of current instruction.
Definition: emulate.hh:338
OptionErrorTooManyInstructions::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:672
FloatFormat::opLessEqual
uintb opLessEqual(uintb a, uintb b) const
Less-than-or-equal comparison (<=)
Definition: float.cc:391
ParamEntry::minsize
int4 minsize
Minimum bytes allowed for the logical value.
Definition: fspec.hh:69
ArchitectureGhidra::getRegister
Document * getRegister(const string &regname)
Retrieve a register description given a name.
Definition: ghidra_arch.cc:372
UnimplError
Exception for encountering unimplemented pcode.
Definition: translate.hh:35
PcodeInjectLibraryGhidra::allocateInject
virtual int4 allocateInject(const string &sourceName, const string &name, int4 type)
Allocate a new InjectPayload object.
Definition: inject_ghidra.cc:149
IopSpace
Space for storing internal PcodeOp pointers as addresses.
Definition: op.hh:32
RuleStructOffset0::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6013
CPUI_FLOAT_LESS
@ CPUI_FLOAT_LESS
Floating-point comparison, less-than (<)
Definition: opcodes.hh:88
JumpAssisted::sanityCheck
virtual bool sanityCheck(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable)
Perform a sanity check on recovered addresses.
Definition: jumptable.hh:488
TypeOpExtract
Information about the EXTRACT op-code.
Definition: typeop.hh:790
JumpAssisted::clone
virtual JumpModel * clone(JumpTable *jt) const
Clone this model.
Definition: jumptable.cc:2074
FlowInfo::queryCall
void queryCall(FuncCallSpecs &fspecs)
Try to recover the Funcdata object corresponding to a given call.
Definition: flow.cc:642
TransformVar::piece
@ piece
New Varnode is a piece of an original Varnode.
Definition: transform.hh:32
SleighArchitecture::normalizeEndian
static string normalizeEndian(const string &nm)
Try to recover a language id endianess field.
Definition: sleigh_arch.cc:345
ParamActive::numpasses
int4 numpasses
Number of attempts at evaluating parameters.
Definition: fspec.hh:227
Varnode::ptrcheck
@ ptrcheck
The Varnode value is NOT a pointer.
Definition: varnode.hh:116
Cover::intersect
int4 intersect(const Cover &op2) const
Characterize the intersection between this and another Cover.
Definition: cover.cc:267
OpBehaviorFloatInt2Float::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:445
ActionNameVars::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:471
FlowBlock::getInIndex
int4 getInIndex(const FlowBlock *bl) const
Get the incoming edge index for the given FlowBlock.
Definition: block.cc:549
ActionAssignHigh
Assign initial high-level HighVariable objects to each Varnode.
Definition: coreaction.hh:327
ParamListStandard::numgroup
int4 numgroup
Number of groups in this parameter convention.
Definition: fspec.hh:493
XmlArchitectureCapability::operator=
XmlArchitectureCapability & operator=(const XmlArchitectureCapability &op2)
Not implemented.
PrintC::opBranch
virtual void opBranch(const PcodeOp *op)
Emit a BRANCH operator.
Definition: printc.cc:378
metatype2string
void metatype2string(type_metatype metatype, string &res)
Convert type meta-type to name.
Definition: type.cc:129
CommentDatabaseGhidra::clear
virtual void clear(void)
Clear all comments from this container.
Definition: comment_ghidra.hh:37
ParamActive::getTrialForInputVarnode
const ParamTrial & getTrialForInputVarnode(int4 slot) const
Get trial corresponding to the given input Varnode.
Definition: fspec.hh:1536
TypeArray::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:518
Architecture::resolveArchitecture
virtual void resolveArchitecture(void)=0
Figure out the processor and compiler of the target executable.
TypeEnum::TypeEnum
TypeEnum(int4 s, type_metatype m, const string &nm)
Construct from a size, meta-type, and name.
Definition: type.hh:290
JumpTable::switchOver
void switchOver(const FlowInfo &flow)
Convert absolute addresses to block indices.
Definition: jumptable.cc:2354
PrintLanguage::opIntRight
virtual void opIntRight(const PcodeOp *op)=0
Emit a INT_RIGHT operator.
BlockCopy::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2601
CPUI_FLOAT_LESSEQUAL
@ CPUI_FLOAT_LESSEQUAL
Floating-point comparison, less-than-or-equal (<=)
Definition: opcodes.hh:89
Heritage::pq
PriorityQueue pq
Priority queue for phi-node placement.
Definition: heritage.hh:211
Heritage::deadRemovalAllowedSeen
bool deadRemovalAllowedSeen(AddrSpace *spc)
Check if dead code removal is safe and mark that removal has happened.
Definition: heritage.cc:2408
InjectPayload::paramshift
int4 paramshift
Number of parameters shifted in the original call.
Definition: pcodeinject.hh:91
SetOptions::sendResult
virtual void sendResult(void)
Send results of the command (if any) back to the Ghidra client.
Definition: ghidra_process.cc:442
EmulatePcodeCache::executeCallother
virtual void executeCallother(void)
Execute breakpoint for this user-defined op.
Definition: emulate.cc:421
Scope::detachScope
void detachScope(ScopeMap::iterator iter)
Detach a child Scope from this.
Definition: database.cc:821
SymbolEntry::EntryInitData::extraflags
uint4 extraflags
Varnode flags specific to the storage location.
Definition: database.hh:71
ParamEntry::ParamEntry
ParamEntry(type_metatype t, int4 grp, int4 grpsize, const Address &loc, int4 sz, int4 mnsz, int4 align, bool normalstack)
Construct entry from components.
Definition: fspec.cc:38
PrintLanguage::opInt2Comp
virtual void opInt2Comp(const PcodeOp *op)=0
Emit a INT_2COMP operator.
Address::read
int4 read(const string &s)
Read in the address from a string.
Definition: address.hh:288
ArchitectureCapability::sortCapabilities
static void sortCapabilities(void)
Sort extensions.
Definition: architecture.cc:69
TypeArray::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:507
RuleSubvarCompZero::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7593
EmitNoXml::closeParen
virtual void closeParen(char c, int4 id)
Emit a close parenthesis.
Definition: prettyprint.hh:260
PrintC::emitBlockWhileDo
virtual void emitBlockWhileDo(const BlockWhileDo *bl)
Emit a loop structure, check at top.
Definition: printc.cc:2542
SleighArchitecture::last_sleigh
static Sleigh * last_sleigh
Last Translate object used by a SleighArchitecture.
Definition: sleigh_arch.hh:90
RuleBooleanNegate::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2681
ArchitectureGhidra::sout
ostream & sout
Output stream for interfacing with Ghidra.
Definition: ghidra_arch.hh:62
EmitPrettyPrint::commentfill
string commentfill
Used to fill comments if line breaks are forced.
Definition: prettyprint.hh:712
ActionNameVars::lookForFuncParamNames
static void lookForFuncParamNames(Funcdata &data, const vector< Varnode * > &varlist)
Collect potential variable names from sub-function parameters.
Definition: coreaction.cc:2388
VarnodeCompareLocDef
Compare two Varnode pointers by location then definition.
Definition: varnode.hh:34
Architecture::options
OptionDatabase * options
Options that can be configured.
Definition: architecture.hh:151
Varnode::hiddenretparm
@ hiddenretparm
Does this varnode point to the return value storage location.
Definition: varnode.hh:106
FuncProto::store
ProtoStore * store
Storage interface for parameters.
Definition: fspec.hh:1165
Funcdata::beginLoc
VarnodeLocSet::const_iterator beginLoc(int4 s, const Address &addr) const
Start of Varnodes with given storage.
Definition: funcdata.hh:316
FloatFormat::opAdd
uintb opAdd(uintb a, uintb b) const
Addition (+)
Definition: float.cc:415
BreakTableCallBack::pcodecallback
map< uintb, BreakCallBack * > pcodecallback
a container of addressed based breakpoints
Definition: emulate.hh:141
Scope::getNameSegments
void getNameSegments(vector< string > &vec) const
Get the fullname of this in segments.
Definition: database.cc:1361
Funcdata::beginOpAlive
list< PcodeOp * >::const_iterator beginOpAlive(void) const
Start of PcodeOp objects in the alive list.
Definition: funcdata.hh:455
RuleRightShiftAnd::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:629
RuleIgnoreNan::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1391
TypeOpCpoolref::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.hh:765
CastStrategyJava
Casting strategies that are specific to the Java language.
Definition: cast.hh:178
Datatype::chartype
@ chartype
ASCII character data.
Definition: type.hh:72
MapState::defaultType
Datatype * defaultType
The default data-type to use for RangeHints.
Definition: varmap.hh:150
PropagationState::iter
list< PcodeOp * >::const_iterator iter
Iterator to current descendant being enumerated.
Definition: coreaction.hh:1028
DynamicHash::buildVnUp
void buildVnUp(const Varnode *vn)
Add in the edge between the given Varnode and its defining PcodeOp.
Definition: dynamic.cc:106
TokenSplit::ignore
@ ignore
Mark-up that doesn't affect pretty printing.
Definition: prettyprint.hh:290
block.hh
Classes related to basic blocks and control-flow structuring.
GhidraTranslate::nm2addr
map< string, VarnodeData > nm2addr
Mapping from register name to Varnode.
Definition: ghidra_translate.hh:36
AddrSpace::getAddrSize
uint4 getAddrSize(void) const
Get the size of the space.
Definition: space.hh:333
AddrSpaceManager::constructJoinAddress
Address constructJoinAddress(const Translate *translate, const Address &hiaddr, int4 hisz, const Address &loaddr, int4 losz)
Build a logical whole from register pairs.
Definition: translate.cc:750
ProtoStoreInternal::ProtoStoreInternal
ProtoStoreInternal(Datatype *vt)
Constructor.
Definition: fspec.cc:2596
PrintC::opCbranch
virtual void opCbranch(const PcodeOp *op)
Definition: printc.cc:394
CPUI_INT_DIV
@ CPUI_INT_DIV
Integer division, unsigned (/)
Definition: opcodes.hh:74
OptionConventionPrinting::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:369
FloatFormat::restoreXml
void restoreXml(const Element *el)
Restore the format from XML.
Definition: float.cc:576
FuncProto::setThisPointer
void setThisPointer(bool val)
Toggle the this-call setting for this prototype.
Definition: fspec.hh:1246
TypeFactory::getTypePointer
TypePointer * getTypePointer(int4 s, Datatype *pt, uint4 ws)
Construct a pointer data-type.
Definition: type.cc:1756
TypeOp::inherits_sign_zero
@ inherits_sign_zero
Only inherits sign from first operand, not the second.
Definition: typeop.hh:41
TypeOpIntLess::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:896
TypeOpIndirect::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1514
ScoreProtoModel::PEntry::operator<
bool operator<(const PEntry &op2) const
Compare PEntry objects by slot.
Definition: fspec.hh:854
Scope::buildDefaultName
string buildDefaultName(Symbol *sym, int4 &base, Varnode *vn) const
Create a default name for the given Symbol.
Definition: database.cc:1651
CommentSorter::header_unplaced
@ header_unplaced
Comment that can't be placed in code flow.
Definition: comment.hh:192
ProtoModel::input
ParamList * input
Resource model for input parameters.
Definition: fspec.hh:620
LoadImage::getFileName
const string & getFileName(void) const
Get the name of the LoadImage.
Definition: loadimage.hh:125
ActionPool::processOp
int4 processOp(PcodeOp *op, Funcdata &data)
Apply the next possible Rule to a PcodeOp.
Definition: action.cc:805
PrintC::emitPrototypeInputs
void emitPrototypeInputs(const FuncProto *proto)
Emit the input data-types of a function prototype.
Definition: printc.cc:1835
ArchitectureGhidra::buildTranslator
virtual Translate * buildTranslator(DocumentStorage &store)
Build the Translator object.
Definition: ghidra_arch.cc:293
CircleRange::setFull
void setFull(int4 size)
Set a completely full range.
Definition: rangeutil.cc:243
RuleSubfloatConvert
Perform SubfloatFlow analysis triggered by FLOAT_FLOAT2FLOAT.
Definition: ruleaction.hh:1327
SpacebaseSpace::setBaseRegister
void setBaseRegister(const VarnodeData &data, int4 origSize, bool stackGrowth)
Set the base register at time space is created.
Definition: translate.cc:65
TypeOpIntMult::TypeOpIntMult
TypeOpIntMult(TypeFactory *t)
Constructor.
Definition: typeop.cc:1234
RangeList::getLastRange
const Range * getLastRange(void) const
Get the last Range.
Definition: address.cc:482
ParameterBasic::overrideSizeLockType
virtual void overrideSizeLockType(Datatype *ct)
Change (override) the data-type of a size-locked parameter.
Definition: fspec.cc:2283
TypeOpFloatTrunc::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:646
GhidraCommand
Base class for a command to the decompiler as issued by a Ghidra client.
Definition: ghidra_process.hh:71
FloatFormat::extractSign
bool extractSign(uintb x) const
Extract the sign bit from the encoding.
Definition: float.cc:136
Element::value
vector< string > value
a (corresponding) list of attribute values for this element
Definition: xml.hh:154
FuncProto::setInputErrors
void setInputErrors(bool val)
Toggle the input error setting for this prototype.
Definition: fspec.hh:1273
FuncCallSpecs::matchCallCount
int4 matchCallCount
Number of calls to this sub-function within the calling function.
Definition: fspec.hh:1445
AliasChecker::sortAlias
void sortAlias(void) const
Sort the alias starting offsets.
Definition: varmap.cc:568
VarnodeBank::endLoc
VarnodeLocSet::const_iterator endLoc(AddrSpace *spaceid) const
Ending of Varnodes in given address space sorted by location.
Definition: varnode.cc:1172
ProtoStoreSymbol::getInput
virtual ProtoParameter * getInput(int4 i)
Get the i-th input parameter (or NULL if it doesn't exist)
Definition: fspec.cc:2535
SeqNum
A class for uniquely labelling and comparing PcodeOps.
Definition: address.hh:111
Architecture::context
ContextDatabase * context
Map from addresses to context settings.
Definition: architecture.hh:136
CPUI_FLOAT_NEG
@ CPUI_FLOAT_NEG
Floating-point negation (-)
Definition: opcodes.hh:97
OpBehaviorBoolOr
CPUI_BOOL_OR behavior.
Definition: opbehavior.hh:341
RuleSubvarShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7651
TypeFactory::getBase
Datatype * getBase(int4 s, type_metatype m)
Get atomic type.
Definition: type.cc:1679
RuleBitUndistribute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2606
Varnode::mark
@ mark
Prevents infinite loops.
Definition: varnode.hh:71
Funcdata::fillinExtrapop
int4 fillinExtrapop(void)
Recover and return the extrapop for this function.
Definition: funcdata.cc:490
CommentSorter::setupFunctionList
void setupFunctionList(uint4 tp, const Funcdata *fd, const CommentDatabase &db, bool displayUnplaced)
Collect and sort comments specific to the given function.
Definition: comment.cc:332
PcodeOpBank::endDead
list< PcodeOp * >::const_iterator endDead(void) const
End of all PcodeOps marked as dead.
Definition: op.hh:300
XmlArchitecture::XmlArchitecture
XmlArchitecture(const string &fname, const string &targ, ostream *estream)
Constructor.
Definition: xml_arch.cc:85
LoadImageXml::getArchType
virtual string getArchType(void) const
Get a string indicating the architecture type.
Definition: loadimage_xml.hh:47
RuleAddMultCollapse
Collapse constants in an additive or multiplicative expression.
Definition: ruleaction.hh:689
CommentDatabase::endComment
virtual CommentSet::const_iterator endComment(const Address &fad) const =0
Get an iterator to the ending of comments for a single function.
translate.hh
Classes for disassembly and pcode generation.
SubvariableFlow::sextrestrictions
bool sextrestrictions
Check for logical variables that are always sign extended into their container.
Definition: subflow.hh:84
OpBehaviorIntZext::recoverInputUnary
virtual uintb recoverInputUnary(int4 sizeout, uintb out, int4 sizein) const
Reverse the unary op-code operation, recovering the input value.
Definition: opbehavior.cc:241
TypeOpMulti
Information about the MULTIEQUAL op-code.
Definition: typeop.hh:671
ValueSet::computeTypeCode
bool computeTypeCode(void)
Figure out if this value set is absolute or relative.
Definition: rangeutil.cc:1553
FuncCallSpecs::paramshiftModifyStop
bool paramshiftModifyStop(Funcdata &data)
Throw out any paramshift parameters.
Definition: fspec.cc:4924
CommentSorter::Subsort::operator<
bool operator<(const Subsort &op2) const
Compare comments based on basic block, then position within the block.
Definition: comment.hh:205
RuleIntLessEqual::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:653
Funcdata::endDef
VarnodeDefSet::const_iterator endDef(void) const
End of all Varnodes sorted by definition address.
Definition: funcdata.hh:339
LoadImageGhidra::glb
ArchitectureGhidra * glb
The owning Architecture and connection to the client.
Definition: loadimage_ghidra.hh:30
ParamListMerged::getType
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:584
FlowBlock::calcDepth
int4 calcDepth(const FlowBlock *leaf) const
Get the depth of the given component FlowBlock.
Definition: block.cc:344
FuncProto::is_override
@ is_override
Set if this prototype is created to override a single call site.
Definition: fspec.hh:1162
ParamListStandard::forceExclusionGroup
void forceExclusionGroup(ParamActive *active) const
Enforce exclusion rules for the given set of parameter trials.
Definition: fspec.cc:711
ExternRefSymbol
A function Symbol referring to an external location.
Definition: database.hh:296
FlowBlock::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:707
ScopeKey::dedupId
uintb dedupId
A duplication id for the Scope.
Definition: database.hh:385
JumpValuesRangeDefault::getStartOp
virtual PcodeOp * getStartOp(void) const
Get the PcodeOp associated with the current value.
Definition: jumptable.cc:362
Scope::addCodeLabel
LabSymbol * addCodeLabel(const Address &addr, const string &nm)
Create a code label at the given address in this Scope.
Definition: database.cc:1604
JavaError::type
string type
The name of the Java exception class.
Definition: ghidra_arch.hh:34
Range::saveXml
void saveXml(ostream &s) const
Save this Range to an XML stream.
Definition: address.cc:264
RuleConditionalMove::BoolExpress::op
PcodeOp * op
PcodeOp constructing the boolean value.
Definition: ruleaction.hh:1354
RuleAndDistribute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1297
LanguageDescription::processorspec
string processorspec
Name of .pspec file.
Definition: sleigh_arch.hh:56
ProtoParameter::getSize
virtual int4 getSize(void) const =0
Get the number of bytes occupied by this parameter.
RuleStoreVarnode::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:726
ParamEntry::smallsize_sext
@ smallsize_sext
Assume values that are below the max size are sign extended into this container.
Definition: fspec.hh:54
TypePointer::TypePointer
TypePointer(const TypePointer &op)
Construct from another TypePointer.
Definition: type.hh:229
PartialSymbolEntry::token
const OpToken * token
Operator used to drill-down to the field.
Definition: printc.hh:46
TraceDAG::BranchPoint::~BranchPoint
~BranchPoint(void)
BranchPoint owns its BlockTraces.
Definition: blockaction.cc:569
Funcdata::endLoc
VarnodeLocSet::const_iterator endLoc(int4 s, const Address &addr) const
End of Varnodes with given storage.
Definition: funcdata.hh:319
TypeOpStore::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:466
RuleZextSless::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2556
ScopeGhidra::removeSymbolMappings
virtual void removeSymbolMappings(Symbol *symbol)
Remove all SymbolEntrys from the given Symbol.
Definition: database_ghidra.hh:104
Scope::findDistinguishingScope
const Scope * findDistinguishingScope(const Scope *op2) const
Find first ancestor of this not shared by given scope.
Definition: database.cc:1422
ArchitectureGhidra::resolveArchitecture
virtual void resolveArchitecture(void)
Figure out the processor and compiler of the target executable.
Definition: ghidra_arch.cc:361
BlockDoWhile::markLabelBumpUp
virtual void markLabelBumpUp(bool bump)
Let hierarchical blocks steal labels of their (first) components.
Definition: block.cc:2955
PcodeEmit::restorePackedOp
const uint1 * restorePackedOp(const Address &addr, const uint1 *ptr, const AddrSpaceManager *trans)
Emit pcode directly from a packed byte stream.
Definition: translate.cc:974
AddrSpace::setFlags
void setFlags(uint4 fl)
Set a cached attribute.
Definition: space.hh:249
FloatFormat
Encoding information for a single floating-point format.
Definition: float.hh:30
DocumentStorage::registerTag
void registerTag(const Element *el)
Register the given XML Element object under its tag name.
DeregisterProgram::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:194
AddTreeState::valid
bool valid
Full tree search was performed.
Definition: ruleaction.hh:40
TypeOpSubpiece::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:704
PrintC::option_hide_exts
bool option_hide_exts
Set to true if we should hide implied extension operations.
Definition: printc.hh:120
ToOpEdge::hash
uint4 hash(uint4 reg) const
Hash this edge into an accumulator.
Definition: dynamic.cc:89
ActionSpacebase::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:271
SymbolEntry::EntrySubsort::EntrySubsort
EntrySubsort(const EntrySubsort &op2)
Copy constructor.
Definition: database.hh:100
BlockGraph::clearVisitCount
void clearVisitCount(void)
Clear the visit count in all node FlowBlocks.
Definition: block.cc:1833
ActionExtraPopSetup::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:644
Translate::allowContextSet
virtual void allowContextSet(bool val) const
Toggle whether disassembly is allowed to affect context.
Definition: translate.hh:346
BreakTableCallBack::doAddressBreak
virtual bool doAddressBreak(const Address &addr)
Invoke any breakpoints for the given address.
Definition: emulate.cc:87
TypeOp::selectJavaOperators
static void selectJavaOperators(vector< TypeOp * > &inst, bool val)
Toggle Java specific aspects of the op-code information.
Definition: typeop.cc:112
ValueSet::MAX_STEP
static const int4 MAX_STEP
Definition: rangeutil.hh:113
OpBehaviorFloatLess
CPUI_FLOAT_LESS behavior.
Definition: opbehavior.hh:364
BlockBasic::op
list< PcodeOp * > op
The sequence of p-code operations.
Definition: block.hh:365
RuleFuncPtrEncoding::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:8168
CPoolRecord::restoreXml
void restoreXml(const Element *el, TypeFactory &typegrp)
Restore object from XML stream.
Definition: cpool.cc:77
RuleTermOrder::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:699
CircleRange::invert
int4 invert(void)
Convert to complementary range.
Definition: rangeutil.cc:531
SleighBase::getAllRegisters
virtual void getAllRegisters(map< VarnodeData, string > &reglist) const
Get a list of all register names and the corresponding location.
Definition: sleighbase.cc:129
Funcdata::removeUnreachableBlocks
bool removeUnreachableBlocks(bool issuewarning, bool checkexistence)
Remove any unreachable basic blocks.
Definition: funcdata_block.cc:341
RuleEquality
Collapse INT_EQUAL and INT_NOTEQUAL: f(V,W) == f(V,W) => true
Definition: ruleaction.hh:201
OtherSpace
Special AddrSpace for special/user-defined address spaces.
Definition: space.hh:186
CommentSorter::Subsort::order
uint4 order
The order index within the basic block.
Definition: comment.hh:198
RuleCarryElim::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3659
Architecture::highPtrPossible
bool highPtrPossible(const Address &loc, int4 size) const
Are pointers possible to the given location?
Definition: architecture.hh:303
PrintLanguage::opIntSub
virtual void opIntSub(const PcodeOp *op)=0
Emit a INT_SUB operator.
subflow.hh
Classes for reducing/splitting Varnodes containing smaller logical values.
ScopeInternal::nextUniqueId
uint8 nextUniqueId
Next available symbol id.
Definition: database.hh:735
TraceDAG::BranchPoint::getPathStart
FlowBlock * getPathStart(int4 i)
Get the start of the i-th BlockTrace.
Definition: blockaction.cc:534
TypeFactory::restoreXmlType
Datatype * restoreXmlType(const Element *el)
Restore Datatype from XML.
Definition: type.cc:1920
AddrSpace::reverse_justification
@ reverse_justification
Justification within aligned word is opposite of endianness.
Definition: space.hh:81
Rule
Class for performing a single transformation on a PcodeOp or Varnode.
Definition: action.hh:192
OpBehaviorFloatAbs::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:429
BfdArchitecture
Architecture that reads executable files using GNU BFD libraries.
Definition: bfd_arch.hh:38
EmitNoXml::emitsXml
virtual bool emitsXml(void) const
Determine if this is an XML markup emitter.
Definition: prettyprint.hh:262
ValueSet::getLandMark
const CircleRange * getLandMark(void) const
Get any landmark range.
Definition: rangeutil.cc:1728
Comment::user1
@ user1
The first user defined property.
Definition: comment.hh:47
ActionNameVars::OpRecommend
This class is a record in a database used to store and lookup potential names.
Definition: coreaction.hh:460
RuleDivTermAdd2
Simplify another expression associated with optimized division.
Definition: ruleaction.hh:1151
SubvariableFlow::ReplaceOp::replacement
PcodeOp * replacement
The new op.
Definition: subflow.hh:55
ProtoModelMerged
A prototype model made by merging together other models.
Definition: fspec.hh:880
Architecture::nohighptr
RangeList nohighptr
Ranges for which high-level pointers are not possible.
Definition: architecture.hh:146
ActionPool::addRule
void addRule(Rule *rl)
Add a Rule to the pool.
Definition: action.cc:723
EmitPrettyPrint::beginFuncProto
virtual int4 beginFuncProto(void)
Begin a function prototype declaration.
Definition: prettyprint.cc:980
TypeFactoryGhidra
An implementation of the TypeFactory interface, query a Ghidra client for data-type information.
Definition: typegrp_ghidra.hh:30
FlowInfo::truncateIndirectJump
void truncateIndirectJump(PcodeOp *op, int4 failuremode)
Treat indirect jump as indirect call that never returns.
Definition: flow.cc:720
JumpTable::clear
void clear(void)
Clear instance specific data for this jump-table.
Definition: jumptable.cc:2570
PrintJavaCapability::buildLanguage
virtual PrintLanguage * buildLanguage(Architecture *glb)
Build the main PrintLanguage object corresponding to this capability.
Definition: printjava.cc:31
PcodeInjectLibrary::getPayloadId
int4 getPayloadId(int4 type, const string &nm) const
Map name and type to the payload id.
Definition: pcodeinject.cc:252
ParamTrial::entry
const ParamEntry * entry
PrototypeModel entry matching this trial.
Definition: fspec.hh:175
AncestorRealistic::pop_solid
@ pop_solid
Backtracking, from path with successful, solid, movement, via COPY, LOAD, or other arith/logical.
Definition: funcdata.hh:600
PrintLanguage::emitBlockLs
virtual void emitBlockLs(const BlockList *bl)=0
Emit a sequence of blocks.
PrintLanguage::hide_thisparam
@ hide_thisparam
Do not print the 'this' parameter in argument lists.
Definition: printlanguage.hh:152
MapIterator::curiter
list< SymbolEntry >::const_iterator curiter
Current SymbolEntry being iterated.
Definition: database.hh:333
TraceDAG::rootlist
vector< FlowBlock * > rootlist
List of root FlowBlocks to trace from.
Definition: blockaction.hh:155
OpBehaviorIntAdd::recoverInputBinary
virtual uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering an input value.
Definition: opbehavior.cc:281
rangemap::erase
void erase(typename std::list< _recordtype >::iterator v)
Erase a given record from the container.
Definition: rangemap.hh:281
RuleLoadVarnode::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3932
Heritage::buildADT
void buildADT(void)
Build the augmented dominator tree.
Definition: heritage.cc:1873
EmulatePcodeOp::executeNew
virtual void executeNew(void)
Standard behavior for (low-level) NEW op.
Definition: emulateutil.cc:142
RuleDoubleShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1845
PrintC::modulo
static OpToken modulo
The modulo operator.
Definition: printc.hh:80
ScopeInternal::renameSymbol
virtual void renameSymbol(Symbol *sym, const string &newname)
Rename a Symbol within this Scope.
Definition: database.cc:2020
EmitPrettyPrint::tagVariable
virtual void tagVariable(const char *ptr, syntax_highlight hl, const Varnode *vn, const PcodeOp *op)
Emit a variable token.
Definition: prettyprint.cc:999
RuleDoubleArithShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1917
EmitXml::param_color
@ param_color
Function parameters.
Definition: prettyprint.hh:94
Funcdata::endLoc
VarnodeLocSet::const_iterator endLoc(AddrSpace *spaceid) const
End of Varnodes stored in a given address space.
Definition: funcdata.hh:307
Scope::attachScope
void attachScope(Scope *child)
Attach a new child Scope to this.
Definition: database.cc:801
OpBehaviorIntSub::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:288
ProtoStoreSymbol::saveXml
virtual void saveXml(ostream &s) const
Save any parameters that are not backed by symbols to an XML stream.
Definition: fspec.cc:2583
LoadGuard::maximumOffset
uintb maximumOffset
Maximum offset of the LOAD.
Definition: heritage.hh:111
ArchitectureGhidra::getTrackedRegisters
Document * getTrackedRegisters(const Address &addr)
Retrieve tracked register values at the given address.
Definition: ghidra_arch.cc:414
PrintC::opIntSext
virtual void opIntSext(const PcodeOp *op, const PcodeOp *readOp)
Emit a INT_SEXT operator.
Definition: printc.cc:607
ConditionMarker
A helper class for describing the similarity of the boolean condition between 2 CBRANCH operations.
Definition: condexe.hh:33
SeqNum::getOrder
uintm getOrder(void) const
Get the order field of a sequence number.
Definition: address.hh:132
PcodeOpBank::optree
PcodeOpTree optree
The main sequence number sort.
Definition: op.hh:246
Funcdata::saveXmlTree
void saveXmlTree(ostream &s) const
Save an XML description of the p-code tree to stream.
Definition: funcdata.cc:636
RuleOrPredicate::MultiPredicate
A helper class to mark up predicated INT_OR expressions.
Definition: condexe.hh:213
BlockGraph::calcLoop
void calcLoop(void)
Calculate loop edges.
Definition: block.cc:1997
TraceDAG::finishblock
FlowBlock * finishblock
Designated exit block for the DAG (or null)
Definition: blockaction.hh:161
Scope::makeNameUnique
virtual string makeNameUnique(const string &nm) const =0
Produce a version of the given symbol name that won't collide with other names in this Scope.
CPUI_INT_ADD
@ CPUI_INT_ADD
Addition, signed or unsigned (+)
Definition: opcodes.hh:60
FlowBlock::restoreXmlBody
virtual void restoreXmlBody(List::const_iterator &iter, List::const_iterator enditer, BlockMap &resolver)
Restore details about this FlowBlock from an XML stream.
Definition: block.hh:183
SegmentedResolver::segop
SegmentOp * segop
The segment operator.
Definition: architecture.hh:285
UserOpManage::setDefaults
void setDefaults(Architecture *glb)
Create any required operations if they weren't explicitly defined.
Definition: userop.cc:333
ParamEntry::isLeftJustified
bool isLeftJustified(void) const
Is the logical value left-justified within its container.
Definition: fspec.hh:76
UserOpManage::parseCallOtherFixup
void parseCallOtherFixup(const Element *el, Architecture *glb)
Parse a <callotherfixup> XML tag.
Definition: userop.cc:467
BreakCallBack::addressCallback
virtual bool addressCallback(const Address &addr)
Call back method for address based breakpoints.
Definition: emulate.hh:115
Architecture::parseCompilerConfig
void parseCompilerConfig(DocumentStorage &store)
Apply compiler specific configuration.
Definition: architecture.cc:1113
TypeArray::arraysize
int4 arraysize
Number of elements in the array.
Definition: type.hh:249
RawBinaryArchitecture::postSpecFile
virtual void postSpecFile(void)
Let components initialize after Translate is built.
Definition: raw_arch.cc:71
AddrSpaceManager::getConstantSpace
AddrSpace * getConstantSpace(void) const
Get the constant space.
Definition: translate.hh:507
RuleSubvarZext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7683
JumpValuesRange::isReversible
virtual bool isReversible(void) const
Return true if the current value can be reversed to get a label.
Definition: jumptable.hh:195
OverlaySpace
An overlay space.
Definition: space.hh:238
FlowBlock::f_mark2
@ f_mark2
A secondary mark.
Definition: block.hh:82
PrintC::isCharacterConstant
virtual bool isCharacterConstant(const uint1 *buf, int4 size, int4 charsize) const
Decide is the given byte array looks like a character string.
Definition: printc.cc:1953
FlowBlock::compareFinalOrder
static bool compareFinalOrder(const FlowBlock *bl1, const FlowBlock *bl2)
Final FlowBlock comparison.
Definition: block.cc:665
Merge::mergeRangeMust
void mergeRangeMust(VarnodeLocSet::const_iterator startiter, VarnodeLocSet::const_iterator enditer)
Force the merge of a ranges of Varnodes with the same size and storage address.
Definition: merge.cc:234
RuleModOpt::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1212
RuleSub2Add::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:672
ActionInferTypes::buildLocaltypes
static void buildLocaltypes(Funcdata &data)
Assign initial data-type based on local info.
Definition: coreaction.cc:4054
RuleOrPredicate::MultiPredicate::zeroPathIsTrue
bool zeroPathIsTrue
True if path to zero set is the true path out of condBlock.
Definition: condexe.hh:220
TypeOpCopy::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:350
Action::perform
int4 perform(Funcdata &data)
Perform this action (if necessary)
Definition: action.cc:290
VarnodeData::getAddr
Address getAddr(void) const
Get the location of the varnode as an address.
Definition: pcoderaw.hh:85
error.hh
Base class for error handling facilities.
Override::flowoverride
map< Address, uint4 > flowoverride
Override the CALL <-> BRANCH.
Definition: override.hh:56
LoadImage::getReadonly
virtual void getReadonly(RangeList &list) const
Return list of readonly address ranges.
Definition: loadimage.hh:184
ParamEntry::contains
bool contains(const ParamEntry &op2) const
Does this contain the indicated entry.
Definition: fspec.cc:63
UserOpManage::useroplist
vector< UserPcodeOp * > useroplist
Description objects indexed by CALLOTHER constant id.
Definition: userop.hh:251
TypeOpBoolNegate
Information about the BOOL_NEGATE op-code.
Definition: typeop.hh:517
OpBehaviorFloatAbs
CPUI_FLOAT_ABS behavior.
Definition: opbehavior.hh:428
PrintLanguage::Atom::Atom
Atom(const string &nm, tagtype t, EmitXml::syntax_highlight hl)
Construct a token with no associated data-flow annotations.
Definition: printlanguage.hh:207
LanguageDescription::isbigendian
bool isbigendian
Set to true if this processor is big-endian.
Definition: sleigh_arch.hh:51
PrintLanguage::emitLineComment
virtual void emitLineComment(int4 indent, const Comment *comm)
Emit a comment line.
Definition: printlanguage.cc:699
BlockWhileDo::markLabelBumpUp
virtual void markLabelBumpUp(bool bump)
Let hierarchical blocks steal labels of their (first) components.
Definition: block.cc:2918
TypeOpInt2Comp::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1057
ArchitectureGhidra::getUserOpName
string getUserOpName(int4 index)
Get the name of a user-defined p-code op.
Definition: ghidra_arch.cc:432
SizePass::pass
int4 pass
Pass when the range was heritaged.
Definition: heritage.hh:32
AddrSpace::isOtherSpace
bool isOtherSpace(void) const
Return true if this is the other address space.
Definition: space.hh:429
OptionErrorTooManyInstructions
Toggle whether too many instructions in one function body is considered a fatal error.
Definition: options.hh:231
FloatFormat::exp_size
int4 exp_size
Number of bits in exponent.
Definition: float.hh:46
ArchitectureGhidra::getCodeLabel
string getCodeLabel(const Address &addr)
Retrieve a label at the given address.
Definition: ghidra_arch.cc:515
ExternRefSymbol::refaddr
Address refaddr
The placeholder address for meta-data.
Definition: database.hh:297
CPUI_INT_SDIV
@ CPUI_INT_SDIV
Integer division, signed (/)
Definition: opcodes.hh:75
Element::addContent
void addContent(const char *str, int4 start, int4 length)
Append new character content to this element.
Definition: xml.hh:168
SleighBase::SleighBase
SleighBase(void)
Construct an uninitialized translator.
Definition: sleighbase.cc:20
TypeCode::printRaw
virtual void printRaw(ostream &s) const
Print a description of the type to stream.
Definition: type.cc:960
InjectPayload::orderParameters
void orderParameters(void)
Assign an index to parameters.
Definition: pcodeinject.cc:44
RulePtrsubUndo::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6160
CommentDatabaseGhidra::ghidra
ArchitectureGhidra * ghidra
The Architecture and connection to the Ghidra client.
Definition: comment_ghidra.hh:31
JumpModel::findUnnormalized
virtual void findUnnormalized(uint4 maxaddsub, uint4 maxleftright, uint4 maxext)=0
Recover the unnormalized switch variable.
ScopeGhidra::reresolveScope
Scope * reresolveScope(const vector< string > &path) const
Find the Scope that will contain a result Symbol.
Definition: database_ghidra.cc:63
PrintC::typecast
static OpToken typecast
The type cast operator.
Definition: printc.hh:77
TokenSplit::endDocument
void endDocument(int4 id)
Create an "end document" command.
Definition: prettyprint.hh:358
FlowBlock::f_entry_point
@ f_entry_point
Official entry point of the function.
Definition: block.hh:83
PrintLanguage::opBoolXor
virtual void opBoolXor(const PcodeOp *op)=0
Emit a BOOL_XOR operator.
ProtoModelMerged::selectModel
ProtoModel * selectModel(ParamActive *active) const
Select the best model given a set of trials.
Definition: fspec.cc:2217
EmulateMemory::executeCallother
virtual void executeCallother(void)
Standard behavior for a user-defined p-code op.
Definition: emulate.cc:290
ArchitectureGhidra::buildCommentDB
virtual void buildCommentDB(DocumentStorage &store)
Build the comment database.
Definition: ghidra_arch.cc:343
PrintC::opIntXor
virtual void opIntXor(const PcodeOp *op)
Emit a INT_XOR operator.
Definition: printc.hh:249
Merge::data
Funcdata & data
The function containing the Varnodes to be merged.
Definition: merge.hh:81
OpFollow::restoreXml
void restoreXml(const Element *el)
Restore this node from an XML stream.
Definition: userop.cc:84
ActionPreferComplement::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: blockaction.hh:288
PcodeOp::isCpoolTransformed
bool isCpoolTransformed(void) const
Return true if we have already examined this cpool.
Definition: op.hh:206
UserOpManage::manualCallOtherFixup
void manualCallOtherFixup(const string &useropname, const string &outname, const vector< string > &inname, const string &snippet, Architecture *glb)
Manually install an InjectedUserOp given just names of the user defined op and the p-code snippet.
Definition: userop.cc:506
CPoolRecord::byteDataLen
int4 byteDataLen
The number of bytes in the data for a string literal.
Definition: cpool.hh:70
PreferSplitManager::SplitInstance
Definition: prefersplit.hh:30
Datatype::getSubType
virtual Datatype * getSubType(uintb off, uintb *newoff) const
Recover component data-type one-level down.
Definition: type.cc:86
ParamListStandard::forceInactiveChain
void forceInactiveChain(ParamActive *active, int4 maxchain, int4 start, int4 stop) const
Enforce rules about chains of inactive slots.
Definition: fspec.cc:778
TypeChar::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:329
Funcdata::opUnsetOutput
void opUnsetOutput(PcodeOp *op)
Remove output Varnode from the given PcodeOp.
Definition: funcdata_op.cc:50
CPUI_INT_SUB
@ CPUI_INT_SUB
Subtraction, signed or unsigned (-)
Definition: opcodes.hh:61
EmulateSnippet::executeBranch
virtual void executeBranch(void)
Standard behavior for a BRANCH.
Definition: emulateutil.cc:202
FlowBlock::findCommonBlock
static FlowBlock * findCommonBlock(FlowBlock *bl1, FlowBlock *bl2)
Find the common dominator of two FlowBlocks.
Definition: block.cc:692
RulePullsubIndirect::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:240
EmitPrettyPrint::closeGroup
virtual void closeGroup(int4 id)
End a group of things that are printed together.
Definition: prettyprint.cc:1102
ProtoModel::likelytrash
vector< VarnodeData > likelytrash
Storage locations potentially carrying trash values.
Definition: fspec.hh:623
OpBehaviorFloatTrunc::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:677
FloatFormat::opFloor
uintb opFloor(uintb a) const
Floor (floor)
Definition: float.cc:539
PrintLanguage::pushSymbol
virtual void pushSymbol(const Symbol *sym, const Varnode *vn, const PcodeOp *op)=0
Push a specific Symbol onto the RPN stack.
PrintC::opFloatSub
virtual void opFloatSub(const PcodeOp *op)
Emit a FLOAT_SUB operator.
Definition: printc.hh:272
SubvariableFlow::ReplaceOp::output
ReplaceVarnode * output
Varnode output.
Definition: subflow.hh:58
JumpValuesRangeDefault::getSize
virtual uintb getSize(void) const
Return the number of values the variables can take.
Definition: jumptable.cc:322
SleighBase::userop
vector< string > userop
Names of user-define p-code ops for this Translate object.
Definition: sleighbase.hh:31
RuleBoolNegate::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:937
ActionStartCleanUp::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:63
PrintC::emitStructDefinition
void emitStructDefinition(const TypeStruct *ct)
Emit the definition of a structure data-type.
Definition: printc.cc:1724
PcodeInjectLibrary::callFixupMap
map< string, int4 > callFixupMap
Map of registered call-fixup names to injection id.
Definition: pcodeinject.hh:167
TypeOpIntMult::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:480
BlockDoWhile
A loop structure where the condition is checked at the bottom.
Definition: block.hh:599
get_opname
const char * get_opname(OpCode opc)
Convert an OpCode to the name as a string.
Definition: opcodes.cc:58
ConditionalJoin::checkExitBlock
void checkExitBlock(BlockBasic *exit, int4 in1, int4 in2)
Look for additional Varnode pairs in an exit block that need to be merged.
Definition: blockaction.cc:1934
TypeOpIntNegate::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1071
ScopeLocal::adjustFit
bool adjustFit(RangeHint &a) const
Make the given RangeHint fit in the current Symbol map.
Definition: varmap.cc:429
PrintC::emitSwitchCase
void emitSwitchCase(int4 casenum, const BlockSwitch *switchbl)
Emit labels for a case block.
Definition: printc.cc:2675
CPUI_EXTRACT
@ CPUI_EXTRACT
Extract a bit-range.
Definition: opcodes.hh:124
Scope::discoverScope
Scope * discoverScope(const Address &addr, int4 sz, const Address &usepoint)
Find the owning Scope of a given memory range.
Definition: database.cc:1255
FlowBlock::intothis
vector< BlockEdge > intothis
Blocks which (can) fall into this block.
Definition: block.hh:114
TokenSplit::numspaces
int4 numspaces
Number of spaces in a whitespace token (tokenbreak)
Definition: prettyprint.hh:342
PcodeOpBank::addToCodeList
void addToCodeList(PcodeOp *op)
Add given PcodeOp to specific op-code list.
Definition: op.cc:623
BlockEdge
A control-flow edge between blocks (FlowBlock)
Definition: block.hh:44
TypeOpFloatCeil::TypeOpFloatCeil
TypeOpFloatCeil(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1461
CommentDatabaseGhidra::addCommentNoDuplicate
virtual bool addCommentNoDuplicate(uint4 tp, const Address &fad, const Address &ad, const string &txt)
Add a new comment to the container, making sure there is no duplicate.
Definition: comment_ghidra.cc:64
RuleSplitFlow::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7330
CompilerTag::spec
string spec
cspec file for this compiler
Definition: sleigh_arch.hh:31
GuardRecord::indpath
int4 indpath
Specific CBRANCH path going to the switch.
Definition: jumptable.hh:133
VolatileWriteOp::restoreXml
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.cc:75
PrintLanguage::checkPrintNegation
virtual bool checkPrintNegation(const Varnode *vn)=0
Check whether a given boolean Varnode can be printed in negated form.
ActionMarkImplied::checkImpliedCover
static bool checkImpliedCover(Funcdata &data, Varnode *vn)
Check for cover violation if Varnode is implied.
Definition: coreaction.cc:2887
OpBehaviorIntScarry::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:314
OpToken::unary_prefix
@ unary_prefix
Unary operator form (printed before its input)
Definition: printlanguage.hh:86
SymbolEntry::inUse
bool inUse(const Address &usepoint) const
Is this storage valid for the given code address.
Definition: database.cc:90
TypeOpPtrsub::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:737
TypeOpSubpiece::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1585
FuncCallSpecs::transferLockedOutput
bool transferLockedOutput(Varnode *&newoutput)
Pass back the Varnode needed to match the output parameter (return value)
Definition: fspec.cc:4195
PreferSplitRecord
Definition: prefersplit.hh:23
EmitXml::stopIndent
virtual void stopIndent(int4 id)
End an indent level.
Definition: prettyprint.hh:154
Heritage::getDeadCodeDelay
int4 getDeadCodeDelay(AddrSpace *spc) const
Get pass delay for heritaging the given space.
Definition: heritage.cc:2368
ParameterSymbol::getType
virtual Datatype * getType(void) const
Get the data-type associate with this.
Definition: fspec.cc:2316
ArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)=0
Build an Architecture given a raw file or data.
ParamListRegister
An unstructured model for passing input parameters to a function.
Definition: fspec.hh:561
ProtoModel::name
string name
Name of the model.
Definition: fspec.hh:618
UnspecializedPcodeOp
A user defined p-code op with no specialization.
Definition: userop.hh:70
LoadImage::LoadImage
LoadImage(const string &f)
LoadImage constructor.
Definition: loadimage.hh:114
ParamEntry::justifiedContain
int4 justifiedContain(const Address &addr, int4 sz) const
Calculate endian aware containment.
Definition: fspec.cc:94
ActionCopyMarker::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:982
ActionConstbase::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:256
Rule::count_apply
uint4 count_apply
Number of times this Rule has successfully been applied.
Definition: action.hh:208
DynamicRecommend::hash
uint8 hash
Hash encoding the Symbols environment.
Definition: varmap.hh:51
TypeOpEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:304
TypeOpMulti::TypeOpMulti
TypeOpMulti(TypeFactory *t)
Constructor.
Definition: typeop.cc:1482
LoadTable::size
int4 size
Size of table entry.
Definition: jumptable.hh:44
RuleHighOrderAnd::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1233
TraceDAG::removeTrace
void removeTrace(BlockTrace *trace)
Remove the indicated BlockTrace.
Definition: blockaction.cc:649
PrintLanguage::emitBlockGoto
virtual void emitBlockGoto(const BlockGoto *bl)=0
Emit a block ending with a goto statement.
RuleAndOrLump::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:462
Varnode::size
int4 size
Size of the Varnode in bytes.
Definition: varnode.hh:124
RuleSLess2Zero::getHiBit
static Varnode * getHiBit(PcodeOp *op)
Get the piece containing the sign-bit.
Definition: ruleaction.cc:5305
FlowBlock::nameToType
static block_type nameToType(const string &name)
Get the block_type associated with a name string.
Definition: block.cc:613
JumpBasicOverride::adset
set< Address > adset
Absolute address table (manually specified)
Definition: jumptable.hh:426
Widener::doWidening
virtual bool doWidening(const ValueSet &valueSet, CircleRange &range, const CircleRange &newRange)=0
For an iteration that isn't stabilizing attempt to widen the given ValueSet.
EmulatePcodeOp::executeCpoolRef
virtual void executeCpoolRef(void)
Standard behavior for a CPOOLREF (constant pool reference) op.
Definition: emulateutil.cc:136
Funcdata::descend2Undef
bool descend2Undef(Varnode *vn)
Transform all reads of the given Varnode to a special undefined constant.
Definition: funcdata_varnode.cc:419
LoopBody::compare_head
static int4 compare_head(LoopBody *a, FlowBlock *looptop)
Compare just the head.
Definition: blockaction.cc:482
ScopeLocal::localRange
RangeList localRange
The set of addresses that might hold mapped locals (not parameters)
Definition: varmap.hh:184
RangeHint::sstart
intb sstart
A signed version of the starting offset.
Definition: varmap.hh:82
EmulatePcodeOp
Emulation based on (existing) PcodeOps and Varnodes.
Definition: emulateutil.hh:41
Funcdata::glb
Architecture * glb
Global configuration data.
Definition: funcdata.hh:66
EmitPrettyPrint::tagComment
virtual void tagComment(const char *ptr, syntax_highlight hl, const AddrSpace *spc, uintb off)
Emit a comment string as part of the generated source code.
Definition: prettyprint.cc:1044
AssemblyEmit
Abstract class for emitting disassembly to an application.
Definition: translate.hh:118
TraceDAG::BadEdgeScore::exitproto
FlowBlock * exitproto
Putative exit block for the BlockTrace.
Definition: blockaction.hh:145
PcodeOp::is_constructor
@ is_constructor
Op is call to a constructor.
Definition: op.hh:104
BlockGraph::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:297
SegmentOp::SegmentOp
SegmentOp(Architecture *g, const string &nm, int4 ind)
Constructor.
Definition: userop.cc:121
RuleDoubleLoad
Definition: double.hh:303
ProtoModel::defaultParamRange
void defaultParamRange(void)
Set the default stack range used for input parameters.
Definition: fspec.cc:1706
PrintLanguage::scopestack
vector< Scope * > scopestack
The symbol scope stack.
Definition: printlanguage.hh:233
GhidraTranslate::restoreXml
void restoreXml(const Element *el)
Initialize this Translate from XML.
Definition: ghidra_translate.cc:148
AncestorRealistic::enter_node
@ enter_node
Extending path into new Varnode.
Definition: funcdata.hh:598
ParamListMerged::assignMap
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
ProtoStoreInternal
A collection of parameter descriptions without backing symbols.
Definition: fspec.hh:1106
PrintLanguage::opCpoolRefOp
virtual void opCpoolRefOp(const PcodeOp *op)=0
Emit a CPOOLREF operator.
Funcdata::sblocks
BlockGraph sblocks
Structured block hierarchy (on top of basic blocks)
Definition: funcdata.hh:79
PrintLanguage::formatBinary
static void formatBinary(ostream &s, uintb val)
Print a number in binary form.
Definition: printlanguage.cc:874
JumpValuesRange::range
CircleRange range
Acceptable range of values for the normalized switch variable.
Definition: jumptable.hh:179
RuleDoubleSub::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1810
JumpTable
A map from values to control-flow targets within a function.
Definition: jumptable.hh:499
PrintLanguage::emitAtom
void emitAtom(const Atom &atom)
Send an variable token from the RPN to the emitter.
Definition: printlanguage.cc:373
SleighArchitecture::normalizeArchitecture
static string normalizeArchitecture(const string &nm)
Try to recover a language id string.
Definition: sleigh_arch.cc:379
AddrSpace::read
virtual uintb read(const string &s, int4 &size) const
Read in an address (and possible size) from a string.
Definition: space.cc:237
Funcdata::blocks_generated
@ blocks_generated
Set if Basic blocks have been generated.
Definition: funcdata.hh:48
PrintLanguage::setIntegerFormat
virtual void setIntegerFormat(const string &nm)
Set the default integer format.
Definition: printlanguage.cc:792
LaneDescription
Description of logical lanes within a big Varnode.
Definition: transform.hh:126
GhidraTranslate
An implementation of Translate that queries a Ghidra client for p-code information.
Definition: ghidra_translate.hh:34
ParamList::checkJoin
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.
LaneDescription::LaneDescription
LaneDescription(const LaneDescription &op2)
Copy constructor.
Definition: transform.cc:20
ContextGhidra::cache
TrackedSet cache
A cache of previously fetched tracked registers.
Definition: ghidra_context.hh:33
AncestorRealistic::State::op
PcodeOp * op
Operation along the path to the Varnode.
Definition: funcdata.hh:575
Varnode::printRaw
void printRaw(ostream &s) const
Print a simple identifier plus additional info identifying Varnode with SSA form.
Definition: varnode.cc:634
DynamicHash::getIsNotAttached
static bool getIsNotAttached(uint8 h)
Retrieve the attachment boolean from a hash.
Definition: dynamic.cc:517
CastStrategy::setTypeFactory
void setTypeFactory(TypeFactory *t)
Establish the data-type factory.
Definition: cast.cc:21
PcodeOpRaw::seq
SeqNum seq
Identifying address and index of this operation.
Definition: pcoderaw.hh:96
OpBehaviorPiece::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:717
EmitXml::syntax_highlight
syntax_highlight
Possible types of syntax highlighting.
Definition: prettyprint.hh:87
DynamicHash::gatherUnmarkedVn
void gatherUnmarkedVn(void)
Move staged Varnodes into the sub-graph and mark them.
Definition: dynamic.cc:167
CastStrategyC::localExtensionType
virtual int4 localExtensionType(const Varnode *vn) const
Decide on integer promotion by examining just local properties of the given Varnode.
Definition: cast.cc:61
Funcdata::setBasicBlockRange
void setBasicBlockRange(BlockBasic *bb, const Address &beg, const Address &end)
Set the initial ownership range for the given basic block.
Definition: funcdata.hh:497
BreakTableCallBack::registerPcodeCallback
void registerPcodeCallback(const string &nm, BreakCallBack *func)
Register a pcode based breakpoint.
Definition: emulate.cc:23
CPUI_INT_EQUAL
@ CPUI_INT_EQUAL
Integer comparison, equality (==)
Definition: opcodes.hh:51
OptionIgnoreUnimplemented
Toggle whether unimplemented instructions are treated as a no-operation.
Definition: options.hh:213
ActionMarkImplied::isPossibleAliasStep
static bool isPossibleAliasStep(Varnode *vn1, Varnode *vn2)
Check for additive relationship.
Definition: coreaction.cc:2790
PrintC::opIntLeft
virtual void opIntLeft(const PcodeOp *op)
Emit a INT_LEFT operator.
Definition: printc.hh:252
OpBehaviorFloatInt2Float
CPUI_FLOAT_INT2FLOAT behavior.
Definition: opbehavior.hh:444
ActionVarnodeProps::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:219
TYPE_ARRAY
@ TYPE_ARRAY
Array data-type, made up of a sequence of "element" datatype.
Definition: type.hh:44
RuleShift2Mult
Convert INT_LEFT to INT_MULT: V << 2 => V * 4
Definition: ruleaction.hh:599
Varnode::directwrite
@ directwrite
(could be) Directly affected by a valid input
Definition: varnode.hh:96
Varnode::nolocalalias
@ nolocalalias
There are no aliases pointing to this varnode.
Definition: varnode.hh:84
ActionDynamicSymbols
Make final attachments of dynamically mapped symbols to Varnodes.
Definition: coreaction.hh:997
ArchitectureGhidra::sendParamMeasures
bool sendParamMeasures
True if measurements for argument and return parameters should be sent.
Definition: ghidra_arch.hh:70
FlowBlock::f_label_bumpup
@ f_label_bumpup
Any label printed higher up in hierarchy.
Definition: block.hh:86
ParseError::ParseError
ParseError(const string &s)
Initialize the error with an explanatory string.
Definition: error.hh:67
Datatype::utf16
@ utf16
16-bit wide chars in unicode UTF16
Definition: type.hh:75
TypeUnicode::TypeUnicode
TypeUnicode(const string &nm, int4 sz, type_metatype m)
Construct given name,size, meta-type.
Definition: type.cc:359
TransformVar::constant
@ constant
A new constant Varnode.
Definition: transform.hh:36
Funcdata::getFirstReturnOp
PcodeOp * getFirstReturnOp(void) const
Clone a PcodeOp into this function.
Definition: funcdata_op.cc:582
ConditionMarker::state
int4 state
Depth of critical path.
Definition: condexe.hh:42
TypeOpIntSborrow::TypeOpIntSborrow
TypeOpIntSborrow(TypeFactory *t)
Constructor.
Definition: typeop.cc:1034
OpBehaviorFloatSub::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:614
Translate::registerContext
virtual void registerContext(const string &name, int4 sbit, int4 ebit)
Add a new context variable to the model for this processor.
Definition: translate.hh:327
CommentDatabaseGhidra::fillCache
void fillCache(const Address &fad) const
Fetch comments for the given function.
Definition: comment_ghidra.cc:28
CastStrategyC::isSextCast
virtual bool isSextCast(Datatype *outtype, Datatype *intype) const
Is sign-extending an input data-type, producing an output data-type, considered a cast.
Definition: cast.cc:343
partmap::split
_valuetype & split(const _linetype &pnt)
Introduce a new split point.
Definition: partmap.hh:117
ParamTrial::addr
Address addr
Starting address of the memory range.
Definition: fspec.hh:172
CPoolRecord
A description of a byte-code object referenced by a constant.
Definition: cpool.hh:44
BreakTable::doAddressBreak
virtual bool doAddressBreak(const Address &addr)=0
Invoke any breakpoints associated with this machine address.
CommentDatabaseGhidra::beginComment
virtual CommentSet::const_iterator beginComment(const Address &fad) const
Get an iterator to the beginning of comments for a single function.
Definition: comment_ghidra.cc:70
FlowBlock::restoreXmlEdges
void restoreXmlEdges(List::const_iterator &iter, List::const_iterator enditer, BlockMap &resolver)
Restore edges from an XML stream.
Definition: block.cc:2363
RuleLessEqual2Zero::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5265
PrintLanguage::unicodeNeedsEscape
static bool unicodeNeedsEscape(int4 codepoint)
Determine if the given codepoint needs to be escaped.
Definition: printlanguage.cc:408
JumpModel::getTableSize
virtual int4 getTableSize(void) const =0
Return the number of entries in the address table.
ActionForceGoto::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:137
JumpTable::jmodel
JumpModel * jmodel
Current model of how the jump table is implemented in code.
Definition: jumptable.hh:509
ParamEntry::group
int4 group
Group of (mutually exclusive) entries that this entry belongs to.
Definition: fspec.hh:64
PcodeOpBank::target
PcodeOp * target(const Address &addr) const
Find the first executing PcodeOp for a target address.
Definition: op.cc:824
ScopeKey::operator<
bool operator<(const ScopeKey &op2) const
Comparison operator.
Definition: database.cc:788
PrintC::opIntSright
virtual void opIntSright(const PcodeOp *op)
Emit a INT_SRIGHT operator.
Definition: printc.hh:254
AddrSpaceManager::truncateSpace
void truncateSpace(const TruncationTag &tag)
Mark a space as truncated from its original size.
Definition: translate.cc:709
rangemap::find
std::pair< const_iterator, const_iterator > find(linetype a) const
Find sub-ranges intersecting the given boundary point.
Definition: rangemap.hh:332
OptionDatabase::registerOption
void registerOption(ArchOption *option)
Map from ArchOption name to its class instance.
Definition: options.cc:40
ActionPool
A pool of Rules that apply simultaneously.
Definition: action.hh:259
Heritage::loadCopyOps
vector< PcodeOp * > loadCopyOps
List of COPY ops generated by load guards.
Definition: heritage.hh:216
ParamEntry::groupsize
int4 groupsize
The number of consecutive groups taken by the entry.
Definition: fspec.hh:65
RuleHighOrderAnd
Simplify INT_AND when applied to aligned INT_ADD: (V + c) & 0xfff0 => V + (c & 0xfff0)
Definition: ruleaction.hh:268
TypeOp::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:199
PrintLanguage::comma_separate
@ comma_separate
Statements within condition.
Definition: printlanguage.hh:147
ActionSetCasts::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:319
CastStrategy::arithmeticOutputStandard
virtual Datatype * arithmeticOutputStandard(const PcodeOp *op)=0
What is the output data-type produced by the given integer arithmetic operation.
PrintLanguage::opFloatDiv
virtual void opFloatDiv(const PcodeOp *op)=0
Emit a FLOAT_DIV operator.
TypeOpIntSright::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1202
PrintLanguage::glb
Architecture * glb
The Architecture owning the language emitter.
Definition: printlanguage.hh:242
RangeHint::compare
int4 compare(const RangeHint &op2) const
Order this with another RangeHint.
Definition: varmap.cc:247
ParamList::unjustifiedContainer
virtual bool unjustifiedContainer(const Address &loc, int4 size, VarnodeData &res) const =0
Check if the given storage location looks like an unjustified parameter.
RuleEqual2Constant::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5597
TransformManager::newPreexistingOp
TransformOp * newPreexistingOp(int4 numParams, OpCode opc, PcodeOp *originalOp)
Create a new placeholder op for an existing PcodeOp.
Definition: transform.cc:546
EmulateSnippet::executeCpoolRef
virtual void executeCpoolRef(void)
Standard behavior for a CPOOLREF (constant pool reference) op.
Definition: emulateutil.cc:270
TypeOpExtract::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1856
TransformVar::split_terminator
@ split_terminator
The last (most significant piece) of a split array.
Definition: transform.hh:41
OptionStructAlign::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:301
ActionReturnSplit::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: blockaction.cc:2245
EmulateMemory::executeBinary
virtual void executeBinary(void)
Execute a binary arithmetic/logical operation.
Definition: emulate.cc:225
ParamTrial::size
int4 size
Number of bytes in the memory range.
Definition: fspec.hh:173
FloatFormat::bias
int4 bias
What to add to real exponent to get encoding.
Definition: float.hh:47
TypeBase::TypeBase
TypeBase(int4 s, type_metatype m)
Construct TypeBase from a size and meta-type.
Definition: type.hh:165
EmulateSnippet::varList
vector< VarnodeData * > varList
Varnodes allocated for ops.
Definition: emulateutil.hh:114
FuncCallSpecs::countMatchingCalls
static void countMatchingCalls(const vector< FuncCallSpecs * > &qlst)
Calculate the number of times an individual sub-function is called.
Definition: fspec.cc:4963
PrintC::binary_minus
static OpToken binary_minus
The binary subtraction operator.
Definition: printc.hh:82
PrintC::emitAnyLabelStatement
void emitAnyLabelStatement(const FlowBlock *bl)
Emit any required label statement for a given control-flow block.
Definition: printc.cc:2762
TypeOpUnary::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:290
TokenSplit::beginDocument
int4 beginDocument(void)
Create a "begin document" command.
Definition: prettyprint.hh:352
Address::operator+
Address operator+(int4 off) const
Increment address by a number of bytes.
Definition: address.hh:394
Action::rule_warnings_given
@ rule_warnings_given
A warning has been issued for this action.
Definition: action.hh:59
ActionStartTypes::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:71
Funcdata::linkSymbolReference
Symbol * linkSymbolReference(Varnode *vn)
Discover and attach Symbol to a constant reference.
Definition: funcdata_varnode.cc:1007
EmulateSnippet::executeIndirect
virtual void executeIndirect(void)
Standard behavior for an INDIRECT op.
Definition: emulateutil.cc:258
ScopeMapper::linetype
Address linetype
The linear element for a rangemap.
Definition: database.hh:806
BlockGoto::gototype
uint4 gototype
The type of unstructured branch (f_goto_goto, f_break_goto, etc.)
Definition: block.hh:444
TypeFactory::clearNoncore
void clearNoncore(void)
Clear out non-core types.
Definition: type.cc:1338
PrintLanguage::Atom::Atom
Atom(const string &nm, tagtype t, EmitXml::syntax_highlight hl, const Datatype *c)
Construct a token for a data-type name.
Definition: printlanguage.hh:211
BlockGraph::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:1237
ValueSet::Equation::slot
int4 slot
The input parameter slot to which the constraint is attached.
Definition: rangeutil.hh:121
PcodeOpBank
Container class for PcodeOps associated with a single function.
Definition: op.hh:245
ProtoModel::paramrange
RangeList paramrange
Memory range(s) of space-based parameters.
Definition: fspec.hh:627
RuleTrivialShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:561
AddrSpace::getShortcut
char getShortcut(void) const
Get the shortcut character.
Definition: space.hh:375
PrintLanguage::opUnary
void opUnary(const OpToken *tok, const PcodeOp *op)
Push a unary operator onto the RPN stack.
Definition: printlanguage.cc:686
LoadImage::loadFill
virtual void loadFill(uint1 *ptr, int4 size, const Address &addr)=0
Get data from the LoadImage.
PrintC::option_NULL
bool option_NULL
Set to true if we should emit NULL keyword.
Definition: printc.hh:115
FlowBlock::hasLoopOut
bool hasLoopOut(void) const
Is there a looping edge going out of this block.
Definition: block.cc:407
LoadImageGhidra::getArchType
virtual string getArchType(void) const
Get a string indicating the architecture type.
Definition: loadimage_ghidra.cc:41
JumpAssisted::switchvn
Varnode * switchvn
The switch variable.
Definition: jumptable.hh:476
AddrSpaceManager::getConstant
Address getConstant(uintb val) const
Get a constant encoded as an Address.
Definition: translate.hh:517
CircleRange::contains
bool contains(const CircleRange &op2) const
Check containment of another range in this.
Definition: rangeutil.cc:299
ConstantPoolInternal::CheapSorter::saveXml
void saveXml(ostream &s) const
Serialize the reference to an XML element.
Definition: cpool.cc:176
RuleSignNearMult::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7090
RuleTermOrder::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:712
ParamListStandard::maxdelay
int4 maxdelay
Maximum heritage delay across all parameters.
Definition: fspec.hh:494
Address::operator<=
bool operator<=(const Address &op2) const
Compare two addresses via their natural ordering.
Definition: address.hh:369
EmulateFunction::collectloads
bool collectloads
Set to true if the emulator collects individual LOAD addresses.
Definition: jumptable.hh:103
ConditionalExecution::verifySameCondition
bool verifySameCondition(void)
Verify that initblock and iblock branch on the same condition.
Definition: condexe.cc:422
HighVariable::getSymbolEntry
SymbolEntry * getSymbolEntry(void) const
Definition: variable.cc:278
TransformVar::bitSize
int4 bitSize
Size of the logical value in bits.
Definition: transform.hh:50
FlowInfo::deleteRemainingOps
void deleteRemainingOps(list< PcodeOp * >::const_iterator oiter)
Delete any remaining ops at the end of the instruction.
Definition: flow.cc:225
Varnode::eraseDescend
void eraseDescend(PcodeOp *op)
Erase a descendant (reading) PcodeOp from this Varnode's list.
Definition: varnode.cc:289
TypeOpFloatRound
Information about the FLOAT_ROUND op-code.
Definition: typeop.hh:664
AddrSpaceManager::createConstFromSpace
Address createConstFromSpace(AddrSpace *spc) const
Create a constant address encoding an address space.
Definition: translate.hh:527
Funcdata::nodeSplitInputPatch
void nodeSplitInputPatch(BlockBasic *b, BlockBasic *bprime, int4 inedge)
Patch Varnode inputs to p-code ops in split basic block.
Definition: funcdata_block.cc:831
RuleShiftBitops::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:530
ArchOption::name
string name
Name of the option.
Definition: options.hh:34
TypeStruct::getFieldIter
int4 getFieldIter(int4 off) const
Get index into field list.
Definition: type.cc:741
Varnode::printCover
void printCover(ostream &s) const
Print raw coverage info about the Varnode.
Definition: varnode.cc:242
Varnode::implied
@ implied
This varnode is a temporary variable.
Definition: varnode.hh:79
ProtoModel::deriveOutputMap
void deriveOutputMap(ParamActive *active) const
Given a list of output trials, derive the most likely output prototype.
Definition: fspec.hh:660
TypeOpBoolXor::TypeOpBoolXor
TypeOpBoolXor(TypeFactory *t)
Constructor.
Definition: typeop.cc:1335
PrintJava::doEmitWideCharPrefix
virtual bool doEmitWideCharPrefix(void) const
Return true if this language requires a prefix when expressing wide characters.
Definition: printjava.hh:64
RuleDivOpt::findForm
static Varnode * findForm(PcodeOp *op, int4 &n, uintb &y, int4 &xsize, OpCode &extopc)
Check for INT_(S)RIGHT and/or SUBPIECE followed by INT_MULT.
Definition: ruleaction.cc:6778
JumpTable::saveXml
void saveXml(ostream &s) const
Save this jump-table as a <jumptable> XML tag.
Definition: jumptable.cc:2596
BlockSwitch::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:3158
RuleConcatZero
Simplify concatenation with zero: concat(V,0) => zext(V) << c
Definition: ruleaction.hh:824
LanedRegister::LanedIterator::size
int4 size
Current lane size.
Definition: transform.hh:93
TypeFactory::saveXml
void saveXml(ostream &s) const
Save this container to stream.
Definition: type.cc:1981
Architecture::max_term_duplication
int4 max_term_duplication
Max terms duplicated without a new variable.
Definition: architecture.hh:124
RuleDumptyHump::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:887
PrintLanguage::mostNaturalBase
static int4 mostNaturalBase(uintb val)
Determine the most natural base for an integer.
Definition: printlanguage.cc:812
CPUI_FLOAT_SUB
@ CPUI_FLOAT_SUB
Floating-point subtraction (-)
Definition: opcodes.hh:96
PcodeOpRaw::getOpcode
OpCode getOpcode(void) const
Get the opcode for this op.
Definition: pcoderaw.hh:135
ParameterSymbol::getSymbol
virtual Symbol * getSymbol(void) const
Retrieve the formal Symbol associated with this parameter.
Definition: fspec.cc:2411
Funcdata::spliceBlockBasic
void spliceBlockBasic(BlockBasic *bl)
Merge the given basic block with the block it flows into.
Definition: funcdata_block.cc:971
ProtoStoreSymbol::outparam
ProtoParameter * outparam
The return-value parameter.
Definition: fspec.hh:1084
ActionStackPtrFlow::checkClog
static int4 checkClog(Funcdata &data, AddrSpace *id, int4 spcbase)
Find any stack pointer clogs and pass it on to the repair routines.
Definition: coreaction.cc:429
BlockGraph::structureLoops
void structureLoops(vector< FlowBlock * > &rootlist)
Label loop edges.
Definition: block.cc:2087
PcodeOpBank::removeFromCodeList
void removeFromCodeList(PcodeOp *op)
Remove given PcodeOp from specific op-code list.
Definition: op.cc:644
PrintLanguage::opFloatNan
virtual void opFloatNan(const PcodeOp *op)=0
Emit a FLOAT_NAN operator.
Override::protoover
map< Address, FuncProto * > protoover
Override prototype at call-point.
Definition: override.hh:54
ParameterBasic::clone
virtual ProtoParameter * clone(void) const
Clone the parameter.
Definition: fspec.cc:2303
PrintC::equal
static OpToken equal
The equal operator.
Definition: printc.hh:89
ParamTrial::flags
uint4 flags
Boolean properties of the trial.
Definition: fspec.hh:171
Merge::compareCopyByInVarnode
static bool compareCopyByInVarnode(PcodeOp *op1, PcodeOp *op2)
Compare COPY ops first by Varnode input, then by block containing the op.
Definition: merge.cc:943
IPTR_SPACEBASE
@ IPTR_SPACEBASE
addresses = offsets off of base register
Definition: space.hh:31
Scope::begin
virtual MapIterator begin(void) const =0
Beginning iterator to mapped SymbolEntrys.
CoverBlock::getUIndex
static uintm getUIndex(const PcodeOp *op)
Get the comparison index for a PcodeOp.
Definition: cover.cc:27
Architecture::init
void init(DocumentStorage &store)
Load the image and configure architecture.
Definition: architecture.cc:1235
SubvariableFlow::doReplacement
void doReplacement(void)
Perform the discovered transform, making logical values explicit.
Definition: subflow.cc:1327
CommentDatabaseGhidra::saveXml
virtual void saveXml(ostream &s) const
Save all comments in the container to an XML stream.
Definition: comment_ghidra.hh:48
TypePointer::ptrto
Datatype * ptrto
Type being pointed to.
Definition: type.hh:222
RuleCarryElim::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:662
OpBehavior::isspecial
bool isspecial
Is op not a normal unary or binary op.
Definition: opbehavior.hh:45
StackEqn::rhs
int4 rhs
Right hand side of the equation.
Definition: coreaction.cc:25
TypeOpFloatLessEqual::TypeOpFloatLessEqual
TypeOpFloatLessEqual(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1377
RuleSubCancel::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4711
AddrSpace::highest
uintb highest
Highest (byte) offset into this space.
Definition: space.hh:99
ProtoStoreInternal::voidtype
Datatype * voidtype
Cached reference to the void data-type.
Definition: fspec.hh:1107
ConstantPoolInternal::cpoolMap
map< CheapSorter, CPoolRecord > cpoolMap
A map from reference to constant pool record.
Definition: cpool.hh:190
ConditionMarker::binaryop
PcodeOp * binaryop
The binary operator producing the root boolean (if non-null)
Definition: condexe.hh:39
DynamicHash::getSlotFromHash
static int4 getSlotFromHash(uint8 h)
Retrieve the encoded slot from a hash.
Definition: dynamic.cc:469
ScopeInternal::findExternalRef
virtual ExternRefSymbol * findExternalRef(const Address &addr) const
Find an external reference at the given address.
Definition: database.cc:2205
ScoreProtoModel::isinputscore
bool isinputscore
True if scoring against input parameters, false for outputs.
Definition: fspec.hh:856
PcodeEmitCache::dump
virtual void dump(const Address &addr, OpCode opc, VarnodeData *outvar, VarnodeData *vars, int4 isize)
The main pcode emit method.
Definition: emulate.cc:121
CPoolRecord::saveXml
void saveXml(ostream &s) const
Save object to an XML stream.
Definition: cpool.cc:20
BfdArchitectureCapability
Extension point for building a GNU BFD capable Architecture.
Definition: bfd_arch.hh:25
TypeOpInsert::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1841
BlockBasic::insert
void insert(list< PcodeOp * >::iterator iter, PcodeOp *inst)
Insert p-code operation at a given position.
Definition: block.cc:2151
PrintJava
The java-language token emitter.
Definition: printjava.hh:55
PrintC::opIntDiv
virtual void opIntDiv(const PcodeOp *op)
Emit a INT_DIV operator.
Definition: printc.hh:256
TokenSplit::end_comment
@ end_comment
End of a comment block.
Definition: prettyprint.hh:289
Heritage::boundary_node
@ boundary_node
Augmented Dominator Tree boundary node.
Definition: heritage.hh:173
RuleFloatRange::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:311
OpBehaviorIntXor
CPUI_INT_XOR behavior.
Definition: opbehavior.hh:240
TypeOpCpoolref::TypeOpCpoolref
TypeOpCpoolref(TypeFactory *t)
Constructor.
Definition: typeop.cc:1759
CPUI_SUBPIECE
@ CPUI_SUBPIECE
Truncate.
Definition: opcodes.hh:115
EmitPrettyPrint::beginBlock
virtual int4 beginBlock(const FlowBlock *bl)
Begin a control-flow element.
Definition: prettyprint.cc:888
ContextInternal::restoreContext
void restoreContext(const Element *el, const Address &addr1, const Address &addr2)
Restore a context blob for given address range from an XML tag.
Definition: globalcontext.cc:352
ScopeLocal
A Symbol scope for local variables of a particular function.
Definition: varmap.hh:182
TokenSplit::startIndent
int4 startIndent(int4 bump)
Create a "start a new indent level" command.
Definition: prettyprint.hh:548
ActionGroup::state
vector< Action * >::iterator state
Current action being applied.
Definition: action.hh:145
TypeSpacebase::getMap
Scope * getMap(void) const
Get the symbol table indexed by this.
Definition: type.cc:1111
ConstantPoolGhidra::cache
ConstantPoolInternal cache
The local cache of previouly queried CPoolRecord objects.
Definition: cpool_ghidra.hh:33
RulePtrArith
Transform pointer arithmetic.
Definition: ruleaction.hh:995
RulePositiveDiv::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1131
Translate::setDefaultFloatFormats
void setDefaultFloatFormats(void)
If no explicit float formats, set up default formats.
Definition: translate.cc:852
FuncCallSpecs::getFspecFromConst
static FuncCallSpecs * getFspecFromConst(const Address &addr)
Convert FspecSpace addresses to the underlying FuncCallSpecs object.
Definition: fspec.hh:1520
MemoryState::getMemoryBank
MemoryBank * getMemoryBank(AddrSpace *spc) const
Get a memory bank associated with a particular space.
Definition: memstate.cc:634
FlowInfo::flags
uint4 flags
Boolean options for flow following.
Definition: flow.hh:99
ActionInferTypes::propagateGoodEdge
static bool propagateGoodEdge(PcodeOp *op, int4 inslot, int4 outslot, Varnode *invn)
Determine if propagation should happen along the given edge.
Definition: coreaction.cc:4182
condexe.hh
Classes for simplifying control-flow with shared conditional expressions.
PrintC::opSubpiece
virtual void opSubpiece(const PcodeOp *op)
Emit a SUBPIECE operator.
Definition: printc.cc:638
FlowInfo::generateOps
void generateOps(void)
Generate raw control-flow from the function's base address.
Definition: flow.cc:749
TypeArray::arrayof
Datatype * arrayof
type of which we have an array
Definition: type.hh:248
TokenSplit::stat_e
@ stat_e
End of a statement.
Definition: prettyprint.hh:306
LaneDescription::subset
bool subset(int4 lsbOffset, int4 size)
Trim this to a subset of the original lanes.
Definition: transform.cc:68
ScopeInternal
An in-memory implementation of the Scope interface.
Definition: database.hh:721
Varnode::lisconsume
@ lisconsume
In consume worklist.
Definition: varnode.hh:115
GhidraDecompCapability::initialize
virtual void initialize(void)
Complete initialization of an extension point.
Definition: ghidra_process.cc:491
AddrSpaceManager::numSpaces
int4 numSpaces(void) const
Get the number of address spaces for this processor.
Definition: translate.hh:535
TokenSplit::tagType
void tagType(const char *ptr, EmitXml::syntax_highlight h, const Datatype *ct)
Create a data-type identifier token.
Definition: prettyprint.hh:472
Scope::findExternalRef
virtual ExternRefSymbol * findExternalRef(const Address &addr) const =0
Find an external reference at the given address.
varmap.hh
Classes for keeping track of local variables and reconstructing stack layout.
TypeSpacebase::getSubType
virtual Datatype * getSubType(uintb off, uintb *newoff) const
Recover component data-type one-level down.
Definition: type.cc:1123
ActionDoNothing::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2985
Funcdata::opDestroy
void opDestroy(PcodeOp *op)
Remove given PcodeOp and destroy its Varnode operands.
Definition: funcdata_op.cc:201
TypeFactory::setupSizes
void setupSizes(void)
Derive some size information from Architecture.
Definition: type.cc:1229
ActionPool::op_state
PcodeOpTree::const_iterator op_state
Current PcodeOp up for rule application.
Definition: action.hh:262
TreeHandler::root
Element * root
The root XML element being processed by this handler.
Definition: xml.hh:218
EmitXml::tagField
virtual void tagField(const char *ptr, syntax_highlight hl, const Datatype *ct, int4 off)
Emit an identifier for a field within a structured data-type.
Definition: prettyprint.cc:234
BlockGraph::removeFromFlowSplit
void removeFromFlowSplit(FlowBlock *bl, bool flipflow)
Remove FlowBlock splitting flow between input and output edges.
Definition: block.cc:1475
RuleZextEliminate::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2487
Partition
A range of nodes (within the weak topological ordering) that are iterated together.
Definition: rangeutil.hh:159
ParameterBasic::name
string name
The name of the parameter, "" for undefined or return value parameters.
Definition: fspec.hh:965
JoinRecord
A record describing how logical values are split.
Definition: translate.hh:195
Override::RETURN
@ RETURN
Replace primary BRANCH or CALL with a suitable RETURN operation.
Definition: override.hh:48
HighEdge::operator<
bool operator<(const HighEdge &op2) const
Comparator.
Definition: merge.hh:35
PcodeOpBank::moveSequenceDead
void moveSequenceDead(PcodeOp *firstop, PcodeOp *lastop, PcodeOp *prev)
Move a sequence of PcodeOps to a point in the dead list.
Definition: op.cc:791
Funcdata::endLoc
VarnodeLocSet::const_iterator endLoc(void) const
End of all Varnodes sorted by storage.
Definition: funcdata.hh:301
RuleShiftCompare::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2050
RangeList::inRange
bool inRange(const Address &addr, int4 size) const
Check containment an address range.
Definition: address.cc:402
ActionMarkExplicit::OpStackElement
This class holds a single entry in a stack used to traverse Varnode expressions.
Definition: coreaction.hh:417
Funcdata::jumptablerecovery_on
@ jumptablerecovery_on
Set if this Funcdata object is dedicated to jump-table recovery.
Definition: funcdata.hh:54
FlowInfo::insn_count
uint4 insn_count
Number of instructions flowed through.
Definition: flow.hh:92
FloatFormat::signbit_pos
int4 signbit_pos
Bit position of sign bit.
Definition: float.hh:42
FloatFormat::frac_pos
int4 frac_pos
(lowest) bit position of fractional part
Definition: float.hh:43
Varnode::stack_store
@ stack_store
Created by an explicit STORE.
Definition: varnode.hh:119
RuleNotDistribute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1190
SubvariableFlow::tryReturnPull
bool tryReturnPull(PcodeOp *op, ReplaceVarnode *rvn, int4 slot)
Determine if the given subgraph variable can act as return value for the given RETURN op.
Definition: subflow.cc:235
PrintC::opIntNegate
virtual void opIntNegate(const PcodeOp *op)
Emit a INT_NEGATE operator.
Definition: printc.hh:248
Address::operator<<
friend ostream & operator<<(ostream &s, const Address &addr)
Write out an address to stream.
Definition: address.cc:34
RangeHint::size
int4 size
Number of bytes in a single element of this range.
Definition: varmap.hh:81
JumpValuesRange::getStartVarnode
virtual Varnode * getStartVarnode(void) const
Get the Varnode associated with the current value.
Definition: jumptable.cc:300
RuleThreeWayCompare::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1413
TypeOpInsert::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:786
PcodeOp::isBoolOutput
bool isBoolOutput(void) const
Return true if this op produces a boolean output.
Definition: op.hh:173
JumpValuesRangeDefault::isReversible
virtual bool isReversible(void) const
Return true if the current value can be reversed to get a label.
Definition: jumptable.hh:218
InjectPayload::inject
virtual void inject(InjectContext &context, PcodeEmit &emit) const =0
ConditionMarker::flipstate
bool flipstate[2]
Boolean negation along the critical path.
Definition: condexe.hh:44
TraceDAG::checkRetirement
bool checkRetirement(BlockTrace *trace, FlowBlock *&exitblock)
Check if a given BlockTrace can be retired.
Definition: blockaction.cc:859
SymbolEntry::getAllFlags
uint4 getAllFlags(void) const
Get all Varnode flags for this storage.
Definition: database.hh:239
ActionActiveParam::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1638
Architecture::collectBehaviors
void collectBehaviors(vector< OpBehavior * > &behave) const
Provide a list of OpBehavior objects.
Definition: architecture.cc:297
EmulatePcodeOp::executeIndirect
virtual void executeIndirect(void)
Standard behavior for an INDIRECT op.
Definition: emulateutil.cc:110
FuncProto::setOutputLock
void setOutputLock(bool val)
Toggle the data-type lock on the return value.
Definition: fspec.cc:3091
EmitPrettyPrint::openParen
virtual int4 openParen(char o, int4 id=0)
Emit an open parenthesis.
Definition: prettyprint.cc:1071
FlowBlock::f_unstructured_targ
@ f_unstructured_targ
Block is destination of unstructured goto.
Definition: block.hh:80
ConditionalExecution::testOpRead
bool testOpRead(Varnode *vn, PcodeOp *op)
Can we move the (non MULTIEQUAL) defining p-code of the given Varnode.
Definition: condexe.cc:473
ProtoModel::glb
Architecture * glb
The Architecture owning this prototype model.
Definition: fspec.hh:617
ActionCopyMarker
Mark COPY operations between Varnodes representing the object as non-printing.
Definition: coreaction.hh:975
CPUI_INT_LESSEQUAL
@ CPUI_INT_LESSEQUAL
Integer comparison, unsigned less-than-or-equal (<=)
Definition: opcodes.hh:57
ValueSetSolver::partitionSurround
void partitionSurround(Partition &part)
Create a full partition component.
Definition: rangeutil.cc:1949
ParamEntryRange::entry
ParamEntry * entry
Pointer to the actual ParamEntry.
Definition: fspec.hh:108
BlockInfLoop::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:3005
SubvariableFlow::flowsize
int4 flowsize
Size of the logical data-flow in bytes.
Definition: subflow.hh:80
functionalEqualityLevel
int4 functionalEqualityLevel(Varnode *vn1, Varnode *vn2, Varnode **res1, Varnode **res2)
Try to determine if vn1 and vn2 contain the same value.
Definition: op.cc:975
Symbol::setDisplayFormat
void setDisplayFormat(uint4 val)
Set the display format for this Symbol.
Definition: database.hh:230
Emulate::executeLoad
virtual void executeLoad(void)=0
Standard behavior for a p-code LOAD.
SleighArchitecture::shutdown
static void shutdown(void)
Shutdown this SleighArchitecture and free all resources.
Definition: sleigh_arch.cc:463
RuleTestSign::findComparisons
void findComparisons(Varnode *vn, vector< PcodeOp * > &res)
Find INT_EQUAL or INT_NOTEQUAL taking the sign bit as input.
Definition: ruleaction.cc:3262
VarnodeData::contains
bool contains(const VarnodeData &op2) const
Does this container another given VarnodeData.
Definition: pcoderaw.cc:48
SymbolEntry::offset
int4 offset
Offset into the Symbol that this covers.
Definition: database.hh:57
CoverBlock::contain
bool contain(const PcodeOp *point) const
Check containment of given point.
Definition: cover.cc:105
LoopBody::head
FlowBlock * head
head of the loop
Definition: blockaction.hh:45
TokenSplit::bloc_b
@ bloc_b
Start of a control-flow section.
Definition: prettyprint.hh:299
CPUI_CBRANCH
@ CPUI_CBRANCH
Conditional branch.
Definition: opcodes.hh:41
MapState::range
RangeList range
The subset of ranges, within the whole address space to analyze.
Definition: varmap.hh:147
Action::ruleflags
ruleflags
Boolean behavior properties governing this particular Action.
Definition: action.hh:53
ActionSwitchNorm::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:574
ParamListStandard::getMaxDelay
virtual int4 getMaxDelay(void) const
Return the maximum heritage delay across all possible parameters.
Definition: fspec.hh:529
AddrSpace::refcount
int4 refcount
Number of managers using this space.
Definition: space.hh:97
RuleConcatShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:381
FlowInfo::fallthruOp
PcodeOp * fallthruOp(PcodeOp *op) const
Find fallthru pcode-op for given op.
Definition: flow.cc:86
PrintLanguage::recurse
void recurse(void)
Emit from the RPN stack as much as possible.
Definition: printlanguage.cc:639
FuncProto::deriveInputMap
void deriveInputMap(ParamActive *active) const
Given a list of input trials, derive the most likely inputs for this prototype.
Definition: fspec.hh:1297
Scope::findClosestFit
virtual SymbolEntry * findClosestFit(const Address &addr, int4 size, const Address &usepoint) const =0
Find Symbol which is the closest fit to the given memory range.
Architecture::getSpaceBySpacebase
AddrSpace * getSpaceBySpacebase(const Address &loc, int4 size) const
Get space associated with a spacebase register.
Definition: architecture.cc:201
ContextInternal::createSet
virtual TrackedSet & createSet(const Address &addr1, const Address &addr2)
Create a tracked register set that is valid over the given range.
Definition: globalcontext.cc:482
ActionLikelyTrash::countMarks
static uint4 countMarks(PcodeOp *op)
Definition: coreaction.cc:1918
JumpBasic
The basic switch model.
Definition: jumptable.hh:344
XmlArchitecture
An Architecture that loads executables using an XML format.
Definition: xml_arch.hh:34
ConditionalExecution::fixReturnOp
void fixReturnOp(void)
Reproduce COPY data-flow into RETURN ops affected by the removal of iblock.
Definition: condexe.cc:669
RulePullsubMulti::minMaxUse
static void minMaxUse(Varnode *vn, int4 &maxByte, int4 &minByte)
Compute minimum and maximum bytes being used.
Definition: ruleaction.cc:732
ValueSet::equations
vector< Equation > equations
Any equations associated with this value set.
Definition: rangeutil.hh:137
PrintLanguage::opIntCarry
virtual void opIntCarry(const PcodeOp *op)=0
Emit a INT_CARRY operator.
Funcdata::unimplemented_present
@ unimplemented_present
Set if function contains unimplemented instructions.
Definition: funcdata.hh:57
FlowInfo::tablelist
vector< PcodeOp * > tablelist
List of BRANCHIND ops (preparing for jump table recovery)
Definition: flow.hh:87
Funcdata::markIndirectOnly
void markIndirectOnly(void)
Mark illegal input Varnodes used only in INDIRECTs.
Definition: funcdata_varnode.cc:679
TreeHandler::ignorableWhitespace
virtual void ignorableWhitespace(const char *text, int4 start, int4 length)
Callback with whitespace character data for the current XML element.
Definition: xml.hh:234
TypeFactory::getTypeSpacebase
TypeSpacebase * getTypeSpacebase(AddrSpace *id, const Address &addr)
Create a "spacebase" type.
Definition: type.cc:1843
PcodeEmit::unpackOffset
static const uint1 * unpackOffset(const uint1 *ptr, uintb &off)
Helper function for unpacking an offset from a pcode byte stream.
Definition: translate.cc:924
ConditionMarker::verifyCondition
bool verifyCondition(PcodeOp *op, PcodeOp *initop)
Perform the correlation test on two CBRANCH operations.
Definition: condexe.cc:341
ContextInternal::getRegionForSet
virtual void getRegionForSet(vector< uintm * > &res, const Address &addr1, const Address &addr2, int4 num, uintm mask)
Grab the context blob(s) for the given address range, marking bits that will be set.
Definition: globalcontext.cc:436
Scope::queryCodeLabel
LabSymbol * queryCodeLabel(const Address &addr) const
Look-up a code label by address.
Definition: database.cc:1223
FlowInfo::collectEdges
void collectEdges(void)
Collect edges between basic blocks as PcodeOp to PcodeOp pairs.
Definition: flow.cc:879
TYPE_INT
@ TYPE_INT
Signed integer. Signed is considered less specific than unsigned in C.
Definition: type.hh:37
TypeFactory::findById
virtual Datatype * findById(const string &n, uint8 id)
Search by name and id.
Definition: type.cc:1391
AddrSpaceManager::getJoinSpace
AddrSpace * getJoinSpace(void) const
Get the joining space.
Definition: translate.hh:460
Database::setPropertyRange
void setPropertyRange(uint4 flags, const Range &range)
Set boolean properties over a given memory range.
Definition: database.cc:2997
LoopBody::labelContainments
void labelContainments(const vector< FlowBlock * > &body, const vector< LoopBody * > &looporder)
Record any loops that body contains.
Definition: blockaction.cc:320
Funcdata::initActiveOutput
void initActiveOutput(void)
Definition: funcdata_varnode.cc:461
EmitPrettyPrint::beginVarDecl
virtual int4 beginVarDecl(const Symbol *sym)
Begin a variable declaration.
Definition: prettyprint.cc:942
ExecutablePcodeGhidra::ExecutablePcodeGhidra
ExecutablePcodeGhidra(Architecture *g, const string &src, const string &nm)
Constructor.
Definition: inject_ghidra.cc:106
ValueSetSolver::checkRelativeConstant
bool checkRelativeConstant(Varnode *vn, int4 &typeCode, uintb &value) const
Check if the given Varnode is a relative constant.
Definition: rangeutil.cc:2302
ActionPool::allrules
vector< Rule * > allrules
The set of Rules in this ActionPool.
Definition: action.hh:260
PrintLanguage::opPiece
virtual void opPiece(const PcodeOp *op)=0
Emit a PIECE operator.
Comment::Comment
Comment(uint4 tp, const Address &fad, const Address &ad, int4 uq, const string &txt)
Constructor.
Definition: comment.cc:24
ParamActive::ParamActive
ParamActive(bool recoversub)
Constructor an empty container.
Definition: fspec.cc:1379
PrintC::opPtrsub
virtual void opPtrsub(const PcodeOp *op)
Definition: printc.cc:691
PrintC::emitBlockBasic
virtual void emitBlockBasic(const BlockBasic *bb)
Emit statements in a basic block.
Definition: printc.cc:2291
RuleAddUnsigned::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6232
LaneDivide::WorkNode::lanes
TransformVar * lanes
Lane placeholders for underyling Varnode.
Definition: subflow.hh:170
PrintLanguage::opCall
virtual void opCall(const PcodeOp *op)=0
Emit a CALL operator.
Translate::unique_base
uintm unique_base
Starting offset into unique space.
Definition: translate.hh:295
TokenSplit::endVarDecl
void endVarDecl(int4 id)
Create an "end variable declaration" command.
Definition: prettyprint.hh:409
Datatype::name
string name
Name of type.
Definition: type.hh:81
BfdArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)
Build an Architecture given a raw file or data.
Definition: bfd_arch.cc:35
OpBehaviorFloatNeg::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:624
TypeOpIndirect::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1527
CastStrategyC
Casting strategies that are specific to the C language.
Definition: cast.hh:158
ActionPool::getSubRule
virtual Rule * getSubRule(const string &specify)
Retrieve a specific sub-rule by name.
Definition: action.cc:772
ParameterBasic::isHiddenReturn
virtual bool isHiddenReturn(void) const
Is this a pointer to storage for a return value.
Definition: fspec.hh:980
CollapseStructure::CollapseStructure
CollapseStructure(BlockGraph &g)
Construct given a control-flow graph.
Definition: blockaction.cc:1850
RuleLessEqual2Zero::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5259
ConditionalJoin::MergePair::side1
Varnode * side1
Varnode coming from block1.
Definition: blockaction.hh:235
earliestUseInBlock
PcodeOp * earliestUseInBlock(Varnode *vn, BlockBasic *bl)
Get the earliest use/read of a Varnode in a specified basic block.
Definition: funcdata_op.cc:1123
RuleBoolNegate::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5175
RuleOrPredicate::MultiPredicate::discoverCbranch
bool discoverCbranch(void)
Find CBRANCH operation that determines whether zero is set or not.
Definition: condexe.cc:917
ProtoStore::getInput
virtual ProtoParameter * getInput(int4 i)=0
Get the i-th input parameter (or NULL if it doesn't exist)
PcodeInjectLibrary::getCallMechanismName
string getCallMechanismName(int4 injectid) const
Get the call mechanism name associated with an id.
Definition: pcodeinject.cc:301
Funcdata::baseaddr
Address baseaddr
Starting code address of binary data.
Definition: funcdata.hh:69
rangemap::find_end
const_iterator find_end(linetype point) const
Find ending of sub-ranges that contain the given boundary point.
Definition: rangemap.hh:389
SegmentOp::innerinsize
int4 innerinsize
The size in bytes of the near pointer value.
Definition: userop.hh:203
XmlError::explain
string explain
Explanatory string.
Definition: xml.hh:289
SubvariableFlow::createOpDown
ReplaceOp * createOpDown(OpCode opc, int4 numparam, PcodeOp *op, ReplaceVarnode *inrvn, int4 slot)
Create a logical subgraph operator node given one of its input variable nodes.
Definition: subflow.cc:181
ScopeGhidra::clearCategory
virtual void clearCategory(int4 cat)
Clear all symbols of the given category from this scope.
Definition: database_ghidra.hh:100
ActionStop::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:47
FloatingEdge::bottom
FlowBlock * bottom
Ending FlowBlock of the edge.
Definition: blockaction.hh:31
ActionConstantPtr::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: coreaction.hh:189
ActionConditionalConst::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3583
Override::applyIndirect
void applyIndirect(Funcdata &data, FuncCallSpecs &fspecs) const
Look for and apply destination overrides of indirect calls.
Definition: override.cc:167
OpBehaviorIntXor::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:360
TypeOpFloatSqrt::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:625
DynamicHash::getMethodFromHash
static uint4 getMethodFromHash(uint8 h)
Retrieve the encoded method from a hash.
Definition: dynamic.cc:481
ActionDatabase::setGroup
void setGroup(const string &grp, const char **argv)
Establish a new root Action.
Definition: action.cc:1020
FuncCallSpecs::commitNewOutputs
void commitNewOutputs(Funcdata &data, Varnode *newout)
Update output Varnode to this CALL to reflect the formal return value.
Definition: fspec.cc:4272
Action::break_start
@ break_start
Break at beginning of action.
Definition: action.hh:72
AddrSpace::is_otherspace
@ is_otherspace
Quick check for the OtherSpace derived class.
Definition: space.hh:86
ParameterBasic::type
Datatype * type
Data-type of the parameter.
Definition: fspec.hh:967
ActionMarkExplicit::OpStackElement::slotback
int4 slotback
The slot(+1) of the last input Varnode to traverse in this subexpression.
Definition: coreaction.hh:420
ScopeLocal::restructureVarnode
void restructureVarnode(bool aliasyes)
Layout mapped symbols based on Varnode information.
Definition: varmap.cc:985
TypeFactory::type_nochar
Datatype * type_nochar
Same dimensions as char but acts and displays as an INT.
Definition: type.hh:390
Scope::addRange
virtual void addRange(AddrSpace *spc, uintb first, uintb last)
Add a memory range to the ownership of this Scope.
Definition: database.cc:1037
JumpTable::glb
Architecture * glb
Architecture under which this jump-table operates.
Definition: jumptable.hh:508
ScopeGhidra::begin
virtual MapIterator begin(void) const
Beginning iterator to mapped SymbolEntrys.
Definition: database_ghidra.hh:94
print_data
void print_data(ostream &s, uint1 *buffer, int4 size, const Address &baseaddr)
Print a hex dump of a data buffer to stream.
Definition: type.cc:27
SeqNum::SeqNum
SeqNum(const Address &a, uintm b)
Create a sequence number with a specific time field.
Definition: address.hh:120
Scope::beginDynamic
virtual list< SymbolEntry >::const_iterator beginDynamic(void) const =0
Beginning iterator to dynamic SymbolEntrys.
ActionStart::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:39
RuleDoubleSub::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1804
EmulateSnippet::resetMemory
void resetMemory(void)
Reset the emulation snippet.
Definition: emulateutil.hh:154
WidenerNone::checkFreeze
virtual bool checkFreeze(const ValueSet &valueSet)
Check if the given value set has been frozen for the remainder of the iteration process.
Definition: rangeutil.cc:1874
TransformVar
Placeholder node for Varnode that will exist after a transform is applied to a function.
Definition: transform.hh:26
RawLoadImage::adjustVma
virtual void adjustVma(long adjust)
Adjust load addresses with a global offset.
Definition: loadimage.cc:75
TermPatternOp::execute
virtual uintb execute(const vector< uintb > &input) const =0
Compute the output value of this operation, given constant inputs.
RuleSignShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3195
UserOpManage::initialize
void initialize(Architecture *glb)
Initialize description objects for all user defined ops.
Definition: userop.cc:318
PrintLanguage::Atom::fd
const Funcdata * fd
A function associated with the token.
Definition: printlanguage.hh:201
Funcdata::endOpDead
list< PcodeOp * >::const_iterator endOpDead(void) const
End of PcodeOp objects in the dead list.
Definition: funcdata.hh:464
TypeOpFloatRound::TypeOpFloatRound
TypeOpFloatRound(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1475
JumpBasic2::extravn
Varnode * extravn
The extra Varnode holding the default value.
Definition: jumptable.hh:406
ValueSetSolver::solve
void solve(int4 max, Widener &widener)
Iterate the ValueSet system until it stabilizes.
Definition: rangeutil.cc:2510
Architecture::funcptr_align
int4 funcptr_align
How many bits of alignment a function ptr has.
Definition: architecture.hh:131
LoadTable::addr
Address addr
Starting address of table.
Definition: jumptable.hh:43
JumpAssisted::buildLabels
virtual void buildLabels(Funcdata *fd, vector< Address > &addresstable, vector< uintb > &label, const JumpModel *orig) const
Recover case labels associated with the Address table.
Definition: jumptable.cc:2024
JumpBasicOverride::startingvalue
uintb startingvalue
Possible start for guessing values that match addresses.
Definition: jumptable.hh:429
JumpValues::contains
virtual bool contains(uintb val) const =0
Return true if the given value is in the set of possible values.
RuleSubNormal::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6446
JumpBasic::findSmallestNormal
void findSmallestNormal(uint4 matchsize)
Find the putative switch variable with the smallest range of values reaching the switch.
Definition: jumptable.cc:1128
TypeOpBranchind::TypeOpBranchind
TypeOpBranchind(TypeFactory *t)
Constructor.
Definition: typeop.cc:523
PrintC::opIntRight
virtual void opIntRight(const PcodeOp *op)
Emit a INT_RIGHT operator.
Definition: printc.hh:253
rangemap::AddrRange::value
std::list< _recordtype >::iterator value
Iterator pointing at the actual recordtype.
Definition: rangemap.hh:83
LoadGuard::spc
AddrSpace * spc
The stack space being loaded from.
Definition: heritage.hh:108
EmulatePcodeCache::getCurrentOpIndex
int4 getCurrentOpIndex(void) const
Get the index of current pcode op within current instruction.
Definition: emulate.hh:347
ActionMarkExplicit::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2748
ActionPrototypeTypes::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3694
ParamEntry::getContainer
bool getContainer(const Address &addr, int4 sz, VarnodeData &res) const
Calculate the containing memory range.
Definition: fspec.cc:141
OptionSetAction::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:536
OptionDefaultPrototype::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:216
SubvariableFlow::addTerminalPatch
void addTerminalPatch(PcodeOp *pullop, ReplaceVarnode *rvn)
Mark an operation where a subgraph variable is naturally copied into the original data-flow.
Definition: subflow.cc:1063
OpBehaviorFloatNan::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:574
ProtoModel::localrange
RangeList localrange
Memory range(s) of space-based locals.
Definition: fspec.hh:626
TypeOpCall::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:264
CollapseStructure::loopbodyiter
list< LoopBody >::iterator loopbodyiter
Current (innermost) loop being structured.
Definition: blockaction.hh:196
RuleAndCommute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1575
InjectPayload::type
int4 type
Type of this payload: CALLFIXUP_TYPE, CALLOTHERFIXUP_TYPE, etc.
Definition: pcodeinject.hh:88
Heritage::splitJoinWrite
void splitJoinWrite(Varnode *vn, JoinRecord *joinrec)
Split a written join-space Varnode into specified pieces.
Definition: heritage.cc:1733
ExecutablePcode::emulator
EmulateSnippet emulator
The emulator.
Definition: pcodeinject.hh:138
TypeOpFloatNotEqual::TypeOpFloatNotEqual
TypeOpFloatNotEqual(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1363
SymbolEntry::printEntry
void printEntry(ostream &s) const
Dump a description of this to a stream.
Definition: database.cc:155
RuleTransformCpool::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:632
RulePiece2Zext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:268
ActionNormalizeBranches::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: blockaction.cc:2098
LaneDivide::workList
vector< WorkNode > workList
List of Varnodes still left to trace.
Definition: subflow.hh:176
ProtoStore::getNumInputs
virtual int4 getNumInputs(void) const =0
Get the number of input parameters for this prototype.
ParamEntry::spaceid
AddrSpace * spaceid
Address space containing the range.
Definition: fspec.hh:66
Scope::getFullName
string getFullName(void) const
Get the full name of this Scope.
Definition: database.cc:1345
CastStrategy::checkIntPromotionForExtension
virtual bool checkIntPromotionForExtension(const PcodeOp *op) const =0
Check if integer promotion forces a cast for the input to the given extension.
PrintC::greater_than
static OpToken greater_than
The greater than operator.
Definition: printc.hh:87
pcodeinject.hh
Classes for managing p-code injection.
RuleConditionalMove::constructNegate
static Varnode * constructNegate(Varnode *vn, PcodeOp *op, Funcdata &data)
Construct the boolean negation of a given boolean Varnode.
Definition: ruleaction.cc:7887
cseEliminateList
void cseEliminateList(Funcdata &data, vector< pair< uintm, PcodeOp * > > &list, vector< Varnode * > &outlist)
Perform Common Subexpression Elimination on a list of Varnode descendants.
Definition: funcdata_op.cc:1247
SymbolEntry::EntryInitData::space
AddrSpace * space
The address space of the main SymbolEntry starting address.
Definition: database.hh:69
JumpTable::opaddress
Address opaddress
Absolute address of the BRANCHIND jump.
Definition: jumptable.hh:515
InjectContext::output
vector< VarnodeData > output
Storage location for output.
Definition: pcodeinject.hh:63
Scope::overrideSizeLockType
void overrideSizeLockType(Symbol *sym, Datatype *ct)
Change the data-type of a Symbol that is sizelocked.
Definition: database.cc:1289
EmulatePcodeOp::currentOp
PcodeOp * currentOp
Current PcodeOp being executed.
Definition: emulateutil.hh:44
ExternRefSymbol::restoreXml
virtual void restoreXml(const Element *el)
Restore this Symbol from an XML stream.
Definition: database.cc:739
Merge
Class for merging low-level Varnodes into high-level HighVariables.
Definition: merge.hh:80
BlockGraph::swapBlocks
void swapBlocks(int4 i, int4 j)
Swap the positions two component FlowBlocks.
Definition: block.cc:1147
Database::parseParentTag
static void parseParentTag(const Element *el, string &name, vector< string > &parnames)
Read an XML <parent> tag for a Scope path.
Definition: database.cc:3053
BlockCondition::flipInPlaceExecute
virtual void flipInPlaceExecute(void)
Perform the flip to normalize conditional branch executed by this block.
Definition: block.cc:2774
loadimage.hh
Classes and API for accessing a binary load image.
RuleConcatLeftShift
Simplify concatenation of extended value: concat(V, zext(W) << c) => concat( concat(V,...
Definition: ruleaction.hh:834
PcodeInjectLibrary::callFixupNames
vector< string > callFixupNames
Map from injectid to call-fixup name.
Definition: pcodeinject.hh:171
OptionJumpLoad
Toggle whether the decompiler should try to recover the table used to evaluate a switch.
Definition: options.hh:249
CommentDatabaseInternal::beginComment
virtual CommentSet::const_iterator beginComment(const Address &fad) const
Get an iterator to the beginning of comments for a single function.
Definition: comment.cc:225
TypeFactory::enumsize
int4 enumsize
Size of an enumerated type.
Definition: type.hh:383
CastStrategy::promoteSize
int4 promoteSize
Size of int data-type, (size that integers get promoted to)
Definition: cast.hh:55
BlockGraph::findSpanningTree
void findSpanningTree(vector< FlowBlock * > &preorder, vector< FlowBlock * > &rootlist)
Find a spanning tree (skipping irreducible edges).
Definition: block.cc:935
TypeOpIntMult
Information about the INT_MULT op-code.
Definition: typeop.hh:477
PcodeOpBank::endAll
PcodeOpTree::const_iterator endAll(void) const
End of all PcodeOps in sequence number order.
Definition: op.hh:282
PrintC::emitExpression
virtual void emitExpression(const PcodeOp *op)
Emit a full expression.
Definition: printc.cc:2077
TypeOpSegment
Information about the SEGMENTOP op-code.
Definition: typeop.hh:749
TokenSplit::vari_t
@ vari_t
A variable identifier.
Definition: prettyprint.hh:309
FlowInfo::VisitStat
A helper function describing the number of bytes in a machine instruction and the starting p-code op.
Definition: flow.hh:75
JumpTable::loadpoints
vector< LoadTable > loadpoints
Any recovered in-memory data for the jump-table.
Definition: jumptable.hh:514
FloatFormat::opMult
uintb opMult(uintb a, uintb b) const
Multiplication (*)
Definition: float.cc:439
TypeOpPtrsub
Information about the PTRSUB op-code.
Definition: typeop.hh:730
SpacebaseSpace::restoreXml
virtual void restoreXml(const Element *el)
Recover the details of this space from XML.
Definition: translate.cc:114
ValueSetSolver::constraintsFromCBranch
void constraintsFromCBranch(PcodeOp *cbranch)
Generate constraints arising from the given branch.
Definition: rangeutil.cc:2196
TransformManager::newVarnodes
list< TransformVar > newVarnodes
Storage for Varnode placeholder nodes.
Definition: transform.hh:153
JumpModelTrivial::getTableSize
virtual int4 getTableSize(void) const
Return the number of entries in the address table.
Definition: jumptable.hh:327
FloatFormat::opInt2Float
uintb opInt2Float(uintb a, int4 sizein) const
Convert integer to floating-point.
Definition: float.cc:493
ActionNonzeroMask::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:294
RuleConditionalMove::BoolExpress::val
uintb val
Value (if boolean is constant)
Definition: ruleaction.hh:1355
Scope::queryByName
void queryByName(const string &name, vector< Symbol * > &res) const
Look-up symbols by name.
Definition: database.cc:1120
OpBehaviorFloatFloat2Float::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:664
Symbol::scope
Scope * scope
The scope that owns this symbol.
Definition: database.hh:158
MemoryPageOverlay::setPage
virtual void setPage(uintb addr, const uint1 *val, int4 skip, int4 size)
Overridden setPage.
Definition: memstate.cc:500
ProtoModelMerged::restoreXml
virtual void restoreXml(const Element *el)
Restore this model from an XML stream.
Definition: fspec.cc:2244
AliasChecker::space
AddrSpace * space
AddressSpace in which to search.
Definition: varmap.hh:118
EffectRecord::unknown_effect
@ unknown_effect
An unknown effect (indicates the absence of an EffectRecord)
Definition: fspec.hh:311
CPUI_INT_2COMP
@ CPUI_INT_2COMP
Twos complement.
Definition: opcodes.hh:65
InjectPayload::printTemplate
virtual void printTemplate(ostream &s) const =0
Print the p-code ops of the injection to a stream (for debugging)
Architecture::buildContext
virtual void buildContext(DocumentStorage &store)
Build the Context database.
Definition: architecture.cc:517
MapState::maplist
vector< RangeHint * > maplist
The list of collected RangeHints.
Definition: varmap.hh:148
ActionInferTypes::propagateAddPointer
static int4 propagateAddPointer(PcodeOp *op, int4 slot)
Test if edge is pointer plus a constant.
Definition: coreaction.cc:4102
PrintLanguage::opFloatTrunc
virtual void opFloatTrunc(const PcodeOp *op)=0
Emit a FLOAT_TRUNC operator.
ParamListStandard::spacebase
AddrSpace * spacebase
Address space containing relative offset parameters.
Definition: fspec.hh:500
CPUI_FLOAT_ADD
@ CPUI_FLOAT_ADD
Floating-point addition (+)
Definition: opcodes.hh:93
RuleSubRight
Cleanup: Convert truncation to cast: sub(V,c) => sub(V>>c*8,0)
Definition: ruleaction.hh:1083
cast.hh
API and specific strategies for applying type casts.
ScopeGhidra::setCategory
virtual void setCategory(Symbol *sym, int4 cat, int4 ind)
Set the category and index for the given Symbol.
Definition: database_ghidra.hh:114
TypeFactory::destroyType
void destroyType(Datatype *ct)
Remove a data-type from this.
Definition: type.cc:1868
Rule::name
string name
Name of the Rule.
Definition: action.hh:205
RuleThreeWayCompare::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:8394
Funcdata::beginLoc
VarnodeLocSet::const_iterator beginLoc(int4 s, const Address &addr, uint4 fl) const
Start of Varnodes matching storage and properties.
Definition: funcdata.hh:322
ActionLaneDivide::collectLaneSizes
void collectLaneSizes(Varnode *vn, const LanedRegister &allowedLanes, LanedRegister &checkLanes)
Examine the PcodeOps using the given Varnode to determine possible lane sizes.
Definition: coreaction.cc:506
RuleShiftBitops::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:174
SleighBase::getRegisterName
virtual string getRegisterName(AddrSpace *base, uintb off, int4 size) const
Get the name of a register given its location.
Definition: sleighbase.cc:103
CPoolRecord::class_reference
@ class_reference
Reference to (system level) class object, token holds class name.
Definition: cpool.hh:50
TypeOpFloatInt2Float
Information about the FLOAT_INT2FLOAT op-code.
Definition: typeop.hh:629
DecompileAt::addr
Address addr
The entry point address of the function to decompile.
Definition: ghidra_process.hh:153
ConditionalExecution::doReplacement
void doReplacement(PcodeOp *op)
Replace the data-flow for the given PcodeOp in iblock.
Definition: condexe.cc:625
ScopeLocal::collectNameRecs
void collectNameRecs(void)
Collect names of unlocked Symbols on the stack.
Definition: varmap.cc:281
ValueSetSolver::numIterations
int4 numIterations
Count of individual ValueSet iterations.
Definition: rangeutil.hh:296
SpacebaseSpace::hasbaseregister
bool hasbaseregister
true if a base register has been attached
Definition: translate.hh:173
ValueSetSolver::applyConstraints
void applyConstraints(Varnode *vn, int4 type, const CircleRange &range, PcodeOp *cbranch)
Look for PcodeOps where the given constraint range applies and instantiate an equation.
Definition: rangeutil.cc:2091
OpToken::binary
@ binary
Binary operator form (printed between its inputs)
Definition: printlanguage.hh:85
TypeOpMulti::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:674
TypeFactory::findAdd
Datatype * findAdd(Datatype &ct)
Find data-type in this container or add it.
Definition: type.cc:1426
Architecture::buildConstantPool
virtual void buildConstantPool(DocumentStorage &store)
Build the constant pool.
Definition: architecture.cc:586
RuleAddUnsigned
Cleanup: Convert INT_ADD of constants to INT_SUB: V + 0xff... => V - 0x00...
Definition: ruleaction.hh:1061
TypeOpIntScarry::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:394
ConditionalExecution
A class for simplifying a series of conditionally executed statements.
Definition: condexe.hh:131
PcodeOpRaw::getSeqNum
const SeqNum & getSeqNum(void) const
Retrieve the sequence number.
Definition: pcoderaw.hh:157
VolatileOp
A base class for operations that access volatile memory.
Definition: userop.hh:99
OptionDefaultPrototype
Set the default prototype model for analyzing unknown functions.
Definition: options.hh:87
JumpValuesRange::contains
virtual bool contains(uintb val) const
Return true if the given value is in the set of possible values.
Definition: jumptable.cc:274
TokenSplit::openParen
void openParen(char o, int4 id)
Create an open parenthesis.
Definition: prettyprint.hh:520
Heritage
Manage the construction of Static Single Assignment (SSA) form.
Definition: heritage.hh:170
FuncCallSpecs::op
PcodeOp * op
Pointer to CALL or CALLIND instruction.
Definition: fspec.hh:1437
CommentDatabaseInternal::clear
virtual void clear(void)
Clear all comments from this container.
Definition: comment.cc:145
PrintC::opIntSub
virtual void opIntSub(const PcodeOp *op)
Emit a INT_SUB operator.
Definition: printc.hh:243
ScopeGhidra::spacerange
vector< int4 > spacerange
List of address spaces that are in the global range.
Definition: database_ghidra.hh:39
RawBinaryArchitectureCapability::RawBinaryArchitectureCapability
RawBinaryArchitectureCapability(void)
Singleton.
Definition: raw_arch.cc:21
Override::insertMultistageJump
void insertMultistageJump(const Address &addr)
Flag an indirect jump for multistage analysis.
Definition: override.cc:127
MemoryState::getChunk
void getChunk(uint1 *res, AddrSpace *spc, uintb off, int4 size) const
Get a chunk of data from memory state.
Definition: memstate.cc:710
circularqueue::right
int4 right
Index within the array of the rightmost object in the queue.
Definition: prettyprint.hh:608
ConstantPoolGhidra::saveXml
virtual void saveXml(ostream &s) const
Save all records in this container to an XML stream.
Definition: cpool_ghidra.cc:56
Scope::setAttribute
virtual void setAttribute(Symbol *sym, uint4 attr)=0
Set boolean Varnode properties on a Symbol.
MapIterator::MapIterator
MapIterator(const MapIterator &op2)
Copy constructor.
Definition: database.hh:349
BlockMultiGoto::gotoedges
vector< FlowBlock * > gotoedges
List of goto targets from this block.
Definition: block.hh:469
JumpModelTrivial::foldInGuards
virtual bool foldInGuards(Funcdata *fd, JumpTable *jump)
Eliminate any guard code involved in computing the switch destination.
Definition: jumptable.hh:333
OptionExtraPop::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:163
RuleEqual2Zero::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5526
ActionNodeJoin::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: blockaction.cc:2307
FuncCallSpecs::doInputJoin
void doInputJoin(int4 slot1, bool ishislot)
Join two parameter trials.
Definition: fspec.cc:4411
HighVariable::copy_in1
@ copy_in1
There exists at least 1 COPY into this HighVariable from other HighVariables.
Definition: variable.hh:51
ValueSetSolver::valueNodes
list< ValueSet > valueNodes
Storage for all the current value sets.
Definition: rangeutil.hh:289
OpToken::print
const char * print
Printing characters for the token.
Definition: printlanguage.hh:92
Varnode::nzm
uintb nzm
Which bits do we know are zero.
Definition: varnode.hh:144
crc_update
uint4 crc_update(uint4 reg, uint4 val)
Feed 8 bits into a CRC register.
Definition: crc32.hh:31
mult64to128
void mult64to128(uint8 *res, uint8 x, uint8 y)
Multiply 2 unsigned 64-bit values, producing a 128-bit value.
Definition: address.cc:812
FuncProto::hasOutputErrors
bool hasOutputErrors(void) const
Has this prototype been marked as having an incorrect return value description.
Definition: fspec.hh:1268
Action::breakpoint
uint4 breakpoint
Breakpoint properties.
Definition: action.hh:81
AddrSpaceManager::markNearPointers
void markNearPointers(AddrSpace *spc, int4 size)
Mark that given space can be accessed with near pointers.
Definition: translate.cc:511
RuleHighOrderAnd::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:271
OptionNoReturn::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:276
ActionMarkExplicit::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:429
ValueSet::partHead
Partition * partHead
If Varnode is a component head, pointer to corresponding Partition.
Definition: rangeutil.hh:138
RulePiecePathology
Search for concatenations with unlikely things to inform return/parameter consumption calculation.
Definition: ruleaction.hh:1435
Funcdata::hasRestartPending
bool hasRestartPending(void) const
Does this function need to restart its analysis.
Definition: funcdata.hh:191
Scope::queryContainer
SymbolEntry * queryContainer(const Address &addr, int4 size, const Address &usepoint) const
Find the smallest containing Symbol.
Definition: database.cc:1168
ActionUnreachable
Remove unreachable blocks.
Definition: coreaction.hh:479
TypeFactory::setEnumValues
bool setEnumValues(const vector< string > &namelist, const vector< uintb > &vallist, const vector< bool > &assignlist, TypeEnum *te)
Set named values for an enumeration.
Definition: type.cc:1550
RuleSubCancel::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4717
IPTR_FSPEC
@ IPTR_FSPEC
Special internal FuncCallSpecs reference.
Definition: space.hh:33
PcodeOp::getHaltType
uint4 getHaltType(void) const
Get type which indicates unusual halt in control-flow.
Definition: op.hh:162
EffectRecord::saveXml
void saveXml(ostream &s) const
Save the record to an XML stream.
Definition: fspec.cc:1656
EmitNoXml
A trivial emitter that outputs syntax straight to the stream.
Definition: prettyprint.hh:220
Merge::mergeTestBasic
static bool mergeTestBasic(Varnode *vn)
A test if the given Varnode can ever be merged.
Definition: merge.cc:189
TypeOpIntLeft::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1135
FlowBlock::nextInFlow
const FlowBlock * nextInFlow(void) const
Return next block to be executed in flow.
Definition: block.cc:2407
OpBehaviorIntSext
CPUI_INT_SEXT behavior.
Definition: opbehavior.hh:181
RulePopcountBoolXor::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1426
EmulateSnippet::executeLoad
virtual void executeLoad(void)
Standard behavior for a p-code LOAD.
Definition: emulateutil.cc:184
OpBehaviorFloatMult::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:604
TypeOpIntAdd::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:984
PcodeOpBank::beginDead
list< PcodeOp * >::const_iterator beginDead(void) const
Start of all PcodeOps marked as dead.
Definition: op.hh:297
FlowBlock::getSplitPoint
virtual FlowBlock * getSplitPoint(void)
Get the leaf splitting block.
Definition: block.hh:726
FlowBlock::f_forward_edge
@ f_forward_edge
An edge that jumps forward in the spanning tree.
Definition: block.hh:101
Scope::stackAddr
static const Scope * stackAddr(const Scope *scope1, const Scope *scope2, const Address &addr, const Address &usepoint, SymbolEntry **addrmatch)
Query for Symbols starting at a given address, which match a given usepoint.
Definition: database.cc:841
FlowInfo::flowoverride_present
bool flowoverride_present
Does the function have registered flow override instructions.
Definition: flow.hh:98
RuleOrCollapse::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:433
PrintC::docTypeDefinitions
virtual void docTypeDefinitions(const TypeFactory *typegrp)
Emit definitions of data-types.
Definition: printc.cc:2010
PriorityQueue::queue
vector< vector< FlowBlock * > > queue
An array of stacks, indexed by priority.
Definition: heritage.hh:65
Funcdata::sortCallSpecs
void sortCallSpecs(void)
Sort calls using a dominance based order.
Definition: funcdata.cc:461
RuleOrMask::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:327
InjectCallotherGhidra
A callother-fixup injection that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:57
rangemap
An interval map container.
Definition: rangemap.hh:65
ActionPool::printStatistics
virtual void printStatistics(ostream &s) const
Dump statistics to stream.
Definition: action.cc:938
FuncCallSpecs::initActiveInput
void initActiveInput(void)
Turn on analysis recovering input parameters.
Definition: fspec.cc:4366
Architecture::extra_pool_rules
vector< Rule * > extra_pool_rules
Extra rules that go in the main pool (cpu specific, experimental)
Definition: architecture.hh:133
OpBehaviorFloatLess::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:554
CPUI_BRANCHIND
@ CPUI_BRANCHIND
Indirect branch (jumptable)
Definition: opcodes.hh:42
a_v_b
void a_v_b(ostream &s, const string &attr, bool val)
Output the given boolean value as an XML attribute.
Definition: xml.hh:365
AddrSpace::isOverlayBase
bool isOverlayBase(void) const
Return true if other spaces overlay this space.
Definition: space.hh:425
TypeOpCbranch::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:248
JumpBasicOverride::addrtable
vector< Address > addrtable
Address associated with each value.
Definition: jumptable.hh:428
ActionLaneDivide
Find Varnodes with a vectorized lane scheme and attempt to split the lanes.
Definition: coreaction.hh:106
RuleEarlyRemoval
Get rid of unused PcodeOp objects where we can guarantee the output is unused.
Definition: ruleaction.hh:43
TraceDAG::BranchPoint::markPath
void markPath(void)
Mark a path from this up to the root BranchPoint.
Definition: blockaction.cc:502
TypeOpSubpiece
Information about the SUBPIECE op-code.
Definition: typeop.hh:697
RuleTestSign::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:582
Heritage::propagateCopyAway
void propagateCopyAway(PcodeOp *op)
Eliminate a COPY sink preserving its data-flow.
Definition: heritage.cc:522
Datatype::Datatype
Datatype(int4 s, type_metatype m)
Construct the base data-type providing size and meta-type.
Definition: type.hh:92
VarnodeBank::endDef
VarnodeDefSet::const_iterator endDef(uint4 fl) const
End of varnodes with set definition property.
Definition: varnode.cc:1430
TypeOpEqual::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:818
TypeOpStore
Information about the STORE op-code.
Definition: typeop.hh:226
VarnodeBank::makeFree
void makeFree(Varnode *vn)
Convert a Varnode to be free.
Definition: varnode.cc:940
OpBehavior::isSpecial
bool isSpecial(void) const
Check if this is a special operator.
Definition: opbehavior.hh:110
ActionNameVars::linkSpacebaseSymbol
static void linkSpacebaseSymbol(Varnode *vn, Funcdata &data, vector< Varnode * > &namerec)
Link symbols associated with a given spacebase Varnode.
Definition: coreaction.cc:2438
StackSolver::companion
vector< int4 > companion
Index of companion input for variable produced by CPUI_INDIRECT.
Definition: coreaction.cc:34
PrintLanguage::opIntSright
virtual void opIntSright(const PcodeOp *op)=0
Emit a INT_SRIGHT operator.
Comment::funcaddr
Address funcaddr
Address of the function containing the comment.
Definition: comment.hh:40
TypeOpIntSub::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:378
Varnode::cover
Cover * cover
Addresses covered by the def->use of this Varnode.
Definition: varnode.hh:138
CastStrategyC::isExtensionCastImplied
virtual bool isExtensionCastImplied(const PcodeOp *op, const PcodeOp *readOp) const
Is the given ZEXT/SEXT cast implied by the expression its in?
Definition: cast.cc:169
WidenerNone::determineIterationReset
virtual int4 determineIterationReset(const ValueSet &valueSet)
Upon entering a fresh partition, determine how the given ValueSet count should be reset.
Definition: rangeutil.cc:1866
SleighArchitecture::modifySpaces
virtual void modifySpaces(Translate *trans)
Modify address spaces as required by this Architecture.
Definition: sleigh_arch.cc:273
SleighBuilder
Definition: sleigh.hh:85
Range::printBounds
void printBounds(ostream &s) const
Print this Range to a stream.
Definition: address.cc:255
FlowBlock::f_break_goto
@ f_break_goto
Block ends with a break;.
Definition: block.hh:77
ParamListStandard::calcDelay
void calcDelay(void)
Calculate the maximum heritage delay for any potential parameter in this list.
Definition: fspec.cc:823
ParamEntryRange::inittype
InitData inittype
Initialization data for a ScopeMapper.
Definition: fspec.hh:131
ParameterBasic::flags
uint4 flags
Lock properties. Varnode::mark is co-opted to hold the size-lock flag.
Definition: fspec.hh:968
TypeOpNew::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:777
RuleDivOpt::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1167
TypeOpIntXor::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:426
RuleSlessToLess::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:471
OptionCommentStyle
Set the style of comment emitted by the decompiler.
Definition: options.hh:171
JoinRecordCompare
Comparator for JoinRecord objects.
Definition: translate.hh:209
ProtoModel::effectlist
vector< EffectRecord > effectlist
List of side-effects.
Definition: fspec.hh:622
StructureGraph::ingraph
BlockGraph ingraph
The control-flow graph to structure.
Definition: ghidra_process.hh:171
AddrSpace::wordsize
uint4 wordsize
Size of unit being addressed (1=byte)
Definition: space.hh:105
ContextInternal::variables
map< string, ContextBitRange > variables
Map from context variable name to description object.
Definition: globalcontext.hh:274
PcodeOpRaw::getInput
VarnodeData * getInput(int4 i) const
Get the i-th input varnode for this op.
Definition: pcoderaw.hh:217
JumpBasic::isprune
static bool isprune(Varnode *vn)
Do we prune in here in our depth-first search for the normalized switch variable.
Definition: jumptable.cc:416
ProtoStoreSymbol::scope
Scope * scope
Backing Scope for input parameters.
Definition: fspec.hh:1081
ParamActive::splitTrial
void splitTrial(int4 i, int4 sz)
Split the given trial in two.
Definition: fspec.cc:1474
TypeOpIntZext::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:931
FuncProto::error_outputparam
@ error_outputparam
Set if the return value(s) are not properly represented.
Definition: fspec.hh:1156
Rule::breakpoint
uint4 breakpoint
Breakpoint(s) enabled for this Rule.
Definition: action.hh:204
TypeOpCopy::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:210
EmulateMemory::executeIndirect
virtual void executeIndirect(void)
Standard behavior for an INDIRECT op.
Definition: emulate.cc:302
TypeOpFloatAbs
Information about the FLOAT_ABS op-code.
Definition: typeop.hh:615
EmulatePcodeCache::getOpByIndex
PcodeOpRaw * getOpByIndex(int4 i) const
Get pcode op in current instruction translation by index.
Definition: emulate.hh:357
ParseError
An error generated while parsing a command or language.
Definition: error.hh:65
Override
A container of commands that override the decompiler's default behavior for a single function.
Definition: override.hh:40
RulePtraddUndo::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6133
MapState::iter
vector< RangeHint * >::iterator iter
The current iterator into the RangeHints.
Definition: varmap.hh:149
EmitPrettyPrint::setCommentFill
virtual void setCommentFill(const string &fill)
Set the comment fill characters for when line breaks are forced.
Definition: prettyprint.hh:769
ScopeMapper::inittype
Scope * inittype
Initialization data for a ScopeMapper.
Definition: database.hh:808
Translate::setUniqueBase
void setUniqueBase(uintm val)
Set the base offset for new temporary registers.
Definition: translate.hh:563
RuleLessEqual
Simplify 'less than or equal': V < W || V == W => V <= W
Definition: ruleaction.hh:418
PrintC::push_float
virtual void push_float(uintb val, int4 sz, const Varnode *vn, const PcodeOp *op)
Push a constant with a floating-point data-type to the RPN stack.
Definition: printc.cc:1087
CPUI_INT_OR
@ CPUI_INT_OR
Logical/bitwise or (|)
Definition: opcodes.hh:69
ConditionalExecution::testRemovability
bool testRemovability(PcodeOp *op)
Test if the given PcodeOp can be removed from iblock.
Definition: condexe.cc:692
Action::status_mid
@ status_mid
In middle of action (use subclass status)
Definition: action.hh:66
TraceDAG::BranchPoint::paths
vector< BlockTrace * > paths
BlockTrace for each possible path out of this BlockPoint.
Definition: blockaction.hh:104
OpToken::associative
bool associative
True if the operator is associative.
Definition: printlanguage.hh:95
ParamMeasure::WalkState
Definition: paramid.hh:41
Symbol::isNameUndefined
bool isNameUndefined(void) const
Does this have an undefined name.
Definition: database.cc:229
ArchitectureCapability::initialize
virtual void initialize(void)
Do specialized initialization.
Definition: architecture.cc:32
CircleRange::normalize
void normalize(void)
Normalize the representation of full sets.
Definition: rangeutil.cc:23
TokenSplit::stat_b
@ stat_b
Start of a statement.
Definition: prettyprint.hh:305
ParameterBasic::isNameUndefined
virtual bool isNameUndefined(void) const
Is the name of this parameter undefined.
Definition: fspec.hh:981
functionalDifference
bool functionalDifference(Varnode *vn1, Varnode *vn2, int4 depth)
Return true if vn1 and vn2 are verifiably different values.
Definition: op.cc:1074
LabSymbol::LabSymbol
LabSymbol(Scope *sc, const string &nm)
Construct given name.
Definition: database.cc:674
Funcdata::onlyOpUse
bool onlyOpUse(const Varnode *invn, const PcodeOp *opmatch, const ParamTrial &trial) const
Test if the given Varnode seems to only be used by a CALL.
Definition: funcdata_varnode.cc:1411
LaneDivide::buildPiece
bool buildPiece(PcodeOp *op, TransformVar *outVars, int4 numLanes, int4 skipLanes)
Convert a CPUI_PIECE operation into copies between placeholders, given the output lanes.
Definition: subflow.cc:2079
RuleSignForm::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7053
RuleNegateIdentity::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:501
UserOpManage::getOp
UserPcodeOp * getOp(int4 i) const
Definition: userop.hh:267
IPTR_INTERNAL
@ IPTR_INTERNAL
Internally managed temporary space.
Definition: space.hh:32
GhidraDecompCapability::operator=
GhidraDecompCapability & operator=(const GhidraDecompCapability &op2)
Not implemented.
FloatFormat::getZeroEncoding
uintb getZeroEncoding(bool sgn) const
Get an encoded zero value.
Definition: float.cc:194
Varnode::vacconsume
@ vacconsume
Vacuous consume.
Definition: varnode.hh:114
FlowInfo::processInstruction
bool processInstruction(const Address &curaddr, bool &startbasic)
Generate p-code for a single machine instruction and process discovered flow information.
Definition: flow.cc:369
LoadImageXml::clear
void clear(void)
Clear out all the caches.
Definition: loadimage_xml.cc:134
FuncProto::isInputLocked
bool isInputLocked(void) const
Are input data-types locked.
Definition: fspec.cc:3055
ActionStackPtrFlow::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:478
PrintLanguage::emitBlockIf
virtual void emitBlockIf(const BlockIf *bl)=0
Emit an if/else style construct.
ValueSetSolver::rootNodes
vector< ValueSet * > rootNodes
Values treated as inputs.
Definition: rangeutil.hh:293
ConditionalExecution::testMultiRead
bool testMultiRead(Varnode *vn, PcodeOp *op)
Can we mave the MULTIEQUAL defining p-code of the given Varnode.
Definition: condexe.cc:451
Funcdata::covermerge
Merge covermerge
Variable range intersection algorithms.
Definition: funcdata.hh:81
List
vector< Element * > List
A list of XML elements.
Definition: xml.hh:144
TypeCode::set
void set(ProtoModel *model, Datatype *outtype, const vector< Datatype * > &intypes, bool dotdotdot, Datatype *voidtype)
Establish a function pointer.
Definition: type.cc:915
PrintLanguage::emitBlockWhileDo
virtual void emitBlockWhileDo(const BlockWhileDo *bl)=0
Emit a loop structure, check at top.
TypeOp::behave
OpBehavior * behave
Object for emulating the behavior of the op-code.
Definition: typeop.hh:49
ConditionalExecution::heritageyes
vector< bool > heritageyes
Boolean array indexed by address space indicating whether the space is heritaged.
Definition: condexe.hh:146
LoadImageXml::saveXml
void saveXml(ostream &s) const
Save the image back out to an XML stream.
Definition: loadimage_xml.cc:35
BlockGraph::list
vector< FlowBlock * > list
List of FlowBlock components within this super-block.
Definition: block.hh:271
PrintLanguage::setCommentStyle
virtual void setCommentStyle(const string &nm)=0
Set the way comments are displayed in decompiler output.
PcodeOp::branch
@ branch
This instruction is a branch.
Definition: op.hh:68
PcodeOpEdge::mult
PcodeOp * mult
The (optional) multiplier being applied to the term.
Definition: coreaction.hh:1042
HighVariable::symboldirty
@ symboldirty
The symbol attachment is dirty.
Definition: variable.hh:50
HighVariable::saveXml
void saveXml(ostream &s) const
Save the variable to stream as an XML <high> tag.
Definition: variable.cc:452
RuleSub2Add
Eliminate INT_SUB: V - W => V + W * -1
Definition: ruleaction.hh:669
TypeOpNotEqual::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:839
EmitNoXml::beginVarDecl
virtual int4 beginVarDecl(const Symbol *sym)
Begin a variable declaration.
Definition: prettyprint.hh:233
ActionMarkIndirectOnly::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:345
EmitPrettyPrint::endBlock
virtual void endBlock(int4 id)
End a control-flow element.
Definition: prettyprint.cc:897
Funcdata::opZeroMulti
void opZeroMulti(PcodeOp *op)
Transform trivial CPUI_MULTIEQUAL to CPUI_COPY.
Definition: funcdata_block.cc:172
FlowInfo::inline_head
Funcdata * inline_head
First function in the in-lining chain.
Definition: flow.hh:100
CircleRange::minimalContainer
bool minimalContainer(const CircleRange &op2, int4 maxStep)
Construct minimal range that contains both this and another range.
Definition: rangeutil.cc:452
JumpBasic2::origPathMeld
PathMeld origPathMeld
The set of paths that produce non-default addresses.
Definition: jumptable.hh:407
Element::parent
Element * parent
The parent Element (or null)
Definition: xml.hh:156
FloatFormat::saveXml
void saveXml(ostream &s) const
Save the format to an XML stream.
Definition: float.cc:559
Override::getFlowOverride
uint4 getFlowOverride(const Address &addr) const
Return the particular flow override at a given address.
Definition: override.cc:223
TypeFactory::getTypeUnicode
TypeUnicode * getTypeUnicode(const string &nm, int4 sz, type_metatype m)
Create a default "unicode" type.
Definition: type.cc:1654
CollapseStructure::dataflow_changecount
int4 dataflow_changecount
Number of data-flow changes made during structuring.
Definition: blockaction.hh:198
ArchitectureGhidra::readPackedStream
static uint1 * readPackedStream(istream &s)
Read packed p-code op information.
Definition: ghidra_arch.cc:138
typeop.hh
Data-type and behavior information associated with specific p-code op-codes.
ScopeResolve
rangemap< ScopeMapper > ScopeResolve
A map from address to the owning Scope.
Definition: database.hh:822
ContextGhidra::registerVariable
virtual void registerVariable(const string &nm, int4 sbit, int4 ebit)
Register a new named context variable (as a bit range) with the database.
Definition: ghidra_context.hh:64
TypeStruct::setFields
void setFields(const vector< TypeField > &fd)
Establish fields for this.
Definition: type.cc:722
rangemap::PartIterator
An iterator into the interval map container.
Definition: rangemap.hh:100
PcodeOp::floatingpoint
@ floatingpoint
A floating point operation.
Definition: op.hh:87
RuleSubZext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4640
ScopeInternal::printEntries
virtual void printEntries(ostream &s) const
Dump a description of all SymbolEntry objects to a stream.
Definition: database.cc:2649
ContextInternal::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore the state of this database object from a serialized XML stream.
Definition: globalcontext.cc:512
ActionRestrictLocal
Restrict possible range of local variables.
Definition: coreaction.hh:775
EmulateMemory
An abstract Emulate class using a MemoryState object as the backing machine state.
Definition: emulate.hh:243
Merge::mergeOp
void mergeOp(PcodeOp *op)
Force the merge of all input and output Varnodes for the given PcodeOp.
Definition: merge.cc:608
Address::renormalize
void renormalize(int4 size)
Make sure there is a backing JoinRecord if this is in the join space.
Definition: address.cc:185
Heritage::storeGuard
list< LoadGuard > storeGuard
List of STORE operations taking an indexed pointer to the stack.
Definition: heritage.hh:215
ActionHideShadow
Locate shadow Varnodes and adjust them so they are hidden.
Definition: coreaction.hh:953
AddrSpaceManager::baselist
vector< AddrSpace * > baselist
Every space we know about for this architecture.
Definition: translate.hh:219
OpBehaviorIntLess::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:221
ParameterSymbol::sym
Symbol * sym
Backing Symbol for this parameter.
Definition: fspec.hh:1054
ScopeGhidra::removeQuery
Symbol * removeQuery(const Address &addr) const
Process a query that missed the cache.
Definition: database_ghidra.cc:210
RangeHint::reconcile
bool reconcile(const RangeHint *b) const
Can the given intersecting RangeHint coexist with this at their given offsets.
Definition: varmap.cc:26
TypeOpFloatMult::TypeOpFloatMult
TypeOpFloatMult(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1405
Datatype::id
uint8 id
A unique id for the type (or 0 if an id is not assigned)
Definition: type.hh:84
TypeOpIntLeft::TypeOpIntLeft
TypeOpIntLeft(TypeFactory *t)
Constructor.
Definition: typeop.cc:1119
LanguageDescription::version
string version
Version of the specification.
Definition: sleigh_arch.hh:54
TypeOpCallind
Information about the CALLIND op-code.
Definition: typeop.hh:271
Scope::clearUnlockedCategory
virtual void clearUnlockedCategory(int4 cat)=0
Clear unlocked symbols of the given category from this scope.
uintb_negate
uintb uintb_negate(uintb in, int4 size)
Negate the sized value.
Definition: address.cc:592
ConditionalJoin::a_in1
int4 a_in1
In edge of exita coming from block1.
Definition: blockaction.hh:245
Architecture::restoreFlowOverride
void restoreFlowOverride(const Element *el)
Set flow overrides from XML.
Definition: architecture.cc:382
Funcdata::clearActiveOutput
void clearActiveOutput(void)
Clear any analysis of the function's return prototype.
Definition: funcdata.hh:376
EmitXml::stopComment
virtual void stopComment(int4 id)
End a comment block.
Definition: prettyprint.hh:166
ParameterBasic
A stand-alone parameter with no backing symbol.
Definition: fspec.hh:964
EmulateMemory::executeStore
virtual void executeStore(void)
Standard behavior for a p-code STORE.
Definition: emulate.cc:246
Architecture::buildAction
virtual void buildAction(DocumentStorage &store)
Build the Action framework.
Definition: architecture.cc:506
TypeFactory::clearCache
void clearCache(void)
Clear the common type cache.
Definition: type.cc:1216
Architecture::printMessage
virtual void printMessage(const string &message) const =0
Print an error message to console.
Merge::mergeLinear
void mergeLinear(vector< HighVariable * > &highvec)
Speculatively merge all HighVariables in the given list as well as possible.
Definition: merge.cc:205
RuleSubNormal::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6452
MemoryHashOverlay::address
vector< uintb > address
The hashtable addresses.
Definition: memstate.hh:132
LoadTable::restoreXml
void restoreXml(const Element *el, Architecture *glb)
Read in this table from a <loadtable> XML description.
Definition: jumptable.cc:34
TypeChar
Base type for character data-types: i.e. char.
Definition: type.hh:174
Scope::end
virtual MapIterator end(void) const =0
Ending iterator to mapped SymbolEntrys.
ActionDatabase::setCurrent
Action * setCurrent(const string &actname)
Set the current root Action.
Definition: action.cc:982
TypeOpIntOr::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:442
MapIterator
An iterator over SymbolEntry objects in multiple address spaces.
Definition: database.hh:330
SubfloatFlow::format
const FloatFormat * format
The floating-point format of the logical value.
Definition: subflow.hh:153
TypeOpCopy
Information about the COPY op-code.
Definition: typeop.hh:205
CPUI_INT_NOTEQUAL
@ CPUI_INT_NOTEQUAL
Integer comparison, in-equality (!=)
Definition: opcodes.hh:52
Address::mach_extreme
mach_extreme
An enum for specifying extremal addresses.
Definition: address.hh:52
JumpBasicOverride::buildAddresses
virtual void buildAddresses(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable, vector< LoadTable > *loadpoints) const
Construct the explicit list of target addresses (the Address Table) from this model.
Definition: jumptable.cc:1852
PcodeEmitFd
A p-code emitter for building PcodeOp objects.
Definition: funcdata.hh:553
Database::flagbase
partmap< Address, uint4 > flagbase
Map of global properties.
Definition: database.hh:842
JumpAssistOp::index2case
int4 index2case
Id of p-code script performing index2case (== -1 if no script and index==case)
Definition: userop.hh:230
OptionCommentIndent::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:452
ToOpEdge::op
const PcodeOp * op
The PcodeOp defining the edge.
Definition: dynamic.hh:31
PrintLanguage::opInsertOp
virtual void opInsertOp(const PcodeOp *op)=0
Emit an INSERT operator.
RawBinaryArchitectureCapability::rawBinaryArchitectureCapability
static RawBinaryArchitectureCapability rawBinaryArchitectureCapability
The singleton instance.
Definition: raw_arch.hh:23
ActionDatabase::toggleAction
Action * toggleAction(const string &grp, const string &basegrp, bool val)
Toggle a group of Actions with a root Action.
Definition: action.cc:997
ValueSetSolver::depthFirstIndex
int4 depthFirstIndex
(Global) depth first numbering for topological ordering
Definition: rangeutil.hh:295
Emulate::executeBranchind
virtual void executeBranchind(void)=0
Standard behavior for a BRANCHIND.
TypeFactory::getTypeEnum
TypeEnum * getTypeEnum(const string &n)
Create an (empty) enumeration.
Definition: type.cc:1831
FlowInfo::connectBasic
void connectBasic(void)
Generate edges between basic blocks.
Definition: flow.cc:994
ActionGroupList
The list of groups defining a root Action.
Definition: action.hh:29
ContextCache::last
uintb last
Ending offset of the current valid range.
Definition: globalcontext.hh:314
Element::content
string content
Character content of the element.
Definition: xml.hh:152
ActionDynamicSymbols::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3952
FuncProto::copy
void copy(const FuncProto &op2)
Copy another function prototype.
Definition: fspec.cc:2931
ConditionMarker::initop
PcodeOp * initop
The root CBRANCH operation to compare against.
Definition: condexe.hh:34
TokenSplit::endFunction
void endFunction(int4 id)
Create an "end function body" command.
Definition: prettyprint.hh:370
Funcdata::blockRemoveInternal
void blockRemoveInternal(BlockBasic *bb, bool unreachable)
Remove an active basic block from the function.
Definition: funcdata_block.cc:249
ActionDatabase::deriveAction
Action * deriveAction(const string &baseaction, const string &grp)
Derive a root Action.
Definition: action.cc:1099
RuleMultNegOne::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1053
FuncCallSpecs::checkInputTrialUse
void checkInputTrialUse(Funcdata &data, AliasChecker &aliascheck)
Mark if input trials are being actively used.
Definition: fspec.cc:4613
ScopeGhidra::printEntries
virtual void printEntries(ostream &s) const
Dump a description of all SymbolEntry objects to a stream.
Definition: database_ghidra.hh:111
SpacebaseSpace::SpacebaseSpace
SpacebaseSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind, int4 sz, AddrSpace *base, int4 dl)
Definition: translate.cc:38
RuleNegateNegate
Simplify INT_NEGATE chains: ~~V => V
Definition: ruleaction.hh:1338
Funcdata::stopProcessing
void stopProcessing(void)
Mark that processing has completed for this function.
Definition: funcdata.cc:144
CPUI_FLOAT_DIV
@ CPUI_FLOAT_DIV
Floating-point division (/)
Definition: opcodes.hh:94
RulePositiveDiv::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6501
BlockGraph::newBlockList
BlockList * newBlockList(const vector< FlowBlock * > &nodes)
Build a new BlockList.
Definition: block.cc:1651
ActionStop::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:51
UserPcodeOp::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the symbol representing this operation in decompiled code.
Definition: userop.hh:54
Funcdata::attemptDynamicMappingLate
bool attemptDynamicMappingLate(SymbolEntry *entry, DynamicHash &dhash)
Map the name of a dynamic symbol to a Varnode.
Definition: funcdata_varnode.cc:1154
OpBehaviorCopy::recoverInputUnary
virtual uintb recoverInputUnary(int4 sizeout, uintb out, int4 sizein) const
Reverse the unary op-code operation, recovering the input value.
Definition: opbehavior.cc:161
Funcdata::truncatedFlow
void truncatedFlow(const Funcdata *fd, const FlowInfo *flow)
Generate a clone with truncated control-flow given a partial function.
Definition: funcdata_op.cc:745
EmulateSnippet::pos
int4 pos
Index of current p-code op being executed.
Definition: emulateutil.hh:117
CollapseStructure::ruleCaseFallthru
bool ruleCaseFallthru(FlowBlock *bl)
Attempt to one switch case falling through to another.
Definition: blockaction.cc:1709
Merge::mergeAdjacent
void mergeAdjacent(void)
Speculatively merge Varnodes that are input/output to the same p-code op.
Definition: merge.cc:881
CommentDatabase::addComment
virtual void addComment(uint4 tp, const Address &fad, const Address &ad, const string &txt)=0
Add a new comment to the container.
RulePushMulti
Simplify MULTIEQUAL operations where the branches hold the same value.
Definition: ruleaction.hh:247
Merge::unifyAddress
void unifyAddress(VarnodeLocSet::const_iterator startiter, VarnodeLocSet::const_iterator enditer)
Make sure all Varnodes with the same storage address and size can be merged.
Definition: merge.cc:495
ConstantPool
An interface to the pool of constant objects for byte-code languages.
Definition: cpool.hh:94
PrintLanguage::Atom
A single non-operator token emitted by the decompiler.
Definition: printlanguage.hh:194
FlowBlock::typeToName
static string typeToName(block_type bt)
Get the name string associated with a block_type.
Definition: block.cc:627
InjectContextGhidra::saveXml
virtual void saveXml(ostream &s) const
Save this context to an XML stream as a <context> tag.
Definition: inject_ghidra.cc:18
ParamListStandard::clone
virtual ParamList * clone(void) const
Clone this parameter list model.
Definition: fspec.cc:1076
ScopeGhidra::holes
RangeList holes
List of (queried) memory ranges with no Symbol in them.
Definition: database_ghidra.hh:38
ShiftForm
Definition: double.hh:220
RuleLoadVarnode::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3938
EmitXml::openParen
virtual int4 openParen(char o, int4 id=0)
Emit an open parenthesis.
Definition: prettyprint.cc:304
TypeOpCallind::TypeOpCallind
TypeOpCallind(TypeFactory *t)
Constructor.
Definition: typeop.cc:610
CPUI_INT_LEFT
@ CPUI_INT_LEFT
Left shift (<<)
Definition: opcodes.hh:70
RuleSubZext
Simplify INT_ZEXT applied to SUBPIECE expressions.
Definition: ruleaction.hh:844
LoadImageSection::noload
@ noload
uninitialized section
Definition: loadimage.hh:48
PrintCCapability
Factory and static initializer for the "c-language" back-end to the decompiler.
Definition: printc.hh:32
EmitNoXml::tagVariable
virtual void tagVariable(const char *ptr, syntax_highlight hl, const Varnode *vn, const PcodeOp *op)
Emit a variable token.
Definition: prettyprint.hh:239
ProtoModel::stackgrowsnegative
bool stackgrowsnegative
True if stack parameters have (normal) low address to high address ordering.
Definition: fspec.hh:628
ActionRestructureHigh::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:830
Scope::isSubScope
bool isSubScope(const Scope *scp) const
Is this a sub-scope of the given Scope.
Definition: database.cc:1334
Action::rule_repeatapply
@ rule_repeatapply
Apply rule repeatedly until no change.
Definition: action.hh:54
LoadImage::getArchType
virtual string getArchType(void) const =0
Get a string indicating the architecture type.
TypeOpPiece
Information about the PIECE op-code.
Definition: typeop.hh:688
Translate::setContextDefault
virtual void setContextDefault(const string &name, uintm val)
Set the default value for a particular context variable.
Definition: translate.hh:336
Rule::clone
virtual Rule * clone(const ActionGroupList &grouplist) const =0
Clone the Rule.
ActionGroup::getSubRule
virtual Rule * getSubRule(const string &specify)
Retrieve a specific sub-rule by name.
Definition: action.cc:464
JumpBasic::getTableSize
virtual int4 getTableSize(void) const
Return the number of entries in the address table.
Definition: jumptable.hh:381
Merge::mergeMarker
void mergeMarker(void)
Force the merge of input and output Varnodes to MULTIEQUAL and INDIRECT ops.
Definition: merge.cc:800
ActionStackPtrFlow::analyzeExtraPop
static void analyzeExtraPop(Funcdata &data, AddrSpace *stackspace, int4 spcbase)
Calculate stack-pointer change across undetermined sub-functions.
Definition: coreaction.cc:258
ParamListStandard::getSpacebase
virtual AddrSpace * getSpacebase(void) const
Get the address space associated with any stack based parameters in this list.
Definition: fspec.hh:527
RuleCollectTerms::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:156
TypeArray::printRaw
virtual void printRaw(ostream &s) const
Print a description of the type to stream.
Definition: type.cc:446
AliasChecker::localExtreme
uintb localExtreme
Largest possible offset for a local variable.
Definition: varmap.hh:122
Heritage::refineInput
void refineInput(Varnode *vn, const Address &addr, const vector< int4 > &refine, vector< Varnode * > &newvn)
Split up a known input Varnode based on the given refinement.
Definition: heritage.cc:1426
LocationMap::iterator
map< Address, SizePass >::iterator iterator
Iterator into the main map.
Definition: heritage.hh:45
ActionNameVars::lookForBadJumpTables
static void lookForBadJumpTables(Funcdata &data)
Mark the switch variable for bad jump-tables.
Definition: coreaction.cc:2309
StackSolver::build
void build(const Funcdata &data, AddrSpace *id, int4 spcbase)
Build the system of equations.
Definition: coreaction.cc:144
GhidraTranslate::printAssembly
virtual int4 printAssembly(AssemblyEmit &emit, const Address &baseaddr) const
Disassemble a single machine instruction.
Definition: ghidra_translate.hh:54
Scope::addMap
SymbolEntry * addMap(const SymbolEntry &entry)
Integrate a SymbolEntry into the range maps.
Definition: database.cc:1058
Architecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: architecture.cc:421
Varnode::writemask
@ writemask
Should not be considered a write in heritage calculation.
Definition: varnode.hh:113
jumptable.hh
Classes to support jump-tables and their recovery.
ActionGroup
A group of actions (generally) applied in sequence.
Definition: action.hh:142
Funcdata::calcNZMask
void calcNZMask(void)
Calculate non-zero masks for all Varnodes.
Definition: funcdata_varnode.cc:720
RangeHint::rangeType
RangeType rangeType
The type of range.
Definition: varmap.hh:85
PrintC::opMultiequal
virtual void opMultiequal(const PcodeOp *op)
Emit a MULTIEQUAL operator.
Definition: printc.hh:282
SetAction::res
bool res
Set to true if the configuration action was successful.
Definition: ghidra_process.hh:209
Document
A complete in-memory XML document.
Definition: xml.hh:206
FlowBlock::halfDeleteOutEdge
void halfDeleteOutEdge(int4 slot)
Delete the out half of an edge, correcting indices.
Definition: block.cc:103
Funcdata::name
string name
Name of function.
Definition: funcdata.hh:67
flow.hh
Utilities for following control-flow in p-code generated from machine instructions.
CircleRange::pullBackBinary
bool pullBackBinary(OpCode opc, uintb val, int4 slot, int4 inSize, int4 outSize)
Pull-back this thru binary operator.
Definition: rangeutil.cc:797
printjava.hh
Classes supporting the java-language back-end to the decompiler.
Address::toPhysical
void toPhysical(void)
Convert this to a physical address.
Definition: address.cc:91
ParamEntryResolver
rangemap< ParamEntryRange > ParamEntryResolver
A map from offset to ParamEntry.
Definition: fspec.hh:141
Varnode::addl_flags
addl_flags
Additional boolean properties on a Varnode.
Definition: varnode.hh:111
RuleAndPiece::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1677
OpBehaviorFloatFloor::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:477
RuleZextSless
Transform INT_ZEXT and INT_SLESS: zext(V) s< c => V < c
Definition: ruleaction.hh:478
cseFindInBlock
PcodeOp * cseFindInBlock(PcodeOp *op, Varnode *vn, BlockBasic *bl, PcodeOp *earliest)
Find a duplicate calculation of a given PcodeOp reading a specific Varnode.
Definition: funcdata_op.cc:1151
OpBehaviorFloatRound::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:707
ContextDatabase::setContextRegion
void setContextRegion(const Address &addr1, const Address &addr2, int4 num, uintm mask, uintm value)
Set a context variable value over a given range of addresses.
Definition: globalcontext.cc:190
AddTreeState::nonmultsum
uintb nonmultsum
Sum of non-multiple constants.
Definition: ruleaction.hh:39
SubvariableFlow::ReplaceOp::numparams
int4 numparams
Number of parameters in (new) op.
Definition: subflow.hh:57
ParameterBasic::getSymbol
virtual Symbol * getSymbol(void) const
Retrieve the formal Symbol associated with this parameter.
Definition: fspec.hh:987
TypeOpIntSrem::TypeOpIntSrem
TypeOpIntSrem(TypeFactory *t)
Constructor.
Definition: typeop.cc:1308
CPoolRecord::value
uintb value
Constant value of the object (if known)
Definition: cpool.hh:67
Database::fillResolve
void fillResolve(Scope *scope)
Add the ownership ranges of the given Scope to the map.
Definition: database.cc:2763
RuleThreeWayCompare
Simplify expressions involving three-way comparisons.
Definition: ruleaction.hh:1410
EmitNoXml::endBlock
virtual void endBlock(int4 id)
End a control-flow element.
Definition: prettyprint.hh:228
MemoryState::MemoryState
MemoryState(Translate *t)
A constructor for MemoryState.
Definition: memstate.hh:171
ContextDatabase::getVariable
virtual ContextBitRange & getVariable(const string &nm)=0
Retrieve the context variable description object by name.
FuncProto::unknown_model
@ unknown_model
Set if the PrototypeModel isn't known.
Definition: fspec.hh:1158
ScopeLocal::fakeInputSymbols
void fakeInputSymbols(void)
Make sure all stack inputs have an associated Symbol.
Definition: varmap.cc:1119
TypeOpBranch
Information about the BRANCH op-code.
Definition: typeop.hh:236
cpool.hh
Definitions to support a constant pool for deferred compilation languages (i.e. java byte-code)
OptionInferConstPtr
Toggle whether the decompiler attempts to infer constant pointers.
Definition: options.hh:93
OpBehaviorFloatRound
CPUI_FLOAT_ROUND behavior.
Definition: opbehavior.hh:484
HighVariable::namerepdirty
@ namerepdirty
The name representative for the HighVariable is dirty.
Definition: variable.hh:47
VarnodeData::operator!=
bool operator!=(const VarnodeData &op2) const
Compare for inequality.
Definition: pcoderaw.hh:76
PartialSymbolEntry::field
const TypeField * field
The component object describing the field.
Definition: printc.hh:47
CPUI_BOOL_OR
@ CPUI_BOOL_OR
Boolean or (||)
Definition: opcodes.hh:82
OpBehaviorBoolAnd
CPUI_BOOL_AND behavior.
Definition: opbehavior.hh:334
TypeUnicode::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:198
ActionUnjustifiedParams::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3867
ConditionalExecution::fd
Funcdata * fd
Function being analyzed.
Definition: condexe.hh:132
RuleCondNegate
Flip conditions to match structuring cues.
Definition: ruleaction.hh:924
PrintLanguage::emitBlockDoWhile
virtual void emitBlockDoWhile(const BlockDoWhile *bl)=0
Emit a loop structure, check at bottom.
Funcdata::localmap
ScopeLocal * localmap
Local variables (symbols in the function scope)
Definition: funcdata.hh:71
SleighArchitecture::filename
string filename
Name of active load-image file.
Definition: sleigh_arch.hh:94
PrintLanguage::commentend
string commentend
Delimiter characters (if any) for the end of a comment.
Definition: printlanguage.hh:240
ParameterBasic::isIndirectStorage
virtual bool isIndirectStorage(void) const
Is this really a pointer to the true parameter.
Definition: fspec.hh:979
EmulateFunction::executeLoad
virtual void executeLoad(void)
Standard behavior for a p-code LOAD.
Definition: jumptable.cc:77
ParameterSymbol::clone
virtual ProtoParameter * clone(void) const
Clone the parameter.
Definition: fspec.cc:2405
Override::BRANCH
@ BRANCH
Replace primary CALL or RETURN with suitable BRANCH operation.
Definition: override.hh:45
UniqueSpace
The pool of temporary storage registers.
Definition: space.hh:203
ActionPool::~ActionPool
virtual ~ActionPool(void)
Destructor.
Definition: action.cc:711
PrintC::opIntSless
virtual void opIntSless(const PcodeOp *op)
Emit a INT_SLESS operator.
Definition: printc.hh:236
CollapseStructure::graph
BlockGraph & graph
The control-flow graph.
Definition: blockaction.hh:197
RulePullsubIndirect::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1006
EmitXml::setCommentFill
virtual void setCommentFill(const string &fill)
Set the comment fill characters for when line breaks are forced.
Definition: prettyprint.hh:192
HighVariable::highflags
uint4 highflags
Dirtiness flags.
Definition: variable.hh:61
JumpAssisted::buildAddresses
virtual void buildAddresses(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable, vector< LoadTable > *loadpoints) const
Construct the explicit list of target addresses (the Address Table) from this model.
Definition: jumptable.cc:1995
TraceDAG::retireBranch
list< BlockTrace * >::iterator retireBranch(BranchPoint *bp, FlowBlock *exitblock)
Retire a BranchPoint, updating its parent BlockTrace.
Definition: blockaction.cc:893
CPUI_INT_SRIGHT
@ CPUI_INT_SRIGHT
Right shift, arithmetic (>>)
Definition: opcodes.hh:72
GhidraTranslate::addRegister
virtual void addRegister(const string &nm, AddrSpace *base, uintb offset, int4 size)
Add a named register to the model for this processor.
Definition: ghidra_translate.hh:44
TypeCode::compareBasic
int4 compareBasic(const TypeCode *op) const
Compare surface characteristics of two TypeCodes.
Definition: type.cc:989
Heritage::buildInfoList
void buildInfoList(void)
Initialize information for each space.
Definition: heritage.cc:2211
Symbol::force_dec
@ force_dec
Force decimal printing of constant symbol.
Definition: database.hh:178
CommentDatabase::beginComment
virtual CommentSet::const_iterator beginComment(const Address &fad) const =0
Get an iterator to the beginning of comments for a single function.
Funcdata::totalReplace
void totalReplace(Varnode *vn, Varnode *newvn)
Replace all read references to the first Varnode with a second Varnode.
Definition: funcdata_varnode.cc:1205
FlowInfo::branchTarget
PcodeOp * branchTarget(PcodeOp *op) const
Find the target referred to by a given BRANCH or CBRANCH.
Definition: flow.cc:185
ParameterBasic::isTypeLocked
virtual bool isTypeLocked(void) const
Is the parameter data-type locked.
Definition: fspec.hh:976
SubvariableFlow::trySwitchPull
bool trySwitchPull(PcodeOp *op, ReplaceVarnode *rvn)
Determine if the subgraph variable can act as a switch variable for the given BRANCHIND.
Definition: subflow.cc:316
SubvariableFlow::worklist
vector< ReplaceVarnode * > worklist
Subgraph variable nodes still needing to be traced.
Definition: subflow.hh:90
SymbolEntry::getSizedType
Datatype * getSizedType(const Address &addr, int4 sz) const
Get the data-type associated with (a piece of) this.
Definition: database.cc:127
EmulatePcodeCache::establishOp
void establishOp(void)
Set-up currentOp and currentBehave.
Definition: emulate.cc:375
BlockGraph::newBlockInfLoop
BlockInfLoop * newBlockInfLoop(FlowBlock *body)
Build a new BlockInfLoop.
Definition: block.cc:1782
Merge::shadowedVarnode
static bool shadowedVarnode(const Varnode *vn)
Determine if given Varnode is shadowed by another Varnode in the same HighVariable.
Definition: merge.cc:1161
FlowInfo::inline_base
set< Address > inline_base
Storage for addresses of functions that are in-lined.
Definition: flow.hh:102
memstate.hh
Classes for keeping track of memory state during emulation.
RulePtraddUndo::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1031
InjectPayload::getSource
virtual string getSource(void) const =0
Return a string describing the source of the injection (.cspec, prototype model, etc....
ExecutablePcode::ExecutablePcode
ExecutablePcode(Architecture *g, const string &src, const string &nm)
Constructor.
Definition: pcodeinject.cc:103
TypeFactory::findByIdLocal
Datatype * findByIdLocal(const string &nm, uint8 id) const
Search locally by name and id.
Definition: type.cc:1367
GhidraTranslate::initialize
virtual void initialize(DocumentStorage &store)
Initialize the translator given XML configuration documents.
Definition: ghidra_translate.cc:33
Range::last
uintb last
Offset of last byte in this Range.
Definition: address.hh:165
EmulateSnippet::executeCbranch
virtual bool executeCbranch(void)
Check if the conditional of a CBRANCH is true.
Definition: emulateutil.cc:219
Architecture::parseStackPointer
void parseStackPointer(const Element *el)
Apply stack pointer configuration.
Definition: architecture.cc:924
ArchitectureGhidra::readXMLAll
static Document * readXMLAll(istream &s)
Read a whole response as an XML document.
Definition: ghidra_arch.cc:208
RuleZextCommute
Commute INT_ZEXT with INT_RIGHT: zext(V) >> W => zext(V >> W)
Definition: ruleaction.hh:794
EffectRecord::operator!=
bool operator!=(const EffectRecord &op2) const
Inequality operator.
Definition: fspec.hh:1561
PrintJavaCapability::PrintJavaCapability
PrintJavaCapability(void)
Singleton constructor.
Definition: printjava.cc:24
Cover::emptyBlock
static const CoverBlock emptyBlock
Global empty CoverBlock for blocks not covered by this.
Definition: cover.hh:70
SubvariableFlow::createOp
ReplaceOp * createOp(OpCode opc, int4 numparam, ReplaceVarnode *outrvn)
Create a logical subgraph operator node given its output variable node.
Definition: subflow.cc:156
Datatype::Datatype
Datatype(const Datatype &op)
Construct the base data-type copying low-level properties of another.
Definition: type.hh:90
AddrSpace::pointerLowerBound
uintb pointerLowerBound
Offset below which we don't search for pointers.
Definition: space.hh:100
MapState::gatherVarnodes
void gatherVarnodes(const Funcdata &fd)
Add stack Varnodes as hints to the collection.
Definition: varmap.cc:889
JumpValuesRangeDefault::contains
virtual bool contains(uintb val) const
Return true if the given value is in the set of possible values.
Definition: jumptable.cc:328
RuleStructOffset0
Convert a LOAD or STORE to the first element of a structure to a PTRSUB.
Definition: ruleaction.hh:1008
AncestorRealistic::uponPop
int4 uponPop(State &state, int4 command)
Pop a Varnode from the traversal stack.
Definition: funcdata_varnode.cc:1667
ActionSetCasts::castInput
static int4 castInput(PcodeOp *op, int4 slot, Funcdata &data, CastStrategy *castStrategy)
Insert cast to produce the input Varnode to a given PcodeOp if necessary.
Definition: coreaction.cc:2216
OptionToggleRule
Toggle whether a specific Rule is applied in the current Action.
Definition: options.hh:255
RuleIdentityEl::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:592
SymbolEntry::inittype
EntryInitData inittype
Initialization data for a SymbolEntry in a rangemap.
Definition: database.hh:113
Cover::addRefPoint
void addRefPoint(const PcodeOp *ref, const Varnode *vn)
Add a variable read to this Cover.
Definition: cover.cc:504
RuleBxor2NotEqual
Eliminate BOOL_XOR: V ^^ W => V != W
Definition: ruleaction.hh:101
Override::CALL
@ CALL
Replace primary BRANCH or RETURN with suitable CALL operation.
Definition: override.hh:46
FuncCallSpecs::collectOutputTrialVarnodes
void collectOutputTrialVarnodes(vector< Varnode * > &trialvn)
Definition: fspec.cc:4564
Action::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: action.cc:98
PathMeld::RootedOp::rootVn
int4 rootVn
The index, within commonVn, of the Varnode at the split point.
Definition: jumptable.hh:70
Override::printRaw
void printRaw(ostream &s, Architecture *glb) const
Dump a description of the overrides to stream.
Definition: override.cc:238
RangeHint::start
uintb start
Starting offset of this range of bytes.
Definition: varmap.hh:80
FlowBlock::printTree
virtual void printTree(ostream &s, int4 level) const
Print tree structure of any blocks owned by this.
Definition: block.cc:583
TypeOpBranchind::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:256
PrintC::opConstructor
virtual void opConstructor(const PcodeOp *op, bool withNew)
Emit an operator constructing an object.
Definition: printc.cc:525
EmitNoXml::beginReturnType
virtual int4 beginReturnType(const Varnode *vn)
Begin a return type declaration.
Definition: prettyprint.hh:231
Scope::queryExternalRefFunction
Funcdata * queryExternalRefFunction(const Address &addr) const
Look-up a function thru an external reference.
Definition: database.cc:1318
TypeOpCallother::TypeOpCallother
TypeOpCallother(TypeFactory *t)
Constructor.
Definition: typeop.cc:676
ActionInferTypes::propagateTypeEdge
static bool propagateTypeEdge(TypeFactory *typegrp, PcodeOp *op, int4 inslot, int4 outslot)
Attempt to propagate a data-type across a single PcodeOp edge.
Definition: coreaction.cc:4261
TypeOpFloatInt2Float::TypeOpFloatInt2Float
TypeOpFloatInt2Float(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1440
ActionReturnSplit::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: blockaction.hh:327
TypeFactory::~TypeFactory
virtual ~TypeFactory(void)
Destructor.
Definition: type.cc:1357
ActionHideShadow::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3914
MemoryState::setChunk
void setChunk(const uint1 *val, AddrSpace *spc, uintb off, int4 size)
Set a chunk of data from memory state.
Definition: memstate.cc:727
RuleRangeMeld::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1400
PcodeOp::setOpcode
void setOpcode(TypeOp *t_op)
Set the opcode for this PcodeOp.
Definition: op.cc:177
HighVariable::remove
void remove(Varnode *vn)
Remove a member Varnode from this.
Definition: variable.cc:258
PrintLanguage::opBranch
virtual void opBranch(const PcodeOp *op)=0
Emit a BRANCH operator.
FlowBlock::f_flip_path
@ f_flip_path
If true, out edges have been flipped since last time path was traced.
Definition: block.hh:90
ValueSet::opCode
OpCode opCode
Op-code defining Varnode.
Definition: rangeutil.hh:132
Symbol::restoreXmlBody
void restoreXmlBody(List::const_iterator iter)
Restore details of the Symbol from XML.
Definition: database.cc:479
ActionFinalStructure::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: blockaction.cc:2167
CollapseStructure::orderLoopBodies
void orderLoopBodies(void)
Identify and label all loop structure for this graph.
Definition: blockaction.cc:1141
Scope::setCategory
virtual void setCategory(Symbol *sym, int4 cat, int4 ind)=0
Set the category and index for the given Symbol.
SubvariableFlow::getReplaceVarnode
Varnode * getReplaceVarnode(ReplaceVarnode *rvn)
Build the logical Varnode which will replace its original containing Varnode.
Definition: subflow.cc:1212
FunctionSymbol::consumeSize
int4 consumeSize
Minimum number of bytes to consume with the start address.
Definition: database.hh:253
InjectPayloadGhidra::restoreXml
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.hh:44
ConditionMarker::ConditionMarker
ConditionMarker(void)
Constructor.
Definition: condexe.cc:18
OpBehaviorIntRem::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:482
PcodeOpBank::markDead
void markDead(PcodeOp *op)
Mark the given PcodeOp as dead.
Definition: op.cc:763
ActionGroup::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: action.cc:391
Varnode::isHeritageKnown
bool isHeritageKnown(void) const
Return true if this Varnode is linked into the SSA tree.
Definition: varnode.hh:271
Comment::warningheader
@ warningheader
The comment is auto-generated and should be in the header.
Definition: comment.hh:52
Merge::intersection
bool intersection(HighVariable *a, HighVariable *b)
Test the intersection of two HighVariables and cache the result.
Definition: merge.cc:1481
Funcdata::endOp
list< PcodeOp * >::const_iterator endOp(OpCode opc) const
End of PcodeOp objects with the given op-code.
Definition: funcdata.hh:452
ParamListStandardOut::assignMap
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.cc:1083
CircleRange::pullBackUnary
bool pullBackUnary(OpCode opc, int4 inSize, int4 outSize)
Pull-back this through the given unary operator.
Definition: rangeutil.cc:726
AddrSpace::big_endian
@ big_endian
Space is big endian if set, little endian otherwise.
Definition: space.hh:77
PrintC::opFloatCeil
virtual void opFloatCeil(const PcodeOp *op)
Emit a FLOAT_CEIL operator.
Definition: printc.hh:279
EmulateSnippet::executeBinary
virtual void executeBinary(void)
Execute a binary arithmetic/logical operation.
Definition: emulateutil.cc:174
Scope::fd
Funcdata * fd
(If non-null) the function which this is the local Scope for
Definition: database.hh:426
Funcdata::installJumpTable
JumpTable * installJumpTable(const Address &addr)
Install a new jump-table for the given Address.
Definition: funcdata_block.cc:458
PcodeOp::is_cpool_transformed
@ is_cpool_transformed
Have we checked for cpool transforms.
Definition: op.hh:98
Funcdata::findSpacebaseInput
Varnode * findSpacebaseInput(AddrSpace *id) const
Definition: funcdata.cc:263
FuncProto::getInjectId
int4 getInjectId(void) const
Get the injection id associated with this.
Definition: fspec.hh:1222
ActionMultiCse::processBlock
bool processBlock(Funcdata &data, BlockBasic *bl)
Search a block for equivalent CPUI_MULTIEQUAL.
Definition: coreaction.cc:811
PcodeOp::PcodeOp
PcodeOp(int4 s, const SeqNum &sq)
Construct an unattached PcodeOp.
Definition: op.cc:71
LanedRegister::const_iterator
LanedIterator const_iterator
Iterator over possible lane sizes for this register.
Definition: transform.hh:105
RuleLeftRight::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2003
TypeOpIntDiv::TypeOpIntDiv
TypeOpIntDiv(TypeFactory *t)
Constructor.
Definition: typeop.cc:1248
Heritage::mark_node
@ mark_node
Node has already been in queue.
Definition: heritage.hh:174
AddrSpace::getType
spacetype getType(void) const
Get the type of space.
Definition: space.hh:289
PrintLanguage::opFloatSqrt
virtual void opFloatSqrt(const PcodeOp *op)=0
Emit a FLOAT_SQRT operator.
FspecSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: fspec.cc:1610
TypeOpPtrsub::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1695
ActionActiveReturn::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:728
CastStrategy::castStandard
virtual Datatype * castStandard(Datatype *reqtype, Datatype *curtype, bool care_uint_int, bool care_ptr_uint) const =0
Does there need to be a visible cast between the given data-types.
RulePopcountBoolXor::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:8518
WidenerFull::widenIteration
int4 widenIteration
The iteration at which widening is attempted.
Definition: rangeutil.hh:235
Merge::updateHigh
bool updateHigh(HighVariable *a)
Make sure given HighVariable's Cover is up-to-date.
Definition: merge.cc:1441
Heritage::guardLoads
void guardLoads(uint4 flags, const Address &addr, int4 size, vector< Varnode * > &write)
Guard LOAD ops in preparation for the renaming algorithm.
Definition: heritage.cc:1201
ParamList::p_register
@ p_register
Unordered parameter passing locations model.
Definition: fspec.hh:344
DynamicHash::getPositionFromHash
static uint4 getPositionFromHash(uint8 h)
Retrieve the encoded position from a hash.
Definition: dynamic.cc:499
AddrSpace::truncateSpace
void truncateSpace(uint4 newsize)
Definition: space.cc:104
PrintC::enum_cat
static OpToken enum_cat
The concatenation operator for enumerated values.
Definition: printc.hh:114
ActionMarkExplicit::OpStackElement::vn
Varnode * vn
The Varnode at this particular point in the path.
Definition: coreaction.hh:418
BlockGraph::newBlockCondition
BlockCondition * newBlockCondition(FlowBlock *b1, FlowBlock *b2)
Build a new BlockCondition.
Definition: block.cc:1673
Action::statusflags
statusflags
Boolean properties describing the status of an action.
Definition: action.hh:62
EmitXml::tagLabel
virtual void tagLabel(const char *ptr, syntax_highlight hl, const AddrSpace *spc, uintb off)
Emit a code label identifier.
Definition: prettyprint.cc:276
Architecture::inst
vector< TypeOp * > inst
Registered p-code instructions.
Definition: architecture.hh:152
TypeOpIntSless::TypeOpIntSless
TypeOpIntSless(TypeFactory *t)
Constructor.
Definition: typeop.cc:852
RuleHumptyOr::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4907
RulePtrFlow::RulePtrFlow
RulePtrFlow(const string &g, Architecture *conf)
Constructor.
Definition: ruleaction.cc:7385
CPUI_NEW
@ CPUI_NEW
Allocate a new object (new)
Definition: opcodes.hh:122
FlowBlock::f_mark
@ f_mark
Generic way to mark a block.
Definition: block.hh:81
RuleSegment
Propagate constants through a SEGMENTOP.
Definition: ruleaction.hh:1220
TypeCode
Datatype object representing executable code.
Definition: type.hh:329
TypeOpCast::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:713
TypeOpBranchind::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:530
Heritage::generateLoadGuard
void generateLoadGuard(StackNode &node, PcodeOp *op, AddrSpace *spc)
Generate a guard record given an indexed LOAD into a stack space.
Definition: heritage.cc:757
SubvariableFlow::createLink
bool createLink(ReplaceOp *rop, uintb mask, int4 slot, Varnode *vn)
Add a new variable to the logical subgraph as an input to the given operation.
Definition: subflow.cc:943
ArchitectureGhidra::buildConstantPool
virtual void buildConstantPool(DocumentStorage &store)
Build the constant pool.
Definition: ghidra_arch.cc:349
LogicalForm
Definition: double.hh:123
RuleOrConsume::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:134
JumpValuesRangeDefault::initializeForReading
virtual bool initializeForReading(void) const
Initialize this for iterating over the set of possible values.
Definition: jumptable.cc:336
PrintC::multiply
static OpToken multiply
The multiplication operator.
Definition: printc.hh:78
EmitPrettyPrint::tokqueue
circularqueue< TokenSplit > tokqueue
The full stream of tokens.
Definition: prettyprint.hh:714
SetOptions
Command to toggle options within the decompiler.
Definition: ghidra_process.hh:222
RuleZextShiftZext
Simplify multiple INT_ZEXT operations: zext( zext(V) << c ) => zext(V) << c
Definition: ruleaction.hh:804
TypeOpIntSborrow::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:1041
JumpBasic::varnodeIndex
int4 varnodeIndex
Position of the normalized switch Varnode within PathMeld.
Definition: jumptable.hh:349
RawBinaryArchitecture::resolveArchitecture
virtual void resolveArchitecture(void)
Figure out the processor and compiler of the target executable.
Definition: raw_arch.cc:64
Funcdata::beginDef
VarnodeDefSet::const_iterator beginDef(uint4 fl, const Address &addr) const
Start of (input or free) Varnodes at a given storage address.
Definition: funcdata.hh:348
CPUI_SEGMENTOP
@ CPUI_SEGMENTOP
Look-up a segmented address.
Definition: opcodes.hh:120
OverlaySpace::baseSpace
AddrSpace * baseSpace
Space being overlayed.
Definition: space.hh:239
Funcdata::high_level_index
uint4 high_level_index
Creation index of first Varnode created after HighVariables are created.
Definition: funcdata.hh:64
PcodeInjectLibrary
A collection of p-code injection payloads.
Definition: pcodeinject.hh:162
ProtoModel::ProtoModel
ProtoModel(Architecture *g)
Constructor for use with restoreXml()
Definition: fspec.cc:1753
OpBehavior
Class encapsulating the action/behavior of specific pcode opcodes.
Definition: opbehavior.hh:42
PrintC::option_convention
bool option_convention
Set to true if we should print calling convention.
Definition: printc.hh:117
RawBinaryArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)
Build an Architecture given a raw file or data.
Definition: raw_arch.cc:33
BlockGraph::newBlockWhileDo
BlockWhileDo * newBlockWhileDo(FlowBlock *cond, FlowBlock *cl)
Build a new BlockWhileDo.
Definition: block.cc:1751
Heritage::splitPieces
void splitPieces(const vector< Varnode * > &vnlist, PcodeOp *insertop, const Address &addr, int4 size, Varnode *startvn)
Build a set of Varnode piece expression at the given location.
Definition: heritage.cc:411
FuncProto::characterizeAsInputParam
int4 characterizeAsInputParam(const Address &addr, int4 size) const
Decide whether a given storage location could be, or could hold, an input parameter.
Definition: fspec.cc:3404
Scope
A collection of Symbol objects within a single (namespace or functional) scope.
Definition: database.hh:413
LoadImageFunc::name
string name
Name of function.
Definition: loadimage.hh:38
FlowInfo::setFallthruBound
bool setFallthruBound(Address &bound)
Find end of the next unprocessed region.
Definition: flow.cc:475
PcodeOp::getRepeatSlot
int4 getRepeatSlot(const Varnode *vn, int4 firstSlot, list< PcodeOp * >::const_iterator iter) const
Find the slot for a given Varnode, which may be take up multiple input slots.
Definition: op.cc:93
FuncProto::updateInputNoTypes
void updateInputNoTypes(const vector< Varnode * > &triallist, ParamActive *activeinput, TypeFactory *factory)
Update input parameters based on Varnode trials, but do not store the data-type.
Definition: fspec.cc:3218
LocationMap::find
iterator find(Address addr)
Look up if/how given address was heritaged.
Definition: heritage.cc:69
ProtoParameter::setNameLock
virtual void setNameLock(bool val)=0
Toggle the lock on the name.
FlowBlock::replaceEdgeMap
static void replaceEdgeMap(vector< BlockEdge > &vec)
Update block references in edges with copy map.
Definition: block.cc:256
PrintCCapability::PrintCCapability
PrintCCapability(void)
Initialize the singleton.
Definition: printc.cc:79
ActionDominantCopy::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:971
RuleDivTermAdd::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1142
TypeOpFloatDiv::TypeOpFloatDiv
TypeOpFloatDiv(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1398
Scope::addMapPoint
SymbolEntry * addMapPoint(Symbol *sym, const Address &addr, const Address &usepoint)
Map a Symbol to a specific address.
Definition: database.cc:1487
Varnode::setDef
void setDef(PcodeOp *op)
Set the defining PcodeOp of this Varnode.
Definition: varnode.cc:351
ParamEntryRange::last
uintb last
Ending offset of the ParamEntry's range.
Definition: fspec.hh:106
RulePiecePathology::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1440
PrintC::opFloatInt2Float
virtual void opFloatInt2Float(const PcodeOp *op)
Emit a FLOAT_INT2FLOAT operator.
Definition: printc.hh:276
ProtoParameter::isNameUndefined
virtual bool isNameUndefined(void) const =0
Is the name of this parameter undefined.
CompilerTag::name
string name
(Human readable) name of the compiler
Definition: sleigh_arch.hh:30
Locator
void * Locator
Placeholder for a document locator object.
Definition: xml.hh:71
EmitPrettyPrint::overflow
void overflow(void)
Reset indenting levels to accommodate a token that won't fit.
Definition: prettyprint.cc:582
FuncProto::assumedOutputExtension
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
OptionHideExtensions
Toggle whether implied extensions (ZEXT or SEXT) are printed.
Definition: options.hh:147
Funcdata::endDef
VarnodeDefSet::const_iterator endDef(uint4 fl, const Address &addr) const
End of (input or free) Varnodes at a given storage address.
Definition: funcdata.hh:351
Override::applyForceGoto
void applyForceGoto(Funcdata &data) const
Push all the force-goto overrides into the function.
Definition: override.cc:194
TypeOpSubpiece::TypeOpSubpiece
TypeOpSubpiece(TypeFactory *t)
Constructor.
Definition: typeop.cc:1569
LowlevelError::explain
string explain
Definition: error.hh:45
Architecture::allacts
ActionDatabase allacts
Actions that can be applied in this architecture.
Definition: architecture.hh:156
BlockVarnode::findFront
static int4 findFront(int4 blocknum, const vector< BlockVarnode > &list)
Find the first Varnode defined in the BlockBasic of the given index.
Definition: merge.cc:41
TypeOpExtract::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:794
FlowBlock::getOutIndex
int4 getOutIndex(const FlowBlock *bl) const
Get the outgoing edge index for the given FlowBlock.
Definition: block.cc:562
XmlArchitecture::postSpecFile
virtual void postSpecFile(void)
Read in image information (which uses translator)
Definition: xml_arch.cc:72
ScoreProtoModel::PEntry::slot
int4 slot
Matching slot within the resource list.
Definition: fspec.hh:848
CoverBlock::stop
const PcodeOp * stop
End of the range.
Definition: cover.hh:37
ScopeInternal::dynamicentry
list< SymbolEntry > dynamicentry
Dynamic symbol entries.
Definition: database.hh:733
ParamActive::freePlaceholderSlot
void freePlaceholderSlot(void)
Free the stack placeholder slot.
Definition: fspec.cc:1436
ParamListStandard::getRangeList
virtual void getRangeList(AddrSpace *spc, RangeList &res) const
For a given address space, collect all the parameter locations within that space.
Definition: fspec.cc:1008
BreakTable::setEmulate
virtual void setEmulate(Emulate *emu)=0
Associate a particular emulator with breakpoints in this table.
RuleCollapseConstants
Collapse constant expressions.
Definition: ruleaction.hh:619
userop.hh
Classes for more detailed definitions of user defined p-code operations.
VarnodeBank::createDefUnique
Varnode * createDefUnique(int4 s, Datatype *ct, PcodeOp *op)
Create a temporary Varnode as output of a PcodeOp.
Definition: varnode.cc:1050
PrintC::option_unplaced
bool option_unplaced
Set to true if we should display unplaced comments.
Definition: printc.hh:119
ConditionalExecution::replacement
map< int4, Varnode * > replacement
Map from block to replacement Varnode for (current) Varnode.
Definition: condexe.hh:144
OpBehaviorBoolNegate
CPUI_BOOL_NEGATE behavior.
Definition: opbehavior.hh:320
TypeOpIntNegate
Information about the INT_NEGATE op-code.
Definition: typeop.hh:415
Address::isInvalid
bool isInvalid(void) const
Is the address invalid?
Definition: address.hh:256
LaneDivide::WorkNode::skipLanes
int4 skipLanes
Number of lanes to skip in the global description.
Definition: subflow.hh:172
RuleShiftCompare::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:401
OptionDatabase::set
string set(const string &nm, const string &p1="", const string &p2="", const string &p3="")
Issue an option command.
Definition: options.cc:98
OpBehavior::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:123
AncestorRealistic::execute
bool execute(PcodeOp *op, int4 slot, ParamTrial *t, bool allowFail)
Perform a full ancestor check on a given parameter trial.
Definition: funcdata_varnode.cc:1720
TraceDAG::BlockTrace::bottom
FlowBlock * bottom
Current node being traversed along 1 path from decision point.
Definition: blockaction.hh:129
BlockInfLoop::markLabelBumpUp
virtual void markLabelBumpUp(bool bump)
Let hierarchical blocks steal labels of their (first) components.
Definition: block.cc:2983
ProtoParameter
A function parameter viewed as a name, data-type, and storage address.
Definition: fspec.hh:903
RuleConditionalMove::BoolExpress::evaluatePropagation
bool evaluatePropagation(FlowBlock *root, FlowBlock *branch)
Can this expression be propagated.
Definition: ruleaction.cc:7831
JumpBasic::isOverride
virtual bool isOverride(void) const
Return true if this model was manually overridden.
Definition: jumptable.hh:380
TypeStruct
A composite Datatype object: A "structure" with component "fields".
Definition: type.hh:301
ActionGroupList::list
set< string > list
List of group names.
Definition: action.hh:31
Funcdata::nodeSplitRawDuplicate
void nodeSplitRawDuplicate(BlockBasic *b, BlockBasic *bprime)
Clone all p-code ops from a block into its copy.
Definition: funcdata_block.cc:806
ScopeInternal::savePathXml
static void savePathXml(ostream &s, const vector< string > &vec)
Save a path with <val> tags.
Definition: database.cc:2474
ActionSegmentize::localcount
int4 localcount
Number of times this Action has been performed on the function.
Definition: coreaction.hh:122
RuleEmbed::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4996
LoadImageXml::readonlyset
set< Address > readonlyset
Starting address of read-only chunks.
Definition: loadimage_xml.hh:32
TypeCode::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:1091
AddrSpaceManager::getSpaceByShortcut
AddrSpace * getSpaceByShortcut(char sc) const
Get address space from its shortcut.
Definition: translate.cc:538
ActionMarkImplied::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2927
RulePiecePathology::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:8821
ConditionalJoin::setupMultiequals
void setupMultiequals(void)
Join the Varnodes in the new joinblock.
Definition: blockaction.cc:2003
Varnode::consumed
uintb consumed
What parts of this varnode are used.
Definition: varnode.hh:143
OtherSpace::printRaw
virtual void printRaw(ostream &s, uintb offset) const
Write an address in this space to a stream.
Definition: space.cc:414
Action::getSubAction
virtual Action * getSubAction(const string &specify)
Retrieve a specific sub-action by name.
Definition: action.cc:267
PrintLanguage::ReversePolish
An entry on the reverse polish notation (RPN) stack.
Definition: printlanguage.hh:166
DynamicHash::buildOpUp
void buildOpUp(const PcodeOp *op)
Move input Varnodes for the given PcodeOp into staging.
Definition: dynamic.cc:149
EmulatePcodeCache::fallthruOp
virtual void fallthruOp(void)
Execute fallthru semantics for the pcode cache.
Definition: emulate.cc:389
Varnode::temp
union Varnode::@33 temp
Temporary storage for analysis algorithms.
Rule2Comp2Mult::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3632
FlowInfo::block_edge2
list< PcodeOp * > block_edge2
Destination p-code op (Edges between basic blocks)
Definition: flow.hh:91
AddrSpace::heritaged
@ heritaged
This space is heritaged.
Definition: space.hh:78
TypeOpFloatNeg
Information about the FLOAT_NEG op-code.
Definition: typeop.hh:608
ConstantPoolInternal::CheapSorter
A cheap (efficient) placeholder for a reference to a constant pool record.
Definition: cpool.hh:165
ActionNameVars::makeRec
static void makeRec(ProtoParameter *param, Varnode *vn, map< HighVariable *, OpRecommend > &recmap)
Add a recommendation to the database based on a particular sub-function parameter.
Definition: coreaction.cc:2345
Range::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore this from XML stream.
Definition: address.cc:277
TypeOpUnary::metaout
type_metatype metaout
The metatype of the output.
Definition: typeop.hh:173
ValueSetRead::rightIsStable
bool rightIsStable
Set to true if right boundary of range didn't change (last iteration)
Definition: rangeutil.hh:185
JumpAssisted::findUnnormalized
virtual void findUnnormalized(uint4 maxaddsub, uint4 maxleftright, uint4 maxext)
Recover the unnormalized switch variable.
Definition: jumptable.hh:484
PrintLanguage::blanktoken
@ blanktoken
For anonymous types.
Definition: printlanguage.hh:162
BlockSwitch::grabCaseBasic
void grabCaseBasic(FlowBlock *switchbl, const vector< FlowBlock * > &cs)
Build annotated CaseOrder objects.
Definition: block.cc:3053
TypeOpFloatNotEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:555
BreakTableCallBack::doPcodeOpBreak
virtual bool doPcodeOpBreak(PcodeOpRaw *curop)
Invoke any breakpoints for the given pcode op.
Definition: emulate.cc:72
TokenSplit::tagComment
void tagComment(const char *ptr, EmitXml::syntax_highlight h, const AddrSpace *s, uintb o)
Create a comment string in the generated source code.
Definition: prettyprint.hh:492
GhidraTranslate::instructionLength
virtual int4 instructionLength(const Address &baseaddr) const
Get the length of a machine instruction.
Definition: ghidra_translate.hh:52
PcodeOp::special_print
@ special_print
Op is marked for special printing.
Definition: op.hh:107
BlockBasic::isDoNothing
bool isDoNothing(void) const
Should this block should be removed.
Definition: block.cc:2489
Address::getOffset
uintb getOffset(void) const
Get the address offset.
Definition: address.hh:300
ActionNameVars::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2506
InjectParameter
An input or output parameter to a p-code injection payload.
Definition: pcodeinject.hh:33
RulePtrsubUndo::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1041
TypeOp::inherits_sign
@ inherits_sign
Operator token inherits signedness from its inputs.
Definition: typeop.hh:40
TransformManager::fd
Funcdata * fd
Function being operated on.
Definition: transform.hh:151
ParameterSymbol::resetSizeLockType
virtual void resetSizeLockType(TypeFactory *factory)
Clear this parameter's data-type preserving any size-lock.
Definition: fspec.cc:2399
WidenerFull::doWidening
virtual bool doWidening(const ValueSet &valueSet, CircleRange &range, const CircleRange &newRange)
For an iteration that isn't stabilizing attempt to widen the given ValueSet.
Definition: rangeutil.cc:1833
PrintC::bitwise_not
static OpToken bitwise_not
The bitwise negate operator.
Definition: printc.hh:71
ContextBitRange::shift
int4 shift
Right-shift amount to apply when unpacking this value from its word.
Definition: globalcontext.hh:34
ArchitectureGhidra::readStringStream
static void readStringStream(istream &s, string &res)
Receive a string from the client.
Definition: ghidra_arch.cc:88
LoadImage::adjustVma
virtual void adjustVma(long adjust)=0
Adjust load addresses with a global offset.
Heritage::loadGuard
list< LoadGuard > loadGuard
List of LOAD operations that need to be guarded.
Definition: heritage.hh:214
ActionFuncLinkOutOnly::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:680
SetAction::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:367
ProtoModel::restoreXml
virtual void restoreXml(const Element *el)
Restore this model from an XML stream.
Definition: fspec.cc:1893
PrintC::pushEquate
virtual bool pushEquate(uintb val, int4 sz, const EquateSymbol *sym, const Varnode *vn, const PcodeOp *op)
Push a constant marked up by and EquateSymbol onto the RPN stack.
Definition: printc.cc:1468
BreakTableCallBack::BreakTableCallBack
BreakTableCallBack(Translate *t)
Basic breaktable constructor.
Definition: emulate.hh:154
CircleRange::CircleRange
CircleRange(uintb lft, uintb rgt, int4 size, int4 stp)
Construct given specific boundaries.
Definition: rangeutil.cc:177
pcode_right
uintb pcode_right(uintb val, int4 sa)
Definition: address.hh:473
PcodeOp::insertInput
void insertInput(int4 slot)
Make room for a new input Varnode at a specific position.
Definition: op.cc:211
ParamTrial::testShrink
bool testShrink(const Address &newaddr, int4 sz) const
Test if this trial can be made smaller.
Definition: fspec.cc:1333
ParameterBasic::getSize
virtual int4 getSize(void) const
Get the number of bytes occupied by this parameter.
Definition: fspec.hh:975
TypeSpacebase::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:1181
VarnodeBank::uniqid
uintm uniqid
Counter for generating unique offsets.
Definition: varnode.hh:329
EmitPrettyPrint::setXML
void setXML(bool val)
Toggle whether the low-level emitter emits XML markup or not.
Definition: prettyprint.cc:1193
SubvariableFlow::ReplaceOp::opc
OpCode opc
Opcode of the new op.
Definition: subflow.hh:56
OptionCommentInstruction::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:502
PrintLanguage::parentheses
bool parentheses(const OpToken *op2)
Determine if the given token should be emitted in its own parenthetic expression.
Definition: printlanguage.cc:267
Scope::addMapSym
Symbol * addMapSym(const Element *el)
Add a mapped Symbol from a <mapsym> XML tag.
Definition: database.cc:1503
PrintC::less_equal
static OpToken less_equal
The less than or equal operator.
Definition: printc.hh:86
PrintLanguage::opIntRem
virtual void opIntRem(const PcodeOp *op)=0
Emit a INT_REM operator.
RuleHumptyDumpty::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4800
AddrSpaceManager::getSpace
AddrSpace * getSpace(int4 i) const
Get an address space via its index.
Definition: translate.hh:544
DeregisterProgram::res
int4 res
The meta-command being issued to send back.
Definition: ghidra_process.hh:124
Merge::processCopyTrims
void processCopyTrims(void)
Try to reduce/eliminate COPYs produced by the merge trimming process.
Definition: merge.cc:1265
FuncProto::getMaxOutputDelay
int4 getMaxOutputDelay(void) const
Return the maximum heritage delay across all possible return values.
Definition: fspec.hh:1370
ActionConditionalExe::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: condexe.hh:175
TypeOpIntLessEqual::TypeOpIntLessEqual
TypeOpIntLessEqual(TypeFactory *t)
Constructor.
Definition: typeop.cc:906
Heritage::StackNode
Node for depth-first traversal of stack references.
Definition: heritage.hh:179
TypeOp::name
string name
Symbol denoting this operation.
Definition: typeop.hh:48
AddrSpaceManager::stackspace
AddrSpace * stackspace
Stack space associated with processor.
Definition: translate.hh:229
Heritage::guardReturns
void guardReturns(uint4 flags, const Address &addr, int4 size, vector< Varnode * > &write)
Guard global data-flow at RETURN ops in preparation for renaming.
Definition: heritage.cc:1246
Heritage::StackNode::iter
list< PcodeOp * >::const_iterator iter
Next PcodeOp to follow.
Definition: heritage.hh:187
ActionStartTypes
Allow type recovery to start happening.
Definition: coreaction.hh:68
Architecture::parseProcessorConfig
void parseProcessorConfig(DocumentStorage &store)
Apply processor specific configuration.
Definition: architecture.cc:1063
database_ghidra.hh
Facilities for retrieving symbol information from a Ghidra client.
crc32tab
uint4 crc32tab[]
Table for quickly computing a 32-bit Cyclic Redundacy Check (CRC)
Definition: crc32.cc:20
FlowInfo::minaddr
Address minaddr
Start of actual function range.
Definition: flow.hh:96
TypeOpSegment::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1742
ActionDefaultParams::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:626
Symbol::dispflags
uint4 dispflags
Flags affecting the display of this symbol.
Definition: database.hh:165
TypeOpPtrsub::TypeOpPtrsub
TypeOpPtrsub(TypeFactory *t)
Constructor.
Definition: typeop.cc:1660
OpBehaviorIntCarry::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:307
ActionDoNothing
Remove blocks that do nothing.
Definition: coreaction.hh:490
RuleLogic2Bool::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2861
SeqNum::operator<
bool operator<(const SeqNum &op2) const
Compare two sequence numbers with their natural order.
Definition: address.hh:144
float.hh
Support for decoding different floating-point formats.
OpToken::type
tokentype type
The basic token type.
Definition: printlanguage.hh:96
BlockGraph::newBlockDoWhile
BlockDoWhile * newBlockDoWhile(FlowBlock *condcl)
Build a new BlockDoWhile.
Definition: block.cc:1767
OptionCommentIndent
How many characters to indent comment lines.
Definition: options.hh:165
EmitPrettyPrint::endReturnType
virtual void endReturnType(int4 id)
End a return type declaration.
Definition: prettyprint.cc:933
TypeOp::opcode
OpCode opcode
The op-code value.
Definition: typeop.hh:45
PrintC::opFloatLessEqual
virtual void opFloatLessEqual(const PcodeOp *op)
Emit a FLOAT_LESSEQUAL operator.
Definition: printc.hh:267
RuleThreeWayCompare::testCompareEquivalence
static int4 testCompareEquivalence(PcodeOp *lessop, PcodeOp *lessequalop)
Make sure comparisons match properly for a three-way.
Definition: ruleaction.cc:8208
EmitNoXml::print
virtual void print(const char *str, syntax_highlight hl=no_color)
Emit other (more unusual) syntax as part of source code generation.
Definition: prettyprint.hh:256
StructureGraph::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:337
Varnode::overlap
int4 overlap(const Varnode &op) const
Return relative point of overlap between two Varnodes.
Definition: varnode.cc:170
PrintLanguage::Atom::Atom
Atom(const string &nm, tagtype t, EmitXml::syntax_highlight hl, const Datatype *c, int4 off)
Construct a token for a field name.
Definition: printlanguage.hh:215
TypeFactory::typecache
Datatype * typecache[9][8]
Matrix of the most common atomic data-types.
Definition: type.hh:387
AddrSpaceManager::assignShortcut
void assignShortcut(AddrSpace *spc)
Select a shortcut character for a new space.
Definition: translate.cc:451
TransformManager::newUnique
TransformVar * newUnique(int4 size)
Make placeholder for new unique space Varnode.
Definition: transform.cc:380
ParamEntry::size
int4 size
Size of the range in bytes.
Definition: fspec.hh:68
RulePiece2Sext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:94
FlowBlock::replaceUsingMap
void replaceUsingMap(void)
Update references to other blocks using getCopyMap()
Definition: block.cc:267
LaneDescription::getBoundary
int4 getBoundary(int4 bytePos) const
Get index of lane that starts at the given byte position.
Definition: transform.cc:96
RuleZextCommute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:797
PrintJavaCapability
Factory and static initializer for the "java-language" back-end to the decompiler.
Definition: printjava.hh:28
PcodeOp::incidental_copy
@ incidental_copy
Treat this as incidental for parameter recovery algorithms.
Definition: op.hh:110
FuncProto::checkInputSplit
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
TypeOpIntLessEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:344
OptionProtoEval
Set the prototype model to use when evaluating the parameters of the current function.
Definition: options.hh:237
Architecture::parseExtraRules
void parseExtraRules(DocumentStorage &store)
Apply any Rule tags.
Definition: architecture.cc:1199
Funcdata::syncVarnodesWithSymbols
bool syncVarnodesWithSymbols(const ScopeLocal *lm, bool typesyes)
Update Varnode properties based on (new) Symbol information.
Definition: funcdata_varnode.cc:804
Heritage::merge
vector< FlowBlock * > merge
Calculate merge points (blocks containing phi-nodes)
Definition: heritage.hh:212
FuncProto::isConstructor
bool isConstructor(void) const
Is this prototype for a class constructor method.
Definition: fspec.hh:1249
RulePtrArith::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1001
RuleSubfloatConvert::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1330
RuleEarlyRemoval::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:46
IopSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: op.cc:55
RuleEqual2Constant::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:988
CPUI_FLOAT_EQUAL
@ CPUI_FLOAT_EQUAL
Floating-point comparison, equality (==)
Definition: opcodes.hh:86
ParamTrial::rem_formed
@ rem_formed
The trial is built out of a remainder operation.
Definition: fspec.hh:166
ActionOutputPrototype::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:866
Architecture::parseNoHighPtr
void parseNoHighPtr(const Element *el)
Apply memory alias configuration.
Definition: architecture.cc:1012
CommentDatabaseGhidra::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *trans)
Restore all comments from XML.
Definition: comment_ghidra.hh:50
Funcdata::printBlockTree
void printBlockTree(ostream &s) const
Print a description of control-flow structuring to a stream.
Definition: funcdata_block.cc:25
circularqueue::expand
void expand(int4 amount)
Expand the (maximum) size of the queue.
Definition: prettyprint.hh:665
Heritage::StackNode::offset
uintb offset
Offset relative to base.
Definition: heritage.hh:185
options.hh
Classes for processing architecture configuration options.
SubfloatFlow
Class for tracing changes of precision in floating point variables.
Definition: subflow.hh:150
TypeOpCallind::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:641
ActionFinalStructure::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: blockaction.hh:312
ActionMarkExplicit::OpStackElement::OpStackElement
OpStackElement(Varnode *v)
Constructor.
Definition: coreaction.cc:2651
RuleLessOne
Transform INT_LESS of 0 or 1: V < 1 => V == 0, V <= 0 => V == 0
Definition: ruleaction.hh:288
JumpBasic2::foldInOneGuard
virtual bool foldInOneGuard(Funcdata *fd, GuardRecord &guard, JumpTable *jump)
Eliminate the given guard to this switch.
Definition: jumptable.cc:1506
ValueSetSolver::partitionPrepend
static void partitionPrepend(ValueSet *vertex, Partition &part)
Prepend a vertex to a partition.
Definition: rangeutil.hh:387
PrintC::orequal
static OpToken orequal
The in-place logical or operator.
Definition: printc.hh:108
Funcdata::highlevel_on
@ highlevel_on
Set if Varnodes have HighVariables assigned.
Definition: funcdata.hh:47
ParamList::assignMap
virtual void assignMap(const vector< Datatype * > &proto, bool isinput, TypeFactory &typefactory, vector< ParameterPieces > &res) const =0
Given list of data-types, map the list positions to storage locations.
RangeHint::endpoint
@ endpoint
An (artificial) boundary to the range of bytes getting analyzed.
Definition: varmap.hh:77
TypePointer::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:431
RuleSubExtComm::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4050
ParamEntry::containedBy
bool containedBy(const Address &addr, int4 sz) const
Is this entry contained by the given range.
Definition: fspec.cc:77
OpBehaviorIntMult::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:453
TransformManager::newPiece
TransformVar * newPiece(Varnode *vn, int4 bitSize, int4 lsbOffset)
Make placeholder for piece of a Varnode.
Definition: transform.cc:422
RuleCollapseConstants::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3520
RuleNegateNegate::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1341
ParamList::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage, vector< EffectRecord > &effectlist, bool normalstack)=0
Restore the model from an XML stream.
EmulatePcodeCache
A SLEIGH based implementation of the Emulate interface.
Definition: emulate.hh:296
SubvariableFlow::PatchRecord::push_patch
@ push_patch
Convert an operator output to the logical value.
Definition: subflow.hh:71
TypeOpIntRight::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1152
CommentSorter::setupBlockList
void setupBlockList(const FlowBlock *bl)
Prepare to walk comments from a single basic block.
Definition: comment.cc:376
EmulateMemory::currentOp
PcodeOpRaw * currentOp
Current op to execute.
Definition: emulate.hh:246
RuleSborrow::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3085
ProtoParameter::operator==
bool operator==(const ProtoParameter &op2) const
Compare storage location and data-type for equality.
Definition: fspec.hh:945
BlockMultiGoto::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2690
RulePtrsubCharConstant::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1098
PrintC::boolean_not
static OpToken boolean_not
The boolean not operator.
Definition: printc.hh:72
ScopeGhidra::buildUndefinedName
virtual string buildUndefinedName(void) const
Build a formal undefined name, used internally when a Symbol is not given a name.
Definition: database_ghidra.hh:74
TYPE_SPACEBASE
@ TYPE_SPACEBASE
Placeholder for symbol/type look-up calculations.
Definition: type.hh:35
Action
Large scale transformations applied to the varnode/op graph.
Definition: action.hh:50
FlowInfo::error_reinterpreted
@ error_reinterpreted
Throw an exception for flow into previously encountered data at a difference cut.
Definition: flow.hh:62
FlowInfo
A class for generating the control-flow structure for a single function.
Definition: flow.hh:56
Funcdata::cloneOp
PcodeOp * cloneOp(const PcodeOp *op, const SeqNum &seq)
Definition: funcdata_op.cc:566
ActionDeadCode::propagateConsumed
static void propagateConsumed(vector< Varnode * > &worklist)
Propagate the consumed value for one Varnode.
Definition: coreaction.cc:3096
SubvariableFlow::ReplaceVarnode::vn
Varnode * vn
Varnode being shrunk.
Definition: subflow.hh:44
PrintC::docSingleGlobal
virtual void docSingleGlobal(const Symbol *sym)
Emit the declaration for a single (global) Symbol.
Definition: printc.cc:2240
ParamListStandard::characterizeAsParam
virtual int4 characterizeAsParam(const Address &loc, int4 size) const
Characterize whether the given range overlaps parameter storage.
Definition: fspec.cc:469
RuleOrMask::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:333
TypeOpIntSub
Information about the INT_SUB op-code.
Definition: typeop.hh:375
ParameterBasic::getType
virtual Datatype * getType(void) const
Get the data-type associate with this.
Definition: fspec.hh:973
StackEqn::compare
static bool compare(const StackEqn &a, const StackEqn &b)
Order two equations.
Definition: coreaction.cc:52
Action::flags
uint4 flags
Behavior properties.
Definition: action.hh:82
TokenSplit::stopIndent
void stopIndent(int4 id)
Create an "end an indent level" command.
Definition: prettyprint.hh:555
ConditionMarker::bool3vn
Varnode * bool3vn
If the second param to binaryop is defined by BOOL_NEGATE, this is the unnegated Varnode.
Definition: condexe.hh:38
PrintLanguage::emitFunctionDeclaration
virtual void emitFunctionDeclaration(const Funcdata *fd)=0
Emit a function declaration.
Symbol::force_char
@ force_char
Force integer to be printed as a character constant.
Definition: database.hh:181
CPoolRecord::is_destructor
@ is_destructor
Referenced method is a destructor.
Definition: cpool.hh:60
StackSolver::spacebase
Address spacebase
Starting address of the stack-pointer.
Definition: coreaction.cc:35
AddrSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: space.cc:285
JumpModelTrivial::foldInNormalization
virtual Varnode * foldInNormalization(Funcdata *fd, PcodeOp *indop)
Do normalization of the given switch specific to this model.
Definition: jumptable.hh:332
Symbol::wholeCount
uint4 wholeCount
Number of SymbolEntries that map to the whole Symbol.
Definition: database.hh:170
ScopeInternal::addDynamicMapInternal
virtual SymbolEntry * addDynamicMapInternal(Symbol *sym, uint4 exfl, uint8 hash, int4 off, int4 sz, const RangeList &uselim)
Create a new SymbolEntry for a Symbol given a dynamic hash.
Definition: database.cc:1761
RuleLoadVarnode::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:716
PrintLanguage::opConstructor
virtual void opConstructor(const PcodeOp *op, bool withNew)=0
Emit an operator constructing an object.
FuncCallSpecs
A class for analyzing parameters to a sub-function call.
Definition: fspec.hh:1436
zero_extend
void zero_extend(intb &val, int4 bit)
Clear all bits above given bit.
Definition: address.cc:639
CastStrategyC::isSubpieceCast
virtual bool isSubpieceCast(Datatype *outtype, Datatype *intype, uint4 offset) const
Is truncating an input data-type, producing an output data-type, considered a cast.
Definition: cast.cc:306
PriorityQueue::reset
void reset(int4 maxdepth)
Reset to an empty queue.
Definition: heritage.cc:97
ScopeLocal::markNotMapped
void markNotMapped(AddrSpace *spc, uintb first, int4 sz, bool param)
Mark a specific address range is not mapped.
Definition: varmap.cc:354
ActionSpacebase
Mark Varnode objects that hold stack-pointer values and set-up special data-type.
Definition: coreaction.hh:264
MemoryBank::setPage
virtual void setPage(uintb addr, const uint1 *val, int4 skip, int4 size)
Write data into a memory page.
Definition: memstate.cc:134
RuleSplitFlow::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1256
EmitPrettyPrint::maxlinesize
int4 maxlinesize
Maximum number of characters allowed in a line.
Definition: prettyprint.hh:707
PrintC::opIntAnd
virtual void opIntAnd(const PcodeOp *op)
Emit a INT_AND operator.
Definition: printc.hh:250
RuleDoubleLoad::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: double.cc:2942
Scope::stackExternalRef
static const Scope * stackExternalRef(const Scope *scope1, const Scope *scope2, const Address &addr, ExternRefSymbol **addrmatch)
Definition: database.cc:972
FlowBlock::f_loop_edge
@ f_loop_edge
Edge completes a loop, removing these edges gives you a DAG.
Definition: block.hh:97
MapState::gatherOpen
void gatherOpen(const Funcdata &fd)
Add pointer references as hints to the collection.
Definition: varmap.cc:940
RuleShiftPiece::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:612
JumpAssisted::assistOp
PcodeOp * assistOp
The jumpassist PcodeOp.
Definition: jumptable.hh:473
Override::applyDeadCodeDelay
void applyDeadCodeDelay(Funcdata &data) const
Apply any dead-code delay overrides.
Definition: override.cc:207
JumpBasicOverride::hash
uint8 hash
if (hash==0) there is no normalized switch (use trivial model)
Definition: jumptable.hh:431
DynamicHash::findVarnode
Varnode * findVarnode(const Funcdata *fd, const Address &addr, uint8 h)
Given an address and hash, find the unique matching Varnode.
Definition: dynamic.cc:396
LoopBody::extendToContainer
void extendToContainer(const LoopBody &container, vector< FlowBlock * > &body) const
Find blocks in containing loop that aren't in this.
Definition: blockaction.cc:44
RuleSubExtComm
Commute SUBPIECE and INT_ZEXT: sub(zext(V),c) => zext(sub(V,c))
Definition: ruleaction.hh:743
LoadImage::load
uint1 * load(int4 size, const Address &addr)
Load a chunk of image.
Definition: loadimage.cc:27
Varnode::loneDescend
PcodeOp * loneDescend(void) const
Return unique reading PcodeOp, or null if there are zero or more than 1.
Definition: varnode.cc:569
RuleAndCompare::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:341
ValueSet::leftIsStable
bool leftIsStable
Set to true if left boundary of range didn't change (last iteration)
Definition: rangeutil.hh:133
MemoryState::trans
Translate * trans
Architecture information about memory spaces.
Definition: memstate.hh:150
PcodeOp::modified
@ modified
This op has been modified by the current action.
Definition: op.hh:108
TypeOpIntSless::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:320
Cover::intersectList
void intersectList(vector< int4 > &listout, const Cover &op2, int4 level) const
Generate a list of blocks that intersect.
Definition: cover.cc:305
ActionDatabase
Database of root Action objects that can be used to transform a function.
Definition: action.hh:294
AliasChecker::calculated
bool calculated
Have aliases been calculated.
Definition: varmap.hh:121
RuleLessOne::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:291
RuleZextSless::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2563
RuleEquality::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:680
CommentDatabaseInternal::CommentDatabaseInternal
CommentDatabaseInternal(void)
Constructor.
Definition: comment.cc:131
Funcdata::opInsertInput
void opInsertInput(PcodeOp *op, Varnode *vn, int4 slot)
Insert a new Varnode into the operand list for the given PcodeOp.
Definition: funcdata_op.cc:281
AliasChecker::localBoundary
uintb localBoundary
Boundary offset separating locals and parameters.
Definition: varmap.hh:123
FuncProto::is_constructor
@ is_constructor
Function is an (object-oriented) constructor.
Definition: fspec.hh:1159
PcodeOp::getCseHash
uintm getCseHash(void) const
Return hash indicating possibility of common subexpression elimination.
Definition: op.cc:131
BlockCondition::flipInPlaceTest
virtual int4 flipInPlaceTest(vector< PcodeOp * > &fliplist) const
Test normalizing the conditional branch in this.
Definition: block.cc:2756
partmap::iterator
maptype::iterator iterator
A partmap iterator is an iterator into the map.
Definition: partmap.hh:51
ContextGhidra::saveXml
virtual void saveXml(ostream &s) const
Serialize the entire database to an XML stream.
Definition: ghidra_context.hh:66
FuncProto::getPieces
void getPieces(PrototypePieces &pieces) const
Get the raw pieces of the prototype.
Definition: fspec.cc:3006
RuleTransformCpool::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3561
BreakTableCallBack::trans
Translate * trans
The translator.
Definition: emulate.hh:139
CommentSorter::Subsort::setBlock
void setBlock(int4 i, uint4 ord)
Initialize a key for a basic block position.
Definition: comment.hh:226
BlockGraph::getStartBlock
FlowBlock * getStartBlock(void) const
Get the entry point FlowBlock.
Definition: block.cc:1549
TypeOpIntLess::TypeOpIntLess
TypeOpIntLess(TypeFactory *t)
Constructor.
Definition: typeop.cc:888
Funcdata::newOpBefore
PcodeOp * newOpBefore(PcodeOp *follow, OpCode opc, Varnode *in1, Varnode *in2, Varnode *in3=(Varnode *) 0)
Allocate a new PcodeOp with sequence number.
Definition: funcdata_op.cc:606
PrintLanguage::adjustTypeOperators
virtual void adjustTypeOperators(void)=0
Set basic data-type information for p-code operators.
RuleDumptyHump::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4853
RuleNotDistribute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1184
PrintC::opBoolOr
virtual void opBoolOr(const PcodeOp *op)
Emit a BOOL_OR operator.
Definition: printc.hh:263
Cover::intersectByBlock
int4 intersectByBlock(int4 blk, const Cover &op2) const
Characterize the intersection on a specific block.
Definition: cover.cc:342
BlockSwitch::getLabel
uintb getLabel(int4 i, int4 j) const
Get a specific label associated with a case block.
Definition: block.hh:665
PrintC::opIntEqual
virtual void opIntEqual(const PcodeOp *op)
Emit a INT_EQUAL operator.
Definition: printc.hh:234
ContextBitRange
Description of a context variable within the disassembly context blob.
Definition: globalcontext.hh:30
RuleSubCommute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4091
RuleDoubleArithShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:371
JumpValuesRangeDefault::extravalue
uintb extravalue
The extra value.
Definition: jumptable.hh:204
BlockSwitch::CaseOrder::depth
int4 depth
How deep in a fall-thru chain we are.
Definition: block.hh:637
PcodeEmit::unpackVarnodeData
static const uint1 * unpackVarnodeData(const uint1 *ptr, VarnodeData &v, const AddrSpaceManager *trans)
Helper function for unpacking a varnode from a pcode byte stream.
Definition: translate.cc:946
TypeFactory::getTypePointerNoDepth
TypePointer * getTypePointerNoDepth(int4 s, Datatype *pt, uint4 ws)
Construct a depth limited pointer data-type.
Definition: type.cc:1786
EmulateSnippet::setCurrentOp
void setCurrentOp(int4 i)
Set the current executing p-code op by index.
Definition: emulateutil.hh:163
BlockCondition::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:2819
rangemap::tree
std::multiset< AddrRange > tree
The underlying multiset of sub-ranges.
Definition: rangemap.hh:128
Architecture::defaultReturnAddr
VarnodeData defaultReturnAddr
Default storage location of return address (for current function)
Definition: architecture.hh:139
ProtoModel::hasEffect
uint4 hasEffect(const Address &addr, int4 size) const
Determine side-effect of this on the given memory range.
Definition: fspec.cc:1885
DatatypeCompare
Compare two Datatype pointers for equivalence of their description.
Definition: type.hh:132
EmitNoXml::tagField
virtual void tagField(const char *ptr, syntax_highlight hl, const Datatype *ct, int4 off)
Emit an identifier for a field within a structured data-type.
Definition: prettyprint.hh:248
CastStrategyC::checkIntPromotionForCompare
virtual bool checkIntPromotionForCompare(const PcodeOp *op, int4 slot) const
Check if integer promotion forces a cast for the given comparison op and slot.
Definition: cast.cc:28
PrintLanguage::opFloatLessEqual
virtual void opFloatLessEqual(const PcodeOp *op)=0
Emit a FLOAT_LESSEQUAL operator.
GhidraCapability
Registration point and dispatcher for commands sent to the decompiler.
Definition: ghidra_process.hh:38
DataUnavailError
Exception indicating data was not available.
Definition: loadimage.hh:29
RuleOrPredicate::MultiPredicate::condBlock
const FlowBlock * condBlock
Conditional block determining if zero is set or not.
Definition: condexe.hh:217
RulePtrFlow::trialSetPtrFlow
bool trialSetPtrFlow(PcodeOp *op)
Definition: ruleaction.cc:7412
TraceDAG::BranchPoint::depth
int4 depth
Depth of BranchPoints from the root.
Definition: blockaction.hh:105
ActionInferTypes::propagateRef
static void propagateRef(Funcdata &data, Varnode *vn, const Address &addr)
Try to propagate a pointer data-type to known aliases.
Definition: coreaction.cc:4460
ScopeGhidra::cacheDirty
bool cacheDirty
Is flagbaseDefault different from cache.
Definition: database_ghidra.hh:41
Widener
Class holding a particular widening strategy for the ValueSetSolver iteration algorithm.
Definition: rangeutil.hh:202
RuleSubExtComm::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:746
ScopeInternal::findClosestFit
virtual SymbolEntry * findClosestFit(const Address &addr, int4 size, const Address &usepoint) const
Find Symbol which is the closest fit to the given memory range.
Definition: database.cc:2147
InjectedUserOp::restoreXml
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.cc:19
ToOpEdge::slot
int4 slot
Slot containing the input Varnode or -1 for the p-code op output.
Definition: dynamic.hh:32
Emulate::executeUnary
virtual void executeUnary(void)=0
Execute a unary arithmetic/logical operation.
PathMeld::RootedOp::op
PcodeOp * op
An op in the container.
Definition: jumptable.hh:69
OpBehaviorIntAnd::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:367
ScopeGhidra::renameSymbol
virtual void renameSymbol(Symbol *sym, const string &newname)
Rename a Symbol within this Scope.
Definition: database_ghidra.hh:106
ConstantPool::putRecord
void putRecord(const vector< uintb > &refs, uint4 tag, const string &tok, Datatype *ct)
A a new constant pool record to this database.
Definition: cpool.cc:157
Partition::isDirty
bool isDirty
Set to true if a node in this component has changed this iteration.
Definition: rangeutil.hh:163
PcodeInjectLibraryGhidra::inst
vector< OpBehavior * > inst
Collected behaviors for the ExecutablePcode payloads.
Definition: inject_ghidra.hh:82
RuleEquality::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:204
functionalEquality
bool functionalEquality(Varnode *vn1, Varnode *vn2)
Determine if two Varnodes hold the same value.
Definition: op.cc:1059
TransformManager::removeOld
void removeOld(void)
Remove old preexisting PcodeOps and Varnodes that are now obsolete.
Definition: transform.cc:697
PropagationState::vn
Varnode * vn
The root Varnode.
Definition: coreaction.hh:1027
FlowBlock::f_interior_gotoout
@ f_interior_gotoout
The block has an unstructured jump out of interior.
Definition: block.hh:84
RuleThreeWayCompare::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:8385
EmulatePcodeCache::clearCache
void clearCache(void)
Clear the p-code cache.
Definition: emulate.cc:339
ContextDatabase::saveXml
virtual void saveXml(ostream &s) const =0
Serialize the entire database to an XML stream.
TraceDAG::BranchPoint::top
FlowBlock * top
FlowBlock that embodies the branch point.
Definition: blockaction.hh:103
ScopeGhidra::findOverlap
virtual SymbolEntry * findOverlap(const Address &addr, int4 size) const
Find first Symbol overlapping the given memory range.
Definition: database_ghidra.hh:90
PrintLanguage::opBranchind
virtual void opBranchind(const PcodeOp *op)=0
Emit a BRANCHIND operator.
JavaError
Exception that mirrors exceptions thrown by the Ghidra client.
Definition: ghidra_arch.hh:33
ScopeLocal::rangeLocked
bool rangeLocked
True if the subset of addresses mapped to this scope has been locked.
Definition: varmap.hh:188
PcodeInjectLibrary::getCachedContext
virtual InjectContext & getCachedContext(void)=0
Retrieve a reusable context object for this library.
XmlArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const
Determine if this extension can handle this file.
Definition: xml_arch.cc:33
CommentSet
set< Comment *, CommentOrder > CommentSet
A set of comments sorted by function and address.
Definition: comment.hh:76
PrintC::pushTypeEnd
virtual void pushTypeEnd(const Datatype *ct)
Push the tail ends of a data-type declaration onto the RPN stack.
Definition: printc.cc:228
FuncCallSpecs::compareByEntryAddress
static bool compareByEntryAddress(const FuncCallSpecs *a, const FuncCallSpecs *b)
Compare FuncCallSpecs by function entry address.
Definition: fspec.hh:1527
ActionDefaultParams
Find a prototype for each sub-function.
Definition: coreaction.hh:623
TransformManager::opSetInput
void opSetInput(TransformOp *rop, TransformVar *rvn, int4 slot)
Mark given variable as input to given op.
Definition: transform.hh:213
ActionMapGlobals::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:845
Element
An XML element. A node in the DOM tree.
Definition: xml.hh:150
OptionSetLanguage::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:721
OpBehaviorBoolXor::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:513
ActionDeadCode::gatherConsumedReturn
static uintb gatherConsumedReturn(Funcdata &data)
Determine how the return values for the given function are consumed.
Definition: coreaction.cc:3384
EmitPrettyPrint::checkstring
void checkstring(void)
Enforce whitespace for a content token.
Definition: prettyprint.cc:807
DeregisterProgram::sendResult
virtual void sendResult(void)
Send results of the command (if any) back to the Ghidra client.
Definition: ghidra_process.cc:231
PrintLanguage::Atom::Atom
Atom(const string &nm, tagtype t, EmitXml::syntax_highlight hl, const PcodeOp *o)
Construct a token with an associated PcodeOp.
Definition: printlanguage.hh:219
SymbolEntry::EntrySubsort::useoffset
uintb useoffset
Offset into the sub-sorting address space.
Definition: database.hh:86
RuleIdentityEl::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3342
SegmentOp::unify
virtual bool unify(Funcdata &data, PcodeOp *op, vector< Varnode * > &bindlist) const
Gather the formal input Varnode objects given the root PcodeOp.
Definition: userop.cc:127
FuncCallSpecs::deindirect
void deindirect(Funcdata &data, Funcdata *newfd)
Convert this call site from an indirect to a direct function call.
Definition: fspec.cc:4476
ContextInternal::size
int4 size
Number of words in a context blob (for this architecture)
Definition: globalcontext.hh:273
GhidraCommand::sin
istream & sin
The input stream from the Ghidra client.
Definition: ghidra_process.hh:73
ScopeInternal::addSymbolInternal
virtual void addSymbolInternal(Symbol *sym)
Put a Symbol into the name map.
Definition: database.cc:1699
LoopBody::labelExitEdges
void labelExitEdges(const vector< FlowBlock * > &body)
Label edges that exit the loop.
Definition: blockaction.cc:263
RuleSegment::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1223
RulePtrArith::transformPtr
static int4 transformPtr(PcodeOp *bottom_op, PcodeOp *ptr_op, int4 slot, Funcdata &data)
Rewrite a pointer expression using PTRSUB and PTRADD.
Definition: ruleaction.cc:5757
CoverBlock::boundary
int4 boundary(const PcodeOp *point) const
Characterize given point as boundary.
Definition: cover.cc:127
GuardRecord::quasiCopy
static Varnode * quasiCopy(Varnode *vn, int4 &bitsPreserved)
Compute the source of a quasi-COPY chain for the given Varnode.
Definition: jumptable.cc:675
SegmentedResolver::glb
Architecture * glb
The architecture owning the segmented space.
Definition: architecture.hh:283
RuleEqual2Zero
Simplify INT_EQUAL applied to 0: 0 == V + W * -1 => V == W or 0 == V + c => V == -c
Definition: ruleaction.hh:975
EmulatePcodeCache::createInstruction
void createInstruction(const Address &addr)
Cache pcode for instruction at given address.
Definition: emulate.cc:364
ScopeMapper::NullSubsort
Helper class for not doing any sub-sorting of overlapping ScopeMapper ranges.
Definition: database.hh:798
Database::clearUnlocked
void clearUnlocked(Scope *scope)
Clear unlocked Symbols owned by the given Scope.
Definition: database.cc:2843
TypeOpFloatSub
Information about the FLOAT_SUB op-code.
Definition: typeop.hh:601
ValueSet::range
CircleRange range
Range of values or offsets in this set.
Definition: rangeutil.hh:136
ContextBitRange::endbit
int4 endbit
Ending bit of the value within its word.
Definition: globalcontext.hh:33
Rule::flags
uint4 flags
Properties enabled with this Rule.
Definition: action.hh:203
RuleMultiCollapse::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2952
PrintLanguage::Atom::Atom
Atom(const string &nm, tagtype t, EmitXml::syntax_highlight hl, const PcodeOp *o, const Funcdata *f)
Construct a token for a function name.
Definition: printlanguage.hh:227
PrintC::pushTypeStart
virtual void pushTypeStart(const Datatype *ct, bool noident)
Push part of a data-type declaration onto the RPN stack, up to the identifier.
Definition: printc.cc:179
PrintC::bitwise_and
static OpToken bitwise_and
The logical and operator.
Definition: printc.hh:91
OptionDatabase::parseOne
void parseOne(const Element *el)
Unwrap and execute a single option XML tag.
Definition: options.cc:111
CPUI_FLOAT_SQRT
@ CPUI_FLOAT_SQRT
Floating-point square root (sqrt)
Definition: opcodes.hh:99
OpBehaviorIntCarry
CPUI_INT_CARRY behavior.
Definition: opbehavior.hh:205
Rule::issueWarning
void issueWarning(Architecture *glb)
If enabled, print a warning that this Rule has been applied.
Definition: action.cc:621
ActionPrototypeTypes::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:611
Varnode::addlflags
uint2 addlflags
Additional flags.
Definition: varnode.hh:127
CollapseStructure::ruleBlockIfNoExit
bool ruleBlockIfNoExit(FlowBlock *bl)
Attempt to apply BlockIf where the body does not exit.
Definition: blockaction.cc:1461
JumpValuesRangeDefault::clone
virtual JumpValues * clone(void) const
Clone this iterator.
Definition: jumptable.cc:368
Translate::setBigEndian
void setBigEndian(bool val)
Set general endianness to big if val is true.
Definition: translate.hh:552
Merge::mergeByDatatype
void mergeByDatatype(VarnodeLocSet::const_iterator startiter, VarnodeLocSet::const_iterator enditer)
Try to merge all HighVariables in the given range that have the same data-type.
Definition: merge.cc:298
minimalmask
uintb minimalmask(uintb val)
Calculate smallest mask that covers the given value.
Definition: address.hh:493
Scope::removeSymbolMappings
virtual void removeSymbolMappings(Symbol *symbol)=0
Remove all SymbolEntrys from the given Symbol.
BlockBasic
A basic block for p-code operations.
Definition: block.hh:363
TypeFactory::getTypeVoid
TypeVoid * getTypeVoid(void)
Get the "void" data-type.
Definition: type.cc:1623
BlockBasic::unblockedMulti
bool unblockedMulti(int4 outslot) const
Check if this block can be removed without introducing inconsistencies.
Definition: block.cc:2427
TypeArray::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:453
Varnode::typelock
@ typelock
The Dataype of the Varnode is locked.
Definition: varnode.hh:82
FloatFormat::floatclass
floatclass
The various classes of floating-point encodings.
Definition: float.hh:33
FloatFormat::opDiv
uintb opDiv(uintb a, uintb b) const
Division (/)
Definition: float.cc:427
ScopeGhidra::createNewScope
Scope * createNewScope(const string &nm, Scope *par) const
Create a global namespace Scope.
Definition: database_ghidra.cc:40
Symbol::Symbol
Symbol(Scope *sc, const string &nm, Datatype *ct)
Construct given a name and data-type.
Definition: database.hh:187
FloatFormat::opEqual
uintb opEqual(uintb a, uintb b) const
Equality comparison (==)
Definition: float.cc:352
PcodeOp::opcode
TypeOp * opcode
Pointer to class providing behavioral details of the operation.
Definition: op.hh:113
ParamTrial::condexe_effect
@ condexe_effect
This trial may be affected by conditional execution.
Definition: fspec.hh:168
rangemap::subsorttype
_recordtype::subsorttype subsorttype
The data-type used for subsorting.
Definition: rangemap.hh:68
CPUI_CALLIND
@ CPUI_CALLIND
Call through an indirect address.
Definition: opcodes.hh:45
PrintC::opSegmentOp
virtual void opSegmentOp(const PcodeOp *op)
Definition: printc.cc:857
ActionDatabase::getGroup
const ActionGroupList & getGroup(const string &grp) const
Get a specific grouplist by name.
Definition: action.cc:967
HighVariable::coverdirty
@ coverdirty
The cover for the HighVariable is dirty.
Definition: variable.hh:49
RuleSLess2Zero::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5357
ParamTrial::indcreate_formed
@ indcreate_formed
The trial is built out of an indirect creation.
Definition: fspec.hh:167
ValueSetRead::op
PcodeOp * op
The PcodeOp at the point of the value set read.
Definition: rangeutil.hh:180
PrintLanguageCapability::isdefault
bool isdefault
Set to true to treat this as the default language.
Definition: printlanguage.hh:43
ProtoParameter::getSymbol
virtual Symbol * getSymbol(void) const =0
Retrieve the formal Symbol associated with this parameter.
Architecture::buildCommentDB
virtual void buildCommentDB(DocumentStorage &store)
Build the comment database.
Definition: architecture.cc:577
FloatFormat::extractExpSig
static floatclass extractExpSig(double x, bool *sgn, uintb *signif, int4 *exp)
Extract the sign, fractional, and exponent from a given floating-point value.
Definition: float.cc:102
TypeEnum::masklist
vector< uintb > masklist
Masks for each bitfield within the enum.
Definition: type.hh:281
OptionSetLanguage
Set the current language emitted by the decompiler.
Definition: options.hh:243
CollapseStructure::ruleBlockIfElse
bool ruleBlockIfElse(FlowBlock *bl)
Attempt to apply a 3 component form of BlockIf.
Definition: blockaction.cc:1396
PrintC::emitBlockLs
virtual void emitBlockLs(const BlockList *bl)
Emit a sequence of blocks.
Definition: printc.cc:2394
BlockIf::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:2893
Address::getSpaceFromConst
static AddrSpace * getSpaceFromConst(const Address &addr)
Recover an encoded address space from an address.
Definition: address.hh:452
TypeOpCbranch
Information about the CBRANCH op-code.
Definition: typeop.hh:244
ConditionalExecution::directsplit
bool directsplit
True if this the direct split variation.
Definition: condexe.hh:143
PrintC::opFloatNeg
virtual void opFloatNeg(const PcodeOp *op)
Emit a FLOAT_NEG operator.
Definition: printc.hh:273
FloatFormat::setFractionalCode
uintb setFractionalCode(uintb x, uintb code) const
Set the fractional part of an encoded value.
Definition: float.cc:157
SplitFlow::doTrace
bool doTrace(void)
Trace split through data-flow, constructing transform.
Definition: subflow.cc:1696
JumpTable::JumpTable
JumpTable(Architecture *g, Address ad=Address())
Constructor.
Definition: jumptable.cc:2206
TransformOp::indirect_creation_possible_out
@ indirect_creation_possible_out
Mark op as indirect creation and possible call output.
Definition: transform.hh:70
Datatype::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:228
ParamList::possibleParam
virtual bool possibleParam(const Address &loc, int4 size) const =0
Does the given storage location make sense as a parameter.
Architecture::addSpacebase
void addSpacebase(AddrSpace *basespace, const string &nm, const VarnodeData &ptrdata, int4 truncSize, bool isreversejustified, bool stackGrowth)
Create a new space and associated pointer.
Definition: architecture.cc:480
PrintC::pushPtrCharConstant
virtual bool pushPtrCharConstant(uintb val, const TypePointer *ct, const Varnode *vn, const PcodeOp *op)
Attempt to push a quoted string representing a given constant pointer onto the RPN stack.
Definition: printc.cc:1357
ScopeInternal::restorePathXml
static void restorePathXml(vector< string > &vec, const Element *el)
Restore path from <val> tags.
Definition: database.cc:2488
TransformVar::type
uint4 type
Type of new Varnode.
Definition: transform.hh:47
ScopeGhidra::findExternalRef
virtual ExternRefSymbol * findExternalRef(const Address &addr) const
Find an external reference at the given address.
Definition: database_ghidra.cc:305
RuleConditionalMove::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7927
RuleTrivialArith::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2352
ContextGhidra::getContext
virtual const uintm * getContext(const Address &addr, uintb &first, uintb &last) const
Get the context blob of values associated with a given address and its bounding offsets.
Definition: ghidra_context.hh:62
PrintLanguage::opNewOp
virtual void opNewOp(const PcodeOp *op)=0
Emit a NEW operator.
PriorityQueue
Priority queue for the phi-node (MULTIEQUAL) placement algorithm.
Definition: heritage.hh:64
PcodeOp::isCallOrBranch
bool isCallOrBranch(void) const
Return true if this op is a call or branch.
Definition: op.hh:176
TokenSplit::end
@ end
A token that ends a printing group.
Definition: prettyprint.hh:283
JumpBasic::analyzeGuards
void analyzeGuards(BlockBasic *bl, int4 pathout)
Analyze CBRANCHs leading up to the given basic-block as a potential switch guard.
Definition: jumptable.cc:1004
BlockBasic::noInterveningStatement
static bool noInterveningStatement(PcodeOp *first, int4 path, PcodeOp *last)
Check if there is meaningful activity between two branch instructions.
Definition: block.cc:2585
BlockSwitch::addCase
void addCase(FlowBlock *switchbl, FlowBlock *bl, uint4 gt)
Add a new case to this switch.
Definition: block.cc:3024
Funcdata::setVarnodeProperties
void setVarnodeProperties(Varnode *vn) const
Look-up boolean properties and data-type information.
Definition: funcdata_varnode.cc:23
SegmentedResolver::resolve
virtual Address resolve(uintb val, int4 sz, const Address &point, uintb &fullEncoding)
Virtual destructor
Definition: architecture.cc:1255
FlowBlock::numdesc
int4 numdesc
Number of descendants of this block in spanning tree (+1)
Definition: block.hh:113
Heritage::heritage_flags
heritage_flags
Extra boolean properties on basic blocks for the Augmented Dominator Tree.
Definition: heritage.hh:172
ActionNormalizeBranches::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: blockaction.hh:272
Action::breakflags
breakflags
Break points associated with an Action.
Definition: action.hh:71
TypeOpIntSext::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:966
ConditionalExecution::camethruposta_slot
int4 camethruposta_slot
init or pre slot to use, for data-flow thru post
Definition: condexe.hh:139
RuleDoubleIn::reset
virtual void reset(Funcdata &data)
Reset this Rule.
Definition: double.cc:2859
JumpTable::IndexPair
An address table index and its corresponding out-edge.
Definition: jumptable.hh:501
Scope::addSymbol
virtual SymbolEntry * addSymbol(const string &name, Datatype *ct, const Address &addr, const Address &usepoint)
Add a new Symbol to this Scope, given a name, data-type, and a single mapping.
Definition: database.cc:1471
VarnodeBank::def_tree
VarnodeDefSet def_tree
Varnodes sorted by def then location.
Definition: varnode.hh:332
PcodeInjectLibraryGhidra::registerInject
virtual void registerInject(int4 injectid)
Finalize a payload within the library, once the payload is initialized.
Definition: inject_ghidra.cc:174
ParamActive::maxpass
int4 maxpass
Number of passes before we assume we have seen all params.
Definition: fspec.hh:228
ConditionMarker::andOrComplement
bool andOrComplement(PcodeOp *bin1op, PcodeOp *bin2op)
Check if given p-code ops are complements where one is an BOOL_AND and the other is an BOOL_OR.
Definition: condexe.cc:262
Heritage::splitJoinLevel
void splitJoinLevel(vector< Varnode * > &lastcombo, vector< Varnode * > &nextlev, JoinRecord *joinrec)
Perform one level of Varnode splitting to match a JoinRecord.
Definition: heritage.cc:1638
SubvariableFlow::ReplaceVarnode
Placeholder node for Varnode holding a smaller logical value.
Definition: subflow.hh:42
MemoryHashOverlay::collideskip
uintb collideskip
How many slots to skip after a hashtable collision.
Definition: memstate.hh:131
ProtoParameter::getType
virtual Datatype * getType(void) const =0
Get the data-type associate with this.
SeqNum::operator==
bool operator==(const SeqNum &op2) const
Compare two sequence numbers for equality.
Definition: address.hh:138
Datatype::typeOrderBool
int4 typeOrderBool(const Datatype &op) const
Order this with -op-, treating bool data-type as special.
Definition: type.hh:457
ScopeLocal::addRecommendName
void addRecommendName(Symbol *sym)
Convert the given symbol to a name recommendation.
Definition: varmap.cc:1295
RuleConditionalMove::BoolExpress::opc
OpCode opc
OpCode constructing the boolean value.
Definition: ruleaction.hh:1353
InjectContext::baseaddr
Address baseaddr
Address of instruction causing inject.
Definition: pcodeinject.hh:59
TypeOpCall
Information about the CALL op-code.
Definition: typeop.hh:261
RuleAndMask::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:353
LaneDivide::WorkNode
Description of a large Varnode that needs to be traced (in the worklist)
Definition: subflow.hh:167
Funcdata::getCallSpecs
FuncCallSpecs * getCallSpecs(const PcodeOp *op) const
Get the call specification associated with a CALL op.
Definition: funcdata.cc:406
SymbolEntry::EntryInitData
Initialization data for a SymbolEntry to facilitate a rangemap.
Definition: database.hh:67
a_v_u
void a_v_u(ostream &s, const string &attr, uintb val)
Output the given unsigned integer as an XML attribute value.
Definition: xml.hh:354
RuleNotDistribute
Distribute BOOL_NEGATE: !(V && W) => !V || !W
Definition: ruleaction.hh:258
RuleConditionalMove::BoolExpress
Class for categorizing and rebuilding a boolean expression.
Definition: ruleaction.hh:1351
ArchitectureGhidra::tspecxml
string tspecxml
Stripped down .sla file passed from Ghidra.
Definition: ghidra_arch.hh:66
TokenSplit::endReturnType
void endReturnType(int4 id)
Create an "end return type declaration" command.
Definition: prettyprint.hh:396
RuleDivOpt::calcDivisor
static uintb calcDivisor(uintb n, uint8 y, int4 xsize)
Calculate the divisor.
Definition: ruleaction.cc:6857
FlowInfo::findUnprocessed
void findUnprocessed(void)
Add any remaining un-followed addresses to the unprocessed list.
Definition: flow.cc:823
PrintLanguage::Atom::op
const PcodeOp * op
A p-code operation associated with the token.
Definition: printlanguage.hh:198
LessConstForm
Definition: double.hh:210
CPUI_BOOL_NEGATE
@ CPUI_BOOL_NEGATE
Boolean negate (!)
Definition: opcodes.hh:79
TypeFactory::restoreXmlCoreTypes
void restoreXmlCoreTypes(const Element *el)
Initialize basic type names.
Definition: type.cc:2202
ValueSetSolver::newValueSet
void newValueSet(Varnode *vn, int4 tCode)
Allocate storage for a new ValueSet.
Definition: rangeutil.cc:1939
OptionIgnoreUnimplemented::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:603
Funcdata::blocks_unreachable
@ blocks_unreachable
Set if at least one basic block is currently unreachable.
Definition: funcdata.hh:49
ScopeGhidra::findAddr
virtual SymbolEntry * findAddr(const Address &addr, const Address &usepoint) const
Find a Symbol at a given address and usepoint.
Definition: database_ghidra.cc:264
Address::base
AddrSpace * base
Pointer to our address space.
Definition: address.hh:48
Funcdata::obank
PcodeOpBank obank
Container of PcodeOp objects for this function.
Definition: funcdata.hh:77
ActionInferTypes::propagateOneType
static void propagateOneType(TypeFactory *typegrp, Varnode *vn)
Propagate a data-type starting from one Varnode across the function.
Definition: coreaction.cc:4424
JumpAssisted::foldInGuards
virtual bool foldInGuards(Funcdata *fd, JumpTable *jump)
Eliminate any guard code involved in computing the switch destination.
Definition: jumptable.cc:2066
CommentSorter::start
map< Subsort, Comment * >::const_iterator start
Iterator to current comment being walked.
Definition: comment.hh:232
ConditionalExecution::init2a_true
bool init2a_true
Does true branch (in terms of iblock) go to path pre a.
Definition: condexe.hh:137
SpacebaseSpace::numSpacebase
virtual int4 numSpacebase(void) const
Number of base registers associated with this space.
Definition: translate.cc:83
PrintLanguage::opFloatLess
virtual void opFloatLess(const PcodeOp *op)=0
Emit a FLOAT_LESS operator.
SleighBase::getRegister
virtual const VarnodeData & getRegister(const string &nm) const
Get a register as VarnodeData given its name.
Definition: sleighbase.cc:92
ScoreProtoModel::PEntry::size
int4 size
Definition: fspec.hh:849
TypeOpFloatLessEqual
Information about the FLOAT_LESSEQUAL op-code.
Definition: typeop.hh:566
BlockVarnode::set
void set(Varnode *v)
Set this as representing the given Varnode.
Definition: merge.cc:22
TreeHandler::startPrefixMapping
virtual void startPrefixMapping(const string &prefix, const string &uri)
Start a new prefix to namespace URI mapping.
Definition: xml.hh:227
RuleLoadVarnode::checkSpacebase
static AddrSpace * checkSpacebase(Architecture *glb, PcodeOp *op, uintb &offoff)
Check if STORE or LOAD is off of a spacebase + constant.
Definition: ruleaction.cc:3897
ContextDatabase::setVariableDefault
void setVariableDefault(const string &nm, uintm val)
Provide a default value for a context variable.
Definition: globalcontext.cc:109
SubvariableFlow::createCompareBridge
bool createCompareBridge(PcodeOp *op, ReplaceVarnode *inrvn, int4 slot, Varnode *othervn)
Extend the logical subgraph through a given comparison operator if possible.
Definition: subflow.cc:977
ContextInternal::getRegionToChangePoint
virtual void getRegionToChangePoint(vector< uintm * > &res, const Address &addr, int4 num, uintm mask)
Grab the context blob(s) starting at the given address up to the first point of change.
Definition: globalcontext.cc:458
Action::status_actionbreak
@ status_actionbreak
Completed full action last time but indicated action break.
Definition: action.hh:68
FuncCallSpecs::isoutputactive
bool isoutputactive
Are we actively trying to recover output parameters.
Definition: fspec.hh:1450
ScopeGhidra::clearUnlockedCategory
virtual void clearUnlockedCategory(int4 cat)
Clear unlocked symbols of the given category from this scope.
Definition: database_ghidra.hh:101
RulePropagateCopy::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3592
GhidraTranslate::addr2nm
map< VarnodeData, string > addr2nm
Mapping rom Varnode to register name.
Definition: ghidra_translate.hh:37
opbehavior.hh
Classes for describing the behavior of individual p-code operations.
ContextGhidra::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore the state of this database object from a serialized XML stream.
Definition: ghidra_context.hh:54
ProtoStoreInternal::getInput
virtual ProtoParameter * getInput(int4 i)
Get the i-th input parameter (or NULL if it doesn't exist)
Definition: fspec.cc:2662
PcodeOp
Lowest level operation of the p-code language.
Definition: op.hh:58
AddressResolver
Abstract class for converting native constants to addresses.
Definition: translate.hh:140
Architecture::setPrototype
void setPrototype(const PrototypePieces &pieces)
Set the prototype for a particular function.
Definition: architecture.cc:325
CircleRange::pushForwardTrinary
bool pushForwardTrinary(OpCode opc, const CircleRange &in1, const CircleRange &in2, const CircleRange &in3, int4 inSize, int4 outSize, int4 maxStep)
Push this range forward through a trinary operation.
Definition: rangeutil.cc:1367
ProtoStoreSymbol::restoreXml
virtual void restoreXml(const Element *el, ProtoModel *model)
Restore any internal parameter descriptions from an XML stream.
Definition: fspec.cc:2589
ActionConstantPtr::searchForLoadStore
static AddrSpace * searchForLoadStore(Varnode *vn, PcodeOp *op)
Make a limited search from a constant for a LOAD or STORE so we can see the AddrSpace being accessed.
Definition: coreaction.cc:944
RuleOrPredicate::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: condexe.hh:229
OpBehaviorEqual
CPUI_INT_EQUAL behavior.
Definition: opbehavior.hh:131
BlockGraph::buildCopy
void buildCopy(const BlockGraph &graph)
Build a copy of a BlockGraph.
Definition: block.cc:1818
PcodeOp::spacebase_ptr
@ spacebase_ptr
Loads or stores from a dynamic pointer into a spacebase.
Definition: op.hh:95
ParameterPieces::type
Datatype * type
The datatype of the parameter.
Definition: fspec.hh:296
RuleEquality::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:673
circularqueue::cache
_type * cache
An array of the template object.
Definition: prettyprint.hh:606
Address::getShortcut
char getShortcut(void) const
Get the shortcut character for the address space.
Definition: address.hh:307
PrintLanguage::opFloatAdd
virtual void opFloatAdd(const PcodeOp *op)=0
Emit a FLOAT_ADD operator.
RuleShiftPiece
Convert "shift and add" to PIECE: (zext(V) << 16) + zext(W) => concat(V,W)
Definition: ruleaction.hh:609
VarnodeBank::manage
AddrSpaceManager * manage
Underlying address space manager.
Definition: varnode.hh:326
SplitFlow::setReplacement
TransformVar * setReplacement(Varnode *vn)
Find or build the placeholder objects for a Varnode that needs to be split.
Definition: subflow.cc:1433
RuleThreeWayCompare::detectThreeWay
static PcodeOp * detectThreeWay(PcodeOp *op, bool &isPartial)
Detect a three-way calculation.
Definition: ruleaction.cc:8283
get_opcode
OpCode get_opcode(const string &nm)
Convert a name string to the matching OpCode.
Definition: opcodes.cc:66
ContextCache::setContext
void setContext(const Address &addr, int4 num, uintm mask, uintm value)
Change the value of a context variable at the given address with no bound.
Definition: globalcontext.cc:601
PrintC::emitTypeDefinition
virtual void emitTypeDefinition(const Datatype *ct)
Emit the definition of the given data-type.
Definition: printc.cc:1978
ActionRestructureHigh
Create symbols that map out the local stack-frame for the function.
Definition: coreaction.hh:827
JumpBasicOverride::sanityCheck
virtual bool sanityCheck(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable)
Perform a sanity check on recovered addresses.
Definition: jumptable.hh:451
TransformManager::clearVarnodeMarks
void clearVarnodeMarks(void)
Clear mark for all Varnodes in the map.
Definition: transform.cc:352
RuleStoreVarnode::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3980
ParameterSymbol::setNameLock
virtual void setNameLock(bool val)
Toggle the lock on the name.
Definition: fspec.cc:2383
AddrSpace::doesDeadcode
bool doesDeadcode(void) const
Return true if dead code analysis should be done on this space.
Definition: space.hh:393
Architecture
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
GuardRecord::vn
Varnode * vn
The Varnode being restricted.
Definition: jumptable.hh:135
BlockCondition::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:524
Address::saveXml
void saveXml(ostream &s) const
Save this to a stream as an XML tag.
Definition: address.hh:426
Funcdata::opUninsert
void opUninsert(PcodeOp *op)
Remove the given PcodeOp from its basic block.
Definition: funcdata_op.cc:162
FuncCallSpecs::finalInputCheck
void finalInputCheck(void)
Make final activity check on trials that might have been affected by conditional execution.
Definition: fspec.cc:4592
Varnode::unaffected
@ unaffected
Input which is unaffected by the function.
Definition: varnode.hh:93
BfdArchitecture::adjustvma
long adjustvma
How much to adjust the virtual memory address.
Definition: bfd_arch.hh:39
StackEqn
A stack equation.
Definition: coreaction.cc:22
Attributes::getValue
const string & getValue(const string &qualifiedName) const
Get the value of the attribute with the given qualified name.
Definition: xml.hh:64
CircleRange::setStride
void setStride(int4 newStep, uintb rem)
Set a new step on this range.
Definition: rangeutil.cc:705
JoinRecord::operator<
bool operator<(const JoinRecord &op2) const
Compare records lexigraphically by pieces.
Definition: translate.cc:158
ConstantPoolGhidra::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore constant pool records from an XML stream.
Definition: cpool_ghidra.cc:62
SymbolEntry
A storage location for a particular Symbol.
Definition: database.hh:51
TypeOpPtrsub::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1683
PrintC::shift_right
static OpToken shift_right
The right shift operator.
Definition: printc.hh:84
ActionRestructureVarnode
Create symbols that map out the local stack-frame for the function.
Definition: coreaction.hh:812
ConditionMarker::findMatch
Varnode * findMatch(PcodeOp *op)
Find a matching Varnode in the root expression producing the given CBRANCH boolean.
Definition: condexe.cc:106
SubvariableFlow::addComparePatch
void addComparePatch(ReplaceVarnode *in1, ReplaceVarnode *in2, PcodeOp *op)
Mark subgraph variables flowing into a comparison operation.
Definition: subflow.cc:1137
AddrSpace::getSpacebaseFull
virtual const VarnodeData & getSpacebaseFull(int4 i) const
Return original spacebase register before truncation.
Definition: space.hh:463
FuncProto::extrapop
int4 extrapop
Extra bytes popped from stack.
Definition: fspec.hh:1166
Heritage::numHeritagePasses
int4 numHeritagePasses(AddrSpace *spc) const
Get the number times heritage was performed for the given address space.
Definition: heritage.cc:2344
EmulateSnippet::getVarnodeValue
uintb getVarnodeValue(VarnodeData *vn) const
Retrieve the value of a Varnode from the current machine state.
Definition: emulateutil.cc:363
ActionNonzeroMask::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:290
OpBehaviorBoolNegate::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:506
SubvariableFlow::ReplaceOp::input
vector< ReplaceVarnode * > input
Varnode inputs.
Definition: subflow.hh:59
TraceDAG::initialize
void initialize(void)
Create the initial BranchPoint and BlockTrace objects.
Definition: blockaction.cc:960
PcodeOpBank::endAlive
list< PcodeOp * >::const_iterator endAlive(void) const
End of all PcodeOps marked as alive.
Definition: op.hh:294
Varnode::ptrflow
@ ptrflow
If this varnode flows to or from a pointer.
Definition: varnode.hh:117
FloatFormat::opNeg
uintb opNeg(uintb a) const
Unary negate.
Definition: float.cc:462
PrintJava::pushTypeEnd
virtual void pushTypeEnd(const Datatype *ct)
Push the tail ends of a data-type declaration onto the RPN stack.
Definition: printjava.cc:94
Funcdata::printLocalRange
void printLocalRange(ostream &s) const
Print description of memory ranges associated with local scopes.
Definition: funcdata.cc:542
FlushNative::sendResult
virtual void sendResult(void)
Send results of the command (if any) back to the Ghidra client.
Definition: ghidra_process.cc:252
LoopBody
A description of the body of a loop.
Definition: blockaction.hh:44
RuleRangeMeld
Merge range conditions of the form: V s< c, c s< V, V == c, V != c
Definition: ruleaction.hh:298
BlockGraph::newBlockGoto
BlockGoto * newBlockGoto(FlowBlock *bl)
Build a new BlockGoto.
Definition: block.cc:1602
RulePtrFlow::propagateFlowToReads
bool propagateFlowToReads(Varnode *vn)
Propagate ptrflow property to given Varnode and to descendant PcodeOps.
Definition: ruleaction.cc:7456
Architecture::flowoptions
uint4 flowoptions
options passed to flow following engine
Definition: architecture.hh:132
FuncProto::setConstructor
void setConstructor(bool val)
Toggle whether this prototype is a constructor method.
Definition: fspec.hh:1254
ParamList::getType
virtual uint4 getType(void) const =0
Get the type of parameter list.
FlowBlock::replaceInEdge
void replaceInEdge(int4 num, FlowBlock *b)
Make an incoming edge flow from a given block.
Definition: block.cc:148
BlockEdge::saveXml
void saveXml(ostream &s) const
Save the edge to an XML stream.
Definition: block.cc:22
SetOptions::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:431
Architecture::print
PrintLanguage * print
Current high-level language printer.
Definition: architecture.hh:149
RuleDoubleLoad::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: double.cc:2936
PrintLanguage::tagtype
tagtype
Possible types of Atom.
Definition: printlanguage.hh:155
FlowBlock::flags
uint4 flags
Collection of block_flags.
Definition: block.hh:107
OpBehaviorFloatFloat2Float::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:453
TypeOp::evaluateUnary
uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: typeop.hh:68
CollapseStructure::likelygoto
list< FloatingEdge > likelygoto
The current likely goto list.
Definition: blockaction.hh:193
DatatypeNameCompare
Compare two Datatype pointers: first by name, then by id.
Definition: type.hh:141
CPUI_INT_ZEXT
@ CPUI_INT_ZEXT
Zero extension.
Definition: opcodes.hh:58
PathMeld::truncatePaths
void truncatePaths(int4 cutPoint)
Truncate all paths at the given new Varnode.
Definition: jumptable.cc:857
ValueSetRead::printRaw
void printRaw(ostream &s) const
Write a text description of to the given stream.
Definition: rangeutil.cc:1807
Heritage::refinement
bool refinement(const Address &addr, int4 size, const vector< Varnode * > &readvars, const vector< Varnode * > &writevars, const vector< Varnode * > &inputvars)
Find the common refinement of all reads and writes in the address range.
Definition: heritage.cc:1481
RuleConditionalMove::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7921
CircleRange::isempty
bool isempty
true if set is empty
Definition: rangeutil.hh:52
GhidraCapability::shutDown
static void shutDown(void)
Release all GhidraCommand resources.
Definition: ghidra_process.cc:483
PrintLanguage::opIntSlessEqual
virtual void opIntSlessEqual(const PcodeOp *op)=0
Emit a INT_SLESSEQUAL operator.
ParamEntry::reverse_stack
@ reverse_stack
Slots (for non-exlusion entries) are allocated in reverse order.
Definition: fspec.hh:52
PrintC::doEmitWideCharPrefix
virtual bool doEmitWideCharPrefix(void) const
Return true if this language requires a prefix when expressing wide characters.
Definition: printc.cc:1208
GhidraCapability::commandmap
static map< string, GhidraCommand * > commandmap
The central map from name to Ghidra command.
Definition: ghidra_process.hh:40
TypeArray::TypeArray
TypeArray(const TypeArray &op)
Construct from another TypeArray.
Definition: type.hh:255
ParameterPieces::addr
Address addr
Storage address of the parameter.
Definition: fspec.hh:295
SubvariableFlow::ReplaceVarnode::def
ReplaceOp * def
Defining op for new Varnode.
Definition: subflow.hh:48
ParamTrial::operator<
bool operator<(const ParamTrial &b) const
Sort trials in formal parameter order.
Definition: fspec.cc:1355
PrintC::boolean_or
static OpToken boolean_or
The boolean or operator.
Definition: printc.hh:95
RulePushMulti::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1111
LoadImage
An interface into a particular binary executable image.
Definition: loadimage.hh:71
VarnodeData::operator==
bool operator==(const VarnodeData &op2) const
Compare for equality.
Definition: pcoderaw.hh:66
ArchitectureGhidra::buildGlobalScope
virtual Scope * buildGlobalScope(void)
Build the global scope for this executable.
Definition: ghidra_arch.cc:299
ParameterSymbol
A parameter with a formal backing Symbol.
Definition: fspec.hh:1052
ContextDatabase::getTrackedValue
uintb getTrackedValue(const VarnodeData &mem, const Address &point) const
Get the value of a tracked register at a specific address.
Definition: globalcontext.cc:229
GhidraCommand::ghidra
ArchitectureGhidra * ghidra
The Architecture on which to perform the command.
Definition: ghidra_process.hh:75
TypeFactory::downChain
Datatype * downChain(Datatype *ptrtype, uintb &off)
Find a sub-type matching a pointer and offset.
Definition: type.cc:1886
ParamListStandardOut::clone
virtual ParamList * clone(void) const
Clone this parameter list model.
Definition: fspec.cc:1218
ValueSetRead::equationConstraint
CircleRange equationConstraint
Constraint associated with the equation.
Definition: rangeutil.hh:182
GhidraCommand::status
int4 status
Meta-command to system (0=wait for next command, 1=terminate process)
Definition: ghidra_process.hh:76
RuleTestSign::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3278
EmitNoXml::tagType
virtual void tagType(const char *ptr, syntax_highlight hl, const Datatype *ct)
Emit a data-type identifier.
Definition: prettyprint.hh:246
FlowInfo::setupCallindSpecs
bool setupCallindSpecs(PcodeOp *op, bool tryoverride, FuncCallSpecs *fc)
Set up the FuncCallSpecs object for a new indirect call site.
Definition: flow.cc:691
CPUI_INT_RIGHT
@ CPUI_INT_RIGHT
Right shift, logical (>>)
Definition: opcodes.hh:71
RuleSubvarAnd::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1234
PcodeInjectLibrary::glb
Architecture * glb
The Architecture to which the injection payloads apply.
Definition: pcodeinject.hh:164
circularqueue::left
int4 left
Index within the array of the leftmost object in the queue.
Definition: prettyprint.hh:607
Funcdata::bblocks
BlockGraph bblocks
Unstructured basic blocks.
Definition: funcdata.hh:78
FspecSpace::FspecSpace
FspecSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind)
Constructor.
Definition: fspec.cc:1556
RuleFloatCast
Replace (casttosmall)(casttobig)V with identity or with single cast.
Definition: ruleaction.hh:1377
ActionGroup::list
vector< Action * > list
List of actions to perform in the group.
Definition: action.hh:144
TypeUnicode
The unicode data-type: i.e. wchar.
Definition: type.hh:189
Sleigh::oneInstruction
virtual int4 oneInstruction(PcodeEmit &emit, const Address &baseaddr) const
Transform a single machine instruction into pcode.
Definition: sleigh.cc:618
LaneDescription::wholeSize
int4 wholeSize
Size of the region being split in bytes.
Definition: transform.hh:127
JumpBasic::sanityCheck
virtual bool sanityCheck(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable)
Perform a sanity check on recovered addresses.
Definition: jumptable.cc:1447
Heritage::domchild
vector< vector< FlowBlock * > > domchild
Parent->child edges in dominator tree.
Definition: heritage.hh:204
Funcdata::checkIndirectUse
static bool checkIndirectUse(Varnode *vn)
Check if the given Varnode only flows into call-based INDIRECT ops.
Definition: funcdata_varnode.cc:635
SubvariableFlow::traceForward
bool traceForward(ReplaceVarnode *rvn)
Trace the logical data-flow forward for the given subgraph variable.
Definition: subflow.cc:335
JumpTable::origmodel
JumpModel * origmodel
Initial jump table model, which may be incomplete.
Definition: jumptable.hh:510
LoopBody::extend
void extend(vector< FlowBlock * > &body) const
Extend body (to blocks that never exit)
Definition: blockaction.cc:143
FlowInfo::record_jumploads
@ record_jumploads
Indicate that any jump table recovery should record the table structure.
Definition: flow.hh:71
RuleSelectCse
Look for common sub-expressions (built out of a restricted set of ops)
Definition: ruleaction.hh:71
PrintLanguage::opFloatNeg
virtual void opFloatNeg(const PcodeOp *op)=0
Emit a FLOAT_NEG operator.
NameRecommend::addr
Address addr
The starting address of the storage location.
Definition: varmap.hh:30
PrintLanguage::opIntOr
virtual void opIntOr(const PcodeOp *op)=0
Emit a INT_OR operator.
ScopeLocal::space
AddrSpace * space
Address space containing the local stack.
Definition: varmap.hh:183
JumpValuesRange::getValue
virtual uintb getValue(void) const
Get the current value.
Definition: jumptable.cc:294
OptionWarning
Toggle whether a warning should be issued if a specific action/rule is applied.
Definition: options.hh:117
PrintJavaCapability::operator=
PrintJavaCapability & operator=(const PrintJavaCapability &op)
Not implemented.
OptionInline
Mark/unmark a specific function as inline.
Definition: options.hh:99
JumpValuesRange::normqvn
Varnode * normqvn
Varnode representing the normalized switch variable.
Definition: jumptable.hh:180
ParamEntry::joinrec
JoinRecord * joinrec
Non-null if this is logical variable from joined pieces.
Definition: fspec.hh:72
JumpValues::isReversible
virtual bool isReversible(void) const =0
Return true if the current value can be reversed to get a label.
TypeOpIntRem::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:504
OpFollow::val
uintb val
A possible constant second input.
Definition: userop.hh:171
RuleAndPiece
Convert PIECE to INT_ZEXT where appropriate: V & concat(W,X) => zext(X)
Definition: ruleaction.hh:328
FloatFormat::opAbs
uintb opAbs(uintb a) const
Absolute value (abs)
Definition: float.cc:472
GhidraCapability::name
string name
Identifier for capability and associated commands.
Definition: ghidra_process.hh:41
PrintC::emitBlockSwitch
virtual void emitBlockSwitch(const BlockSwitch *bl)
Emit a switch structure.
Definition: printc.cc:2827
EffectRecord::address
VarnodeData address
The memory range affected.
Definition: fspec.hh:314
RulePushMulti::findSubstitute
static PcodeOp * findSubstitute(Varnode *in1, Varnode *in2, BlockBasic *bb, PcodeOp *earliest)
Find a previously existing MULTIEQUAL taking given inputs.
Definition: ruleaction.cc:1074
Symbol::size_typelock
@ size_typelock
Only the size of the symbol is typelocked.
Definition: database.hh:182
TypeOp::isCommutative
bool isCommutative(void) const
Return true if this op-code is commutative.
Definition: typeop.cc:169
RawLoadImage::loadFill
virtual void loadFill(uint1 *ptr, int4 size, const Address &addr)
Get data from the LoadImage.
Definition: loadimage.cc:82
Rule::reset
virtual void reset(Funcdata &data)
Reset this Rule.
Definition: action.cc:633
PcodeOpRaw::getOutput
VarnodeData * getOutput(void) const
Retrieve the output varnode for this op.
Definition: pcoderaw.hh:182
CPUI_BOOL_AND
@ CPUI_BOOL_AND
Boolean and (&&)
Definition: opcodes.hh:81
UserOpManage
Manager/container for description objects (UserPcodeOp) of user defined p-code ops.
Definition: userop.hh:250
Database::resolveScope
Scope * resolveScope(const vector< string > &subnames) const
Look-up a Scope by name.
Definition: database.cc:2901
PcodeOpEdge
Class representing a term in an additive expression.
Definition: coreaction.hh:1038
PrintC::emitBlockCopy
virtual void emitBlockCopy(const BlockCopy *bl)
Emit a basic block (with any labels)
Definition: printc.cc:2372
a_v
void a_v(ostream &s, const string &attr, const string &val)
Output an XML attribute name/value pair to stream.
Definition: xml.hh:330
TypeOpIntAdd::TypeOpIntAdd
TypeOpIntAdd(TypeFactory *t)
Constructor.
Definition: typeop.cc:976
TypeOpNotEqual
Information about the INT_NOTEQUAL op-code.
Definition: typeop.hh:309
TrackedContext::loc
VarnodeData loc
Storage details of the register being tracked.
Definition: globalcontext.hh:69
TypeBase::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:168
PrintC::opIntCarry
virtual void opIntCarry(const PcodeOp *op)
Emit a INT_CARRY operator.
Definition: printc.hh:244
ActionAssignHigh::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:334
Rule::warnings_on
@ warnings_on
A warning is issued if this rule is applied.
Definition: action.hh:198
ProtoStoreInternal::setInput
virtual ProtoParameter * setInput(int4 i, const string &nm, const ParameterPieces &pieces)
Establish name, data-type, storage of a specific input parameter.
Definition: fspec.cc:2619
JumptableThunkError
Exception thrown for a thunk mechanism that looks like a jump-table.
Definition: jumptable.hh:28
Funcdata::beginDef
VarnodeDefSet::const_iterator beginDef(uint4 fl) const
Start of Varnodes with a given definition property.
Definition: funcdata.hh:342
SubvariableFlow::doTrace
bool doTrace(void)
Trace logical value through data-flow, constructing transform.
Definition: subflow.cc:1302
ExecutablePcode::getSource
virtual string getSource(void) const
Return a string describing the source of the injection (.cspec, prototype model, etc....
Definition: pcodeinject.hh:146
FuncProto::checkInputJoin
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
Symbol::nameDedup
uint4 nameDedup
id to distinguish symbols with the same name
Definition: database.hh:161
PcodeOp::isCalculatedBool
bool isCalculatedBool(void) const
Return true if output is 1-bit boolean.
Definition: op.hh:204
Funcdata::markLanedVarnode
void markLanedVarnode(Varnode *vn, const LanedRegister *lanedReg)
Mark Varnode as potential laned register.
Definition: funcdata_varnode.cc:288
AncestorRealistic::State
Node in a depth first traversal of ancestors.
Definition: funcdata.hh:568
ParamActive::slotbase
int4 slotbase
Slot where next parameter will go.
Definition: fspec.hh:225
Symbol::force_oct
@ force_oct
Force octal printing of constant symbol.
Definition: database.hh:179
Action::count_tests
uint4 count_tests
Number of times apply() has been called.
Definition: action.hh:83
TypeFactory::setName
Datatype * setName(Datatype *ct, const string &n)
Set the given types name.
Definition: type.cc:1466
Scope::findCodeLabel
virtual LabSymbol * findCodeLabel(const Address &addr) const =0
Find a label Symbol at the given address.
RuleSelectCse::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:229
ScopeGhidra::removeRange
virtual void removeRange(AddrSpace *spc, uintb first, uintb last)
Remove a memory range from the ownership of this Scope.
Definition: database_ghidra.hh:48
Address::isConstant
bool isConstant(void) const
Is this a constant value.
Definition: address.hh:412
JumpTable::block2addr
vector< IndexPair > block2addr
Map from basic-blocks to address table index.
Definition: jumptable.hh:512
EmitXml::setMaxLineSize
virtual void setMaxLineSize(int4 mls)
Provide a maximum line size to the pretty printer.
Definition: prettyprint.hh:179
FuncProto::FuncProto
FuncProto(void)
Constructor.
Definition: fspec.cc:2920
Varnode::clearFlags
void clearFlags(uint4 fl) const
Internal method for clearing boolean attributes.
Definition: varnode.cc:338
ActionSwitchNorm::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3629
ScopeInternal::findOverlap
virtual SymbolEntry * findOverlap(const Address &addr, int4 size) const
Find first Symbol overlapping the given memory range.
Definition: database.cc:2255
variable.hh
Definitions for high-level variables.
BlockCopy::getSplitPoint
virtual FlowBlock * getSplitPoint(void)
Get the leaf splitting block.
Definition: block.hh:430
AddrSpaceManager::getUniqueSpace
AddrSpace * getUniqueSpace(void) const
Get the temporary register space for this processor.
Definition: translate.hh:481
TokenSplit::comm_t
@ comm_t
Part of a comment block.
Definition: prettyprint.hh:314
Heritage::flags
vector< uint4 > flags
Block properties for phi-node placement algorithm.
Definition: heritage.hh:206
FuncProto::effectEnd
vector< EffectRecord >::const_iterator effectEnd(void) const
Get iterator to end of EffectRecord list.
Definition: fspec.cc:3366
PathMeld
All paths from a (putative) switch variable to the CPUI_BRANCHIND.
Definition: jumptable.hh:63
InjectPayload::EXECUTABLEPCODE_TYPE
@ EXECUTABLEPCODE_TYPE
Injection running as a stand-alone p-code script.
Definition: pcodeinject.hh:84
string2metatype
type_metatype string2metatype(const string &metastring)
Convert string to type meta-type.
Definition: type.cc:174
RuleAddUnsigned::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1064
TypeOpInsert
Information about the INSERT op-code.
Definition: typeop.hh:782
TypeUnicode::setflags
void setflags(void)
Set unicode property flags.
Definition: type.cc:340
SubvariableFlow
Class for shrinking big Varnodes carrying smaller logical values.
Definition: subflow.hh:39
ProtoParameter::isHiddenReturn
virtual bool isHiddenReturn(void) const =0
Is this a pointer to storage for a return value.
ActionRestrictLocal::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1868
SplitFlow::SplitFlow
SplitFlow(Funcdata *f, Varnode *root, int4 lowSize)
Constructor.
Definition: subflow.cc:1686
TypeOpInt2Comp::TypeOpInt2Comp
TypeOpInt2Comp(TypeFactory *t)
Constructor.
Definition: typeop.cc:1049
OpBehaviorIntNegate::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:353
OpBehaviorFloatNeg
CPUI_FLOAT_NEG behavior.
Definition: opbehavior.hh:420
ConstantPool::getRecord
virtual const CPoolRecord * getRecord(const vector< uintb > &refs) const =0
Retrieve a constant pool record (CPoolRecord) given a reference to it.
BlockGraph::removeFromFlow
void removeFromFlow(FlowBlock *bl)
Remove given FlowBlock preserving flow in this.
Definition: block.cc:1445
Funcdata::transferVarnodeProperties
void transferVarnodeProperties(Varnode *vn, Varnode *newVn, int4 lsbOffset)
Copy properties from an existing Varnode to a new Varnode.
Definition: funcdata_varnode.cc:490
ActionShadowVar::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:173
Funcdata::beginLoc
VarnodeLocSet::const_iterator beginLoc(void) const
Start of all Varnodes sorted by storage.
Definition: funcdata.hh:298
Architecture::buildTranslator
virtual Translate * buildTranslator(DocumentStorage &store)=0
Build the Translator object.
TypeOpStore::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:430
GhidraCapability::readCommand
static int4 readCommand(istream &sin, ostream &out)
Dispatch a Ghidra command.
Definition: ghidra_process.cc:459
FloatFormat::extractFractionalCode
uintb extractFractionalCode(uintb x) const
Extract the fractional part of the encoding.
Definition: float.cc:126
ConstantPoolInternal::CheapSorter::b
uintb b
The second integer in a reference (or zero)
Definition: cpool.hh:168
FuncCallSpecs::paramshiftModifyStart
void paramshiftModifyStart(void)
Prepend any extra parameters if a paramshift is required.
Definition: fspec.cc:4914
LoadImageSection::readonly
@ readonly
read only section
Definition: loadimage.hh:51
ScopeInternal::setDisplayFormat
virtual void setDisplayFormat(Symbol *sym, uint4 attr)
Set the display format for a Symbol.
Definition: database.cc:2081
OpBehavior::opcode
OpCode opcode
the internal enumeration for pcode types
Definition: opbehavior.hh:43
OpBehaviorFloatLessEqual
CPUI_FLOAT_LESSEQUAL behavior.
Definition: opbehavior.hh:372
RuleTrivialBool::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2431
CastStrategyJava::castStandard
virtual Datatype * castStandard(Datatype *reqtype, Datatype *curtype, bool care_uint_int, bool care_ptr_uint) const
Does there need to be a visible cast between the given data-types.
Definition: cast.cc:363
TypeChar::TypeChar
TypeChar(const string &n)
Construct a char (always 1-byte) given a name.
Definition: type.hh:181
RuleSlessToLess::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2532
BfdArchitecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: bfd_arch.cc:141
Merge::mergeTestAdjacent
static bool mergeTestAdjacent(HighVariable *high_out, HighVariable *high_in)
Adjacency tests for merging Varnodes that are input or output to the same p-code op.
Definition: merge.cc:125
Heritage::collect
int4 collect(Address addr, int4 size, vector< Varnode * > &read, vector< Varnode * > &write, vector< Varnode * > &input) const
Collect free reads, writes, and inputs in the given address range.
Definition: heritage.cc:159
IPTR_JOIN
@ IPTR_JOIN
Special virtual space to represent split variables.
Definition: space.hh:35
NameRecommend::useaddr
Address useaddr
The code address at the point of use.
Definition: varmap.hh:31
PrintC::unary_plus
static OpToken unary_plus
The unary plus operator.
Definition: printc.hh:74
RuleDoubleIn::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: double.cc:2871
LoopBody::depth
int4 depth
Nested depth of this loop.
Definition: blockaction.hh:47
ActionNodeJoin
Look for conditional branch expressions that have been split and rejoin them.
Definition: blockaction.hh:335
ContextBitRange::mask
uintm mask
Mask to apply (after shifting) when unpacking this value from its word.
Definition: globalcontext.hh:35
BlockWhileDo::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2934
Merge::highedgemap
map< HighEdge, bool > highedgemap
A cache of intersection tests, sorted by HighVariable pair.
Definition: merge.hh:82
Heritage::normalizeReadSize
Varnode * normalizeReadSize(Varnode *vn, const Address &addr, int4 size)
Normalize the size of a read Varnode, prior to heritage.
Definition: heritage.cc:226
LoadGuard
Description of a LOAD operation that needs to be guarded.
Definition: heritage.hh:105
ParamActive::shrink
void shrink(int4 i, const Address &addr, int4 sz)
Shrink the given trial to a new given range.
Definition: fspec.hh:270
OverlaySpace::restoreXml
virtual void restoreXml(const Element *el)
Recover the details of this space from XML.
Definition: space.cc:672
CommentDatabase::clear
virtual void clear(void)=0
Clear all comments from this container.
FloatFormat::opLess
uintb opLess(uintb a, uintb b) const
Less-than comparison (<)
Definition: float.cc:378
ActionForceGoto::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:660
DynamicHash::getTotalFromHash
static uint4 getTotalFromHash(uint8 h)
Retrieve the encoded collision total from a hash.
Definition: dynamic.cc:508
ActionSetCasts::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2258
VarnodeData::operator<
bool operator<(const VarnodeData &op2) const
An ordering for VarnodeData.
Definition: pcoderaw.hh:56
BreakCallBack::setEmulate
void setEmulate(Emulate *emu)
Associate a particular emulator with this breakpoint.
Definition: emulate.hh:123
ScopeGhidraNamespace::addMapInternal
virtual SymbolEntry * addMapInternal(Symbol *sym, uint4 exfl, const Address &addr, int4 off, int4 sz, const RangeList &uselim)
Create a new SymbolEntry for a Symbol given a memory range.
Definition: database_ghidra.cc:397
BlockMultiGoto
A block with multiple edges out, at least one of which is an unstructured (goto) branch.
Definition: block.hh:468
Action::count
int4 count
Number of changes made by this action so far.
Definition: action.hh:79
TransformOp::replacement
PcodeOp * replacement
The new replacement op.
Definition: transform.hh:74
TypeOpIndirect
Information about the INDIRECT op-code.
Definition: typeop.hh:679
MemoryBank::insert
virtual void insert(uintb addr, uintb val)=0
Insert a word in memory bank at an aligned location.
OpToken::postsurround
@ postsurround
Function or array operator form.
Definition: printlanguage.hh:87
FuncCallSpecs::isbadjumptable
bool isbadjumptable
Was the call originally a jump-table we couldn't recover.
Definition: fspec.hh:1451
BadDataError
Exception for bad instruction data.
Definition: translate.hh:50
TermOrder::collect
void collect(void)
Collect all the terms in the expression.
Definition: coreaction.cc:4669
FuncCallSpecs::setInputBytesConsumed
bool setInputBytesConsumed(int4 slot, int4 val) const
Set the estimated number of bytes within the given parameter that are consumed.
Definition: fspec.cc:4902
BlockGraph::setStartBlock
void setStartBlock(FlowBlock *bl)
Set the entry point FlowBlock for this graph.
Definition: block.cc:1525
EmitXml::global_color
@ global_color
Global variable identifiers.
Definition: prettyprint.hh:95
Cover::print
void print(ostream &s) const
Dump a description of this cover to stream.
Definition: cover.cc:554
JumpTable::label
vector< uintb > label
The case label for each explicit target.
Definition: jumptable.hh:513
CPUI_FLOAT_FLOOR
@ CPUI_FLOAT_FLOOR
Round towards -infinity.
Definition: opcodes.hh:105
RuleZextCommute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4433
ConstantPoolInternal::saveXml
virtual void saveXml(ostream &s) const
Save all records in this container to an XML stream.
Definition: cpool.cc:220
TransformManager::getPreexistingVarnode
TransformVar * getPreexistingVarnode(Varnode *vn)
Get (or create) placeholder for preexisting Varnode.
Definition: transform.cc:565
SetAction::printstring
string printstring
The printing output configuration to toggle.
Definition: ghidra_process.hh:205
EmulateFunction::executeCallind
virtual void executeCallind(void)
Standard behavior for a CALLIND.
Definition: jumptable.cc:109
ActionUnjustifiedParams::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:881
BlockWhileDo::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:2943
ParamListRegister::fillinMap
virtual void fillinMap(ParamActive *active) const
Given an unordered list of storage locations, calculate a function prototype.
Definition: fspec.cc:1225
EffectRecord
Description of the indirect effect a sub-function has on a memory range.
Definition: fspec.hh:305
DynamicHash::opproc
uint4 opproc
Number of PcodeOps processed in the markop list so far.
Definition: dynamic.hh:62
ActionRestartGroup::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: action.cc:536
TokenSplit::openGroup
int4 openGroup(void)
Create a "start a printing group" command.
Definition: prettyprint.hh:535
HighEdge::a
HighVariable * a
First HighVariable of the pair.
Definition: merge.hh:31
SetOptions::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:420
ParamListStandard::possibleParamWithSlot
virtual bool possibleParamWithSlot(const Address &loc, int4 size, int4 &slot, int4 &slotsize) const
Pass-back the slot and slot size for the given storage location as a parameter.
Definition: fspec.cc:932
TypeEnum::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:691
ConditionalJoin::MergePair
A pair of Varnode objects that have been split (and should be merged)
Definition: blockaction.hh:234
JumpBasic::pathMeld
PathMeld pathMeld
Set of PcodeOps and Varnodes producing the final target addresses.
Definition: jumptable.hh:347
FloatFormat::getInfinityEncoding
uintb getInfinityEncoding(bool sgn) const
Get an encoded infinite value.
Definition: float.cc:206
PcodeOp::startmark
@ startmark
This op is the first in its instruction.
Definition: op.hh:81
EmitXml::parenlevel
int4 parenlevel
Current depth of parentheses.
Definition: prettyprint.hh:81
ActionMapGlobals
Create symbols for any discovered global variables in the function.
Definition: coreaction.hh:838
PrintC::opExtractOp
virtual void opExtractOp(const PcodeOp *op)
Emit an EXTRACT operator.
Definition: printc.cc:977
FloatFormat::opRound
uintb opRound(uintb a) const
Round.
Definition: float.cc:549
RuleFloatRange::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1493
RuleAddMultCollapse::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:692
JumpTable::setOverride
void setOverride(const vector< Address > &addrtable, const Address &naddr, uintb h, uintb sv)
Force manual override information on this jump-table.
Definition: jumptable.cc:2292
BlockEdge::label
uint4 label
Label of the edge.
Definition: block.hh:45
ParamActive::isfullychecked
bool isfullychecked
True if all trials are fully examined (and no new trials are expected)
Definition: fspec.hh:229
EmitPrettyPrint::indentstack
vector< int4 > indentstack
Space available for currently active nesting levels.
Definition: prettyprint.hh:705
TypeStruct::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:864
ParamActive::registerTrial
void registerTrial(const Address &addr, int4 sz)
Add a new trial to the container.
Definition: fspec.cc:1404
TypeCode::proto
FuncProto * proto
If non-null, this describes the prototype of the underlying function.
Definition: type.hh:332
RuleLessEqual::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2242
DynamicHash::vnedge
vector< const Varnode * > vnedge
A staging area for Varnodes before formally adding to the sub-graph.
Definition: dynamic.hh:67
Override::insertFlowOverride
void insertFlowOverride(const Address &addr, uint4 type)
Mark a branch instruction with a different flow type.
Definition: override.cc:138
RuleSignShift
Normalize sign-bit extraction: V >> 0x1f => (V s>> 0x1f) * -1
Definition: ruleaction.hh:568
DocumentStorage::getTag
const Element * getTag(const string &nm) const
Retrieve a registered XML Element by name.
TermPatternOp::unify
virtual bool unify(Funcdata &data, PcodeOp *op, vector< Varnode * > &bindlist) const =0
Gather the formal input Varnode objects given the root PcodeOp.
LoadImageSection::data
@ data
data only
Definition: loadimage.hh:50
FlowBlock::block_type
block_type
The possible block types.
Definition: block.hh:64
Architecture::getMinimumLanedRegisterSize
int4 getMinimumLanedRegisterSize(void) const
Get the minimum size of a laned register in bytes.
Definition: architecture.cc:250
RulePtrFlow::glb
Architecture * glb
The address space manager.
Definition: ruleaction.hh:1265
EmitXml::const_color
@ const_color
Constant values.
Definition: prettyprint.hh:93
SegmentOp::baseinsize
int4 baseinsize
The size in bytes of the base or segment value.
Definition: userop.hh:202
PrintC::docAllGlobals
virtual void docAllGlobals(void)
Emit declarations of global variables.
Definition: printc.cc:2230
FloatFormat::opSub
uintb opSub(uintb a, uintb b) const
Subtraction (-)
Definition: float.cc:451
PcodeOp::basiciter
list< PcodeOp * >::iterator basiciter
Iterator within basic block.
Definition: op.hh:118
PrintC::emitBlockInfLoop
virtual void emitBlockInfLoop(const BlockInfLoop *bl)
Emit an infinite loop structure.
Definition: printc.cc:2639
ActionForceGoto
Apply any overridden forced gotos.
Definition: coreaction.hh:134
ProtoStoreSymbol
A collection of parameter descriptions backed by Symbol information.
Definition: fspec.hh:1080
Varnode::setSymbolEntry
void setSymbolEntry(SymbolEntry *entry)
Attach a Symbol to this Varnode.
Definition: varnode.cc:386
AddrSpace::shortcut
char shortcut
Shortcut character for printing.
Definition: space.hh:101
CPUI_INT_SREM
@ CPUI_INT_SREM
Remainder/modulo, signed (%)
Definition: opcodes.hh:77
TYPE_PTR
@ TYPE_PTR
Pointer data-type.
Definition: type.hh:43
TypeOpIntSub::TypeOpIntSub
TypeOpIntSub(TypeFactory *t)
Constructor.
Definition: typeop.cc:990
FlowBlock::eliminateInDups
void eliminateInDups(FlowBlock *bl)
Eliminate duplicate in edges from given block.
Definition: block.cc:416
PrintLanguage::opIntLeft
virtual void opIntLeft(const PcodeOp *op)=0
Emit a INT_LEFT operator.
Cover::containVarnodeDef
int4 containVarnodeDef(const Varnode *vn) const
Check the definition of a Varnode for containment.
Definition: cover.cc:391
ParamIDAnalysis
Definition: paramid.hh:64
CircleRange::complement
void complement(void)
Set this to the complement of itself.
Definition: rangeutil.cc:36
Emulate::getHalt
bool getHalt(void) const
Get the halt state of the emulator.
Definition: emulate.hh:224
Funcdata::createStackRef
Varnode * createStackRef(AddrSpace *spc, uintb off, PcodeOp *op, Varnode *stackptr, bool insertafter)
Create an INT_ADD PcodeOp calculating an offset to the spacebase register.
Definition: funcdata_op.cc:429
Emulate::setHalt
void setHalt(bool val)
Set the halt state of the emulator.
Definition: emulate.hh:214
ProtoModel::buildParamList
void buildParamList(const string &strategy)
Establish the main resource lists for input and output parameters.
Definition: fspec.cc:1737
RuleSubNormal::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1109
CollapseStructure::likelyiter
list< FloatingEdge >::iterator likelyiter
Iterator to the next most likely goto edge.
Definition: blockaction.hh:194
MapIterator::operator==
bool operator==(const MapIterator &op2) const
Equality operator.
Definition: database.hh:365
OpToken::precedence
int4 precedence
Precedence level of this token (higher binds more tightly)
Definition: printlanguage.hh:94
Emulate
A pcode-based emulator interface.
Definition: emulate.hh:168
TypeOpIntSlessEqual
Information about the INT_SLESSEQUAL op-code.
Definition: typeop.hh:325
LanguageDescription
Contents of the <language> tag in a .ldefs file.
Definition: sleigh_arch.hh:49
TypeOpBranchind
Information about the BRANCHIND op-code.
Definition: typeop.hh:253
PrintC::opInt2Comp
virtual void opInt2Comp(const PcodeOp *op)
Emit a INT_2COMP operator.
Definition: printc.hh:247
TypeOpIntSright::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:469
EmulateFunction::loadpoints
vector< LoadTable > loadpoints
The set of collected LOAD records.
Definition: jumptable.hh:104
PrintLanguage::castStrategy
CastStrategy * castStrategy
The strategy for emitting explicit case operations.
Definition: printlanguage.hh:243
SplitFlow::traceForward
bool traceForward(TransformVar *rvn)
Try to trace the pair of logical values, forward, through ops that read them.
Definition: subflow.cc:1511
ParamEntryRange::first
uintb first
Starting offset of the ParamEntry's range.
Definition: fspec.hh:105
Funcdata::opSetInput
void opSetInput(PcodeOp *op, Varnode *vn, int4 slot)
Set a specific input operand for the given PcodeOp.
Definition: funcdata_op.cc:102
FlowBlock::f_defaultswitch_edge
@ f_defaultswitch_edge
This is default edge from switchblock.
Definition: block.hh:98
BlockGraph::forceOutputNum
void forceOutputNum(int4 i)
Force number of outputs.
Definition: block.cc:805
RuleSignForm::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1190
ExecutablePcode::emitter
PcodeEmit * emitter
Emitter (allocated temporarily) for initializing the emulator.
Definition: pcodeinject.hh:141
Merge::eliminateIntersect
void eliminateIntersect(Varnode *vn, const vector< BlockVarnode > &blocksort)
Eliminate intersections of given Varnode with other Varnodes in a list.
Definition: merge.cc:417
PrintLanguage::NodePending
A pending data-flow node; waiting to be placed on the reverse polish notation stack.
Definition: printlanguage.hh:179
AddrSpace::hasphysical
@ hasphysical
Has physical memory associated with it.
Definition: space.hh:85
rangemap::AddrRange::first
linetype first
Start of the disjoint sub-range.
Definition: rangemap.hh:78
TypeEnum
An enumerated Datatype object: an integer with named values.
Definition: type.hh:277
Merge::processHighRedundantCopy
void processHighRedundantCopy(HighVariable *high)
Mark COPY ops into the given HighVariable that are redundant.
Definition: merge.cc:1235
PrintLanguage::force_scinote
@ force_scinote
Force scientific notation for floats.
Definition: printlanguage.hh:141
BlockBasic::negateCondition
virtual bool negateCondition(bool toporbottom)
Flip the condition computed by this.
Definition: block.cc:2237
LoadGuard::op
PcodeOp * op
The LOAD op.
Definition: heritage.hh:107
Scope::clear
virtual void clear(void)=0
Clear all symbols from this scope.
CircleRange::pushForwardBinary
bool pushForwardBinary(OpCode opc, const CircleRange &in1, const CircleRange &in2, int4 inSize, int4 outSize, int4 maxStep)
Push this range forward through a binary operation.
Definition: rangeutil.cc:1165
FloatFormat::infinity
@ infinity
An encoding representing an infinite value.
Definition: float.hh:35
IndirectForm
Definition: double.hh:279
Varnode::spacebase
@ spacebase
This is a base register for an address space.
Definition: varnode.hh:94
LoopBody::tails
vector< FlowBlock * > tails
(Possibly multiple) nodes with back edge returning to the head
Definition: blockaction.hh:46
PcodeEmitCache
P-code emitter that dumps its raw Varnodes and PcodeOps to an in memory cache.
Definition: emulate.hh:278
Funcdata::endLoc
VarnodeLocSet::const_iterator endLoc(int4 s, const Address &addr, const Address &pc, uintm uniq=~((uintm) 0)) const
End of Varnodes matching storage and definition address.
Definition: funcdata.hh:332
ParamActive::clear
void clear(void)
Reset to an empty container.
Definition: fspec.cc:1391
TraceDAG::branchlist
vector< BranchPoint * > branchlist
Current set of BranchPoints that have been traced.
Definition: blockaction.hh:156
Varnode::defiter
VarnodeDefSet::iterator defiter
Iterator into VarnodeBank sorted by definition.
Definition: varnode.hh:136
TypeOpCallother
Information about the CALLOTHER op-code (user defined p-code operations)
Definition: typeop.hh:281
ParamTrial::active
@ active
Trial looks active (hint that it is used)
Definition: fspec.hh:163
EmitPrettyPrint::beginDocument
virtual int4 beginDocument(void)
Begin a whole document of output.
Definition: prettyprint.cc:846
Merge::snipReads
void snipReads(Varnode *vn, list< PcodeOp * > &markedop)
Snip off set of read p-code ops for a given Varnode.
Definition: merge.cc:369
TokenSplit::beginVarDecl
int4 beginVarDecl(const Symbol *sym)
Create a "begin variable declaration" command.
Definition: prettyprint.hh:403
TokenSplit::begin_comment
@ begin_comment
Start of a comment block.
Definition: prettyprint.hh:288
LoadImageXml::openSymbols
virtual void openSymbols(void) const
Prepare to read symbols.
Definition: loadimage_xml.cc:230
FuncCallSpecs::activeoutput
ParamActive activeoutput
Info for recovering output parameters.
Definition: fspec.hh:1447
TypeOpInt2Comp::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:410
PcodeInjectLibrary::callMechFixupMap
map< string, int4 > callMechFixupMap
Map of registered mechanism names to injection id.
Definition: pcodeinject.hh:169
rangemap::inittype
_recordtype::inittype inittype
The data-type containing initialization data for records.
Definition: rangemap.hh:69
Varnode::copySymbolIfValid
void copySymbolIfValid(const Varnode *vn)
Copy symbol info from vn if constant value matches.
Definition: varnode.cc:455
EmitNoXml::tagFuncName
virtual void tagFuncName(const char *ptr, syntax_highlight hl, const Funcdata *fd, const PcodeOp *op)
Emit a function identifier.
Definition: prettyprint.hh:244
ProtoModel
A prototype model: a model for passing parameters between functions.
Definition: fspec.hh:615
Funcdata::clearJumpTables
void clearJumpTables(void)
Clear any jump-table information.
Definition: funcdata_block.cc:40
ExternRefSymbol::buildNameType
void buildNameType(void)
Create a name and data-type for the Symbol.
Definition: database.cc:703
Funcdata::assignHigh
HighVariable * assignHigh(Varnode *vn)
Assign a new HighVariable to a Varnode.
Definition: funcdata_varnode.cc:46
AddrSpace::minimumPointerSize
int4 minimumPointerSize
Smallest size of a pointer into this space (in bytes)
Definition: space.hh:106
LaneDivide::allowSubpieceTerminator
bool allowSubpieceTerminator
true if we allow lanes to be cast (via SUBPIECE) to a smaller integer size
Definition: subflow.hh:177
Merge::allocateCopyTrim
PcodeOp * allocateCopyTrim(Varnode *inVn, Datatype *ct, const Address &addr)
Allocate COPY PcodeOp designed to trim an overextended Cover.
Definition: merge.cc:350
EmitPrettyPrint::endFuncProto
virtual void endFuncProto(int4 id)
End a function prototype declaration.
Definition: prettyprint.cc:990
FlowBlock::restoreXml
void restoreXml(const Element *el, BlockMap &resolver)
Restore this from an XML stream.
Definition: block.cc:2393
GhidraDecompCapability::ghidraDecompCapability
static GhidraDecompCapability ghidraDecompCapability
Singleton instance.
Definition: ghidra_process.hh:53
XmlArchitectureCapability::XmlArchitectureCapability
XmlArchitectureCapability(void)
Singleton.
Definition: xml_arch.cc:21
Architecture::parseProtoEval
void parseProtoEval(const Element *el)
Apply prototype evaluation configuration.
Definition: architecture.cc:747
PrintC::emitScopeVarDecls
virtual bool emitScopeVarDecls(const Scope *scope, int4 cat)
Emit all the variable declarations for a given scope.
Definition: printc.cc:2127
TokenSplit::end_indent
@ end_indent
End of a nesting level.
Definition: prettyprint.hh:287
Architecture::clearAnalysis
void clearAnalysis(Funcdata *fd)
Clear analysis specific to a function.
Definition: architecture.cc:270
EmitNoXml::tagLabel
virtual void tagLabel(const char *ptr, syntax_highlight hl, const AddrSpace *spc, uintb off)
Emit a code label identifier.
Definition: prettyprint.hh:253
SegmentedResolver::SegmentedResolver
SegmentedResolver(Architecture *g, AddrSpace *sp, SegmentOp *sop)
Definition: architecture.hh:291
PrintLanguage::opExtractOp
virtual void opExtractOp(const PcodeOp *op)=0
Emit an EXTRACT operator.
Heritage::floatExtensionWrite
void floatExtensionWrite(Varnode *vn, JoinRecord *joinrec)
Create float extension from a lower precision join-space Varnode.
Definition: heritage.cc:1812
TypeOpCopy::TypeOpCopy
TypeOpCopy(TypeFactory *t)
Constructor.
Definition: typeop.cc:329
JumpAssisted::isOverride
virtual bool isOverride(void) const
Return true if this model was manually overridden.
Definition: jumptable.hh:480
PcodeOpBank::destroy
void destroy(PcodeOp *op)
Destroy/retire the given PcodeOp.
Definition: op.cc:724
JoinSpace::printRaw
virtual void printRaw(ostream &s, uintb offset) const
Write an address in this space to a stream.
Definition: space.cc:578
ActionLikelyTrash
Get rid of registers with trash values.
Definition: coreaction.hh:797
Funcdata::remapVarnode
void remapVarnode(Varnode *vn, Symbol *sym, const Address &usepoint)
Remap a Symbol to a given Varnode using a static mapping.
Definition: funcdata_varnode.cc:944
CoverBlock::start
const PcodeOp * start
Beginning of the range.
Definition: cover.hh:36
EmitXml::funcname_color
@ funcname_color
Function identifiers.
Definition: prettyprint.hh:91
ParamEntryRange::InitData::entry
ParamEntry * entry
Underlying ParamEntry being assigned to the ParamEntryRange.
Definition: fspec.hh:114
PrintLanguage::opIntZext
virtual void opIntZext(const PcodeOp *op, const PcodeOp *readOp)=0
Emit a INT_ZEXT operator.
TraceDAG::clearVisitCount
void clearVisitCount(void)
Definition: blockaction.cc:933
TypeEnum::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:646
ProtoStore::clearOutput
virtual void clearOutput(void)=0
Clear the return value to TYPE_VOID.
ScopeGhidra::findContainer
virtual SymbolEntry * findContainer(const Address &addr, int4 size, const Address &usepoint) const
Find the smallest Symbol containing the given memory range.
Definition: database_ghidra.cc:284
Architecture::parseIncidentalCopy
void parseIncidentalCopy(const Element *el)
Apply incidental copy configuration.
Definition: architecture.cc:882
Funcdata::doLiveInject
void doLiveInject(InjectPayload *payload, const Address &addr, BlockBasic *bl, list< PcodeOp * >::iterator pos)
Inject p-code from a payload into this live function.
Definition: funcdata.cc:804
capability.hh
Infrastructure for discovering code extensions to the decompiler.
RuleEmbed::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4990
CommentSorter::displayUnplacedComments
bool displayUnplacedComments
True if unplaced comments should be displayed (in the header)
Definition: comment.hh:235
PrintLanguage::functoken
@ functoken
Emit atom as function name.
Definition: printlanguage.hh:158
DynamicRecommend::name
string name
The local symbol name recommendation.
Definition: varmap.hh:52
ScopeGhidra::setDisplayFormat
virtual void setDisplayFormat(Symbol *sym, uint4 attr)
Set the display format for a Symbol.
Definition: database_ghidra.hh:77
Action::setBreakPoint
bool setBreakPoint(uint4 tp, const string &specify)
Set a breakpoint on this action.
Definition: action.cc:169
PcodeOp::dead
@ dead
This operation is dead.
Definition: op.hh:72
TypeOpBoolNegate::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:520
TransformVar::createReplacement
void createReplacement(Funcdata *fd)
Create the new/modified variable this placeholder represents.
Definition: transform.cc:171
HighVariable::updateSymbol
void updateSymbol(void) const
(Re)derive the Symbol and offset for this from member Varnodes
Definition: variable.cc:162
TypeOpFloatInt2Float::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:632
Funcdata::removeFromFlowSplit
void removeFromFlowSplit(BlockBasic *bl, bool swap)
Remove a basic block splitting its control-flow into two distinct paths.
Definition: funcdata_block.cc:944
HighVariable::hasCover
bool hasCover(void) const
Determine if this HighVariable has an associated cover.
Definition: variable.hh:126
TermOrder::sorter
vector< PcodeOpEdge * > sorter
An array of references to terms for quick sorting.
Definition: coreaction.hh:1059
FuncProto::resolveExtraPop
void resolveExtraPop(void)
Assuming this prototype is locked, calculate the extrapop.
Definition: fspec.cc:3117
TransformVar::replacement
Varnode * replacement
The new explicit lane Varnode.
Definition: transform.hh:46
Address::operator-
Address operator-(int4 off) const
Decrement address by a number of bytes.
Definition: address.hh:404
TypeOpIntRight::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:459
ValueSetSolver::maxIterations
int4 maxIterations
Maximum number of iterations before forcing termination.
Definition: rangeutil.hh:297
rangemap::AddrRange::b
linetype b
End of full range occupied by the entire recordtype.
Definition: rangemap.hh:81
Datatype::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:303
PrototypePieces::innames
vector< string > innames
Identifiers for input types.
Definition: fspec.hh:1132
ActionPool::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: action.cc:890
OpFollow
A simple node used to dynamically define a sequence of operations.
Definition: userop.hh:169
JumpValues::getSize
virtual uintb getSize(void) const =0
Return the number of values the variables can take.
JumpTable::sanityCheck
void sanityCheck(Funcdata *fd)
Perform sanity check on recovered address targets.
Definition: jumptable.cc:2123
TransformOp::follow
TransformOp * follow
The following op after this (if not null)
Definition: transform.hh:79
ParamListStandard::unjustifiedContainer
virtual bool unjustifiedContainer(const Address &loc, int4 size, VarnodeData &res) const
Check if the given storage location looks like an unjustified parameter.
Definition: fspec.cc:980
ExecutablePcode::build
void build(void)
Initialize the Emulate object with the snippet p-code.
Definition: pcodeinject.cc:112
OpToken::spacing
int4 spacing
Spaces to print around operator.
Definition: printlanguage.hh:97
FuncProto::getComparableFlags
uint4 getComparableFlags(void) const
Get the comparable properties of this prototype.
Definition: fspec.hh:1411
ScopeInternal::restoreXml
virtual void restoreXml(const Element *el)
Restore this Scope from a <scope> XML tag.
Definition: database.cc:2603
TransformManager::placeInputs
void placeInputs(void)
Set input Varnodes for all new ops.
Definition: transform.cc:724
Varnode::calcCover
void calcCover(void) const
Turn on the Cover object for this Varnode.
Definition: varnode.cc:227
BlockGraph::markCopyBlock
static void markCopyBlock(FlowBlock *bl, uint4 fl)
Set properties on the first leaf FlowBlock.
Definition: block.cc:1159
PrintC::minusequal
static OpToken minusequal
The in-place subtraction operator.
Definition: printc.hh:104
RuleLogic2Bool
Convert logical to boolean operations: V & W => V && W, V | W => V || W
Definition: ruleaction.hh:518
OpBehaviorFloatNotEqual::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:357
MemoryBank::setChunk
void setChunk(uintb offset, int4 size, const uint1 *val)
Set values of an arbitrary sequence of bytes.
Definition: memstate.cc:300
MemoryState::getTranslate
Translate * getTranslate(void) const
Get the Translate object.
Definition: memstate.hh:179
build_defaultactions
void build_defaultactions(ActionDatabase &allacts)
Build the default actions.
Definition: coreaction.cc:4729
TrackedSet
vector< TrackedContext > TrackedSet
A set of tracked registers and their values (at one code point)
Definition: globalcontext.hh:74
StackSolver::guess
vector< StackEqn > guess
Guessed equations for underdetermined systems.
Definition: coreaction.cc:32
JumpBasicOverride::isOverride
virtual bool isOverride(void) const
Return true if this model was manually overridden.
Definition: jumptable.hh:443
ContextDatabase::getContextSize
virtual int4 getContextSize(void) const =0
Retrieve the number of words (uintm) in a context blob.
ProtoModel::assumedOutputExtension
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
ProtoParameter::isTypeLocked
virtual bool isTypeLocked(void) const =0
Is the parameter data-type locked.
PrintLanguage::opFloatNotEqual
virtual void opFloatNotEqual(const PcodeOp *op)=0
Emit a FLOAT_NOTEQUAL operator.
ParameterSymbol::getAddress
virtual Address getAddress(void) const
Get the storage address for this parameter.
Definition: fspec.cc:2322
EmulateSnippet::executeUnary
virtual void executeUnary(void)
Execute a unary arithmetic/logical operation.
Definition: emulateutil.cc:165
TypeStruct::getField
const TypeField * getField(int4 off, int4 sz, int4 *newoff) const
Get field based on offset.
Definition: type.cc:767
OpBehaviorIntDiv::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:460
PcodeOp::isFallthruTrue
bool isFallthruTrue(void) const
Return true if the fall-thru branch is taken when the boolean input is true.
Definition: op.hh:182
ActionLikelyTrash::traceTrash
static bool traceTrash(Varnode *vn, vector< PcodeOp * > &indlist)
Decide if the given Varnode only ever flows into CPUI_INDIRECT.
Definition: coreaction.cc:1958
Architecture::parseProto
ProtoModel * parseProto(const Element *el)
Build a proto-type model from an XML tag.
Definition: architecture.cc:721
ParamList::characterizeAsParam
virtual int4 characterizeAsParam(const Address &loc, int4 size) const =0
Characterize whether the given range overlaps parameter storage.
FuncProto::no_return
@ no_return
Function does not return.
Definition: fspec.hh:1153
TraceDAG::BadEdgeScore::trace
BlockTrace * trace
The active BlockTrace being considered.
Definition: blockaction.hh:146
ParamActive::testShrink
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
PrintC::opIntSborrow
virtual void opIntSborrow(const PcodeOp *op)
Emit a INT_SBORROW operator.
Definition: printc.hh:246
ActionHideShadow::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:956
Symbol::force_hex
@ force_hex
Force hexadecimal printing of constant symbol.
Definition: database.hh:177
EmitXml::tagType
virtual void tagType(const char *ptr, syntax_highlight hl, const Datatype *ct)
Emit a data-type identifier.
Definition: prettyprint.cc:216
ScopeInternal::beginDynamic
virtual list< SymbolEntry >::const_iterator beginDynamic(void) const
Beginning iterator to dynamic SymbolEntrys.
Definition: database.cc:1808
AddTreeState::multiple
vector< Varnode * > multiple
Varnodes which are multiples of size.
Definition: ruleaction.hh:35
PcodeInjectLibrary::registerExeScript
void registerExeScript(const string &scriptName, int4 injectid)
Map a p-code script name to a payload id.
Definition: pcodeinject.cc:235
InjectContext
Context needed to emit a p-code injection as a full set of p-code operations.
Definition: pcodeinject.hh:56
Datatype::hashName
static uint8 hashName(const string &nm)
Produce a data-type id by hashing the type name.
Definition: type.cc:313
FlowInfo::inlineSubFunction
bool inlineSubFunction(FuncCallSpecs *fc)
In-line the sub-function at the given call site.
Definition: flow.cc:1225
FlowInfo::unprocessed
vector< Address > unprocessed
Addresses which are permanently unprocessed.
Definition: flow.hh:85
OpToken::tokentype
tokentype
The possible types of operator token.
Definition: printlanguage.hh:84
UserOpManage::UserOpManage
UserOpManage(void)
Construct an empty manager.
Definition: userop.cc:296
JumpModelTrivial::findUnnormalized
virtual void findUnnormalized(uint4 maxaddsub, uint4 maxleftright, uint4 maxext)
Recover the unnormalized switch variable.
Definition: jumptable.hh:330
ParamEntry::extraChecks
void extraChecks(list< ParamEntry > &entry)
Check if this entry represents a joined parameter and requires extra scrutiny.
Definition: fspec.cc:399
TypeOpCast::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1602
TypeSpacebase::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:1147
ActionDeadCode::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3407
TypeArray::getSubType
virtual Datatype * getSubType(uintb off, uintb *newoff) const
Recover component data-type one-level down.
Definition: type.cc:481
AddrSpace::truncated
@ truncated
Space is truncated from its original size, expect pointers larger than this size.
Definition: space.hh:84
SeqNum::order
uintm order
Number for order comparisons within a block.
Definition: address.hh:114
BlockBasic::data
Funcdata * data
The function of which this block is a part.
Definition: block.hh:366
ActionDatabase::removeFromGroup
bool removeFromGroup(const string &grp, const string &basegroup)
Remove a group from a root Action.
Definition: action.cc:1059
RuleSubCommute::cancelExtensions
static bool cancelExtensions(PcodeOp *longform, PcodeOp *subOp, Varnode *ext0In, Varnode *ext1In, Funcdata &data)
Eliminate input extensions on given binary PcodeOp.
Definition: ruleaction.cc:4106
ConstantPoolGhidra::createRecord
virtual CPoolRecord * createRecord(const vector< uintb > &refs)
Allocate a new CPoolRecord object, given a reference to it.
Definition: cpool_ghidra.cc:24
ParamEntryRange
Class for storing ParamEntry objects in an interval range (rangemap)
Definition: fspec.hh:104
LoadTable
A description where and how data was loaded from memory.
Definition: jumptable.hh:41
ActionInferTypes::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:939
CollapseStructure::collapseAll
void collapseAll(void)
Run the whole algorithm.
Definition: blockaction.cc:1857
VarnodeData::offset
uintb offset
The offset within the space.
Definition: pcoderaw.hh:35
TransformOp::createReplacement
void createReplacement(Funcdata *fd)
Create the new/modified op this placeholder represents.
Definition: transform.cc:221
VarnodeData::size
uint4 size
The number of bytes in the location.
Definition: pcoderaw.hh:36
CoverBlock
The topological scope of a variable within a basic block.
Definition: cover.hh:35
Sleigh
Definition: sleigh.hh:105
TypeFactory::setCoreType
void setCoreType(const string &name, int4 size, type_metatype meta, bool chartp)
Create a core data-type.
Definition: type.cc:1256
ActionMultiCse
Perform Common Sub-expression Elimination on CPUI_MULTIEQUAL ops.
Definition: coreaction.hh:156
TypeArray::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:469
NameRecommend::size
int4 size
An optional/recommended size for the variable being stored.
Definition: varmap.hh:32
ScopeInternal::category
vector< vector< Symbol * > > category
References to Symbol objects organized by category.
Definition: database.hh:732
Equal2Form
Definition: double.hh:149
TypeFactory::concretize
Datatype * concretize(Datatype *ct)
Convert given data-type to concrete form.
Definition: type.cc:1905
BlockDoWhile::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:2977
JoinSpace
The pool of logically joined variables.
Definition: space.hh:218
Scope::restrictScope
virtual void restrictScope(Funcdata *f)
Convert this to a local Scope.
Definition: database.cc:1028
JumpTable::recoverLabels
bool recoverLabels(Funcdata *fd)
Recover the case labels for this jump-table.
Definition: jumptable.cc:2518
TokenSplit::tok
string tok
Characters of token (if any)
Definition: prettyprint.hh:328
ScopeInternal::endDynamic
virtual list< SymbolEntry >::const_iterator endDynamic(void) const
Ending iterator to dynamic SymbolEntrys.
Definition: database.cc:1814
MapIterator::map
const vector< EntryMap * > * map
The list of EntryMaps, one per address space.
Definition: database.hh:331
RuleFloatRange
Merge range conditions of the form: V f< c, c f< V, V f== c etc.
Definition: ruleaction.hh:308
LoadImageXml::pad
void pad(void)
Make sure every chunk is followed by at least 512 bytes of pad.
Definition: loadimage_xml.cc:143
JumpBasic::foldInNormalization
virtual Varnode * foldInNormalization(Funcdata *fd, PcodeOp *indop)
Do normalization of the given switch specific to this model.
Definition: jumptable.cc:1421
EmulateSnippet::executeCallind
virtual void executeCallind(void)
Standard behavior for a CALLIND.
Definition: emulateutil.cc:240
HighVariable::hasName
bool hasName(void) const
Check if this HighVariable can be named.
Definition: variable.cc:350
Funcdata::newIndirectOp
PcodeOp * newIndirectOp(PcodeOp *indeffect, const Address &addr, int4 size, uint4 extraFlags)
Find a representative CPUI_RETURN op for this function.
Definition: funcdata_op.cc:633
ProtoStoreInternal::setOutput
virtual ProtoParameter * setOutput(const ParameterPieces &piece)
Establish the data-type and storage of the return value.
Definition: fspec.cc:2670
Funcdata::endLoc
VarnodeLocSet::const_iterator endLoc(int4 s, const Address &addr, uint4 fl) const
End of Varnodes matching storage and properties.
Definition: funcdata.hh:325
RuleEqual2Zero::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5519
ContextDatabase::restoreTracked
static void restoreTracked(const Element *el, const AddrSpaceManager *manage, TrackedSet &vec)
Restore a sequence of tracked register values from an XML stream.
Definition: globalcontext.cc:90
ActionUnreachable::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2976
LoadTable::collapseTable
static void collapseTable(vector< LoadTable > &table)
Collapse a sequence of table descriptions.
Definition: jumptable.cc:51
BreakTableCallBack::registerAddressCallback
void registerAddressCallback(const Address &addr, BreakCallBack *func)
Register an address based breakpoint.
Definition: emulate.cc:43
ContextInternal::trackbase
partmap< Address, TrackedSet > trackbase
Partition map of tracked register sets.
Definition: globalcontext.hh:276
VolatileReadOp::restoreXml
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.cc:62
RuleShift2Mult::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3380
VarnodeBank::uniqbase
uintm uniqbase
Base for unique addresses.
Definition: varnode.hh:328
UserPcodeOp
The base class for a detailed definition of a user-defined p-code operation.
Definition: userop.hh:36
TypeFactory::getTypeArray
TypeArray * getTypeArray(int4 as, Datatype *ao)
Construct an array data-type.
Definition: type.cc:1807
RuleSubvarSubpiece::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1245
NameRecommend::symbolId
uint8 symbolId
Id associated with the original Symbol.
Definition: varmap.hh:34
VolatileWriteOp::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the symbol representing this operation in decompiled code.
Definition: userop.cc:68
FlowInfo::qlst
vector< FuncCallSpecs * > & qlst
The list of discovered sub-function call sites.
Definition: flow.hh:83
PcodeOp::insertiter
list< PcodeOp * >::iterator insertiter
Position in alive/dead list.
Definition: op.hh:119
Funcdata::stageJumpTable
int4 stageJumpTable(JumpTable *jt, PcodeOp *op, FlowInfo *flow)
Recover a jump-table for a given BRANCHIND using existing flow information.
Definition: funcdata_block.cc:488
PrintLanguage::Atom::Atom
Atom(const string &nm, tagtype t, EmitXml::syntax_highlight hl, const PcodeOp *o, const Varnode *v)
Construct a token with an associated PcodeOp and Varnode.
Definition: printlanguage.hh:223
OpBehaviorFloatNan
CPUI_FLOAT_NAN behavior.
Definition: opbehavior.hh:380
AddrSpaceManager::splitset
set< JoinRecord *, JoinRecordCompare > splitset
Different splits that have been defined in join space.
Definition: translate.hh:232
PrintC::assignment
static OpToken assignment
The assignment operator.
Definition: printc.hh:97
DocumentStorage::parseDocument
Document * parseDocument(istream &s)
Parse an XML document from the given stream.
EmulateFunction::executeCall
virtual void executeCall(void)
Standard behavior for a p-code CALL.
Definition: jumptable.cc:102
ActionPool::resetStats
virtual void resetStats(void)
Reset all the counts to zero.
Definition: action.cc:900
ScopeGhidra::ScopeGhidra
ScopeGhidra(ArchitectureGhidra *g)
Constructor.
Definition: database_ghidra.cc:20
PcodeOp::coderef
@ coderef
The first parameter to this op is a coderef.
Definition: op.hh:80
SubvariableFlow::newvarlist
list< ReplaceVarnode > newvarlist
Storage for subgraph variable nodes.
Definition: subflow.hh:87
ScopeInternal::clearCategory
virtual void clearCategory(int4 cat)
Clear all symbols of the given category from this scope.
Definition: database.cc:1901
CPUI_CALL
@ CPUI_CALL
Call to an absolute address.
Definition: opcodes.hh:44
Funcdata::setHighLevel
void setHighLevel(void)
Turn on HighVariable objects for all Varnodes.
Definition: funcdata_varnode.cc:471
MapState
A container for hints about the data-type layout of an address space.
Definition: varmap.hh:145
TypeOpFunc::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:316
Scope::stackCodeLabel
static const Scope * stackCodeLabel(const Scope *scope1, const Scope *scope2, const Address &addr, LabSymbol **addrmatch)
Definition: database.cc:1006
RuleIntLessEqual::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:194
OpBehavior::OpBehavior
OpBehavior(OpCode opc, bool isun)
A behavior constructor.
Definition: opbehavior.hh:80
PcodeOp::unimplemented
@ unimplemented
placeholder for unimplemented instruction
Definition: op.hh:92
ContextDatabase::setVariableRegion
void setVariableRegion(const string &nm, const Address &begad, const Address &endad, uintm value)
Set a context variable by name over a given range of addresses.
Definition: globalcontext.cc:207
PrototypePieces::name
string name
Identifier (function name) associated with prototype.
Definition: fspec.hh:1129
EmitXml::setIndentIncrement
void setIndentIncrement(int4 val)
Set the number of characters indented per level of nesting.
Definition: prettyprint.hh:212
EmitXml::startIndent
virtual int4 startIndent(void)
Start a new indent level.
Definition: prettyprint.hh:147
RuleEarlyRemoval::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:23
RawBinaryArchitecture
Architecture that reads its binary as a raw file.
Definition: raw_arch.hh:35
FlowInfo::newAddress
void newAddress(PcodeOp *from, const Address &to)
Register a new (non fall-thru) flow target.
Definition: flow.cc:204
Funcdata::fillinReadOnly
bool fillinReadOnly(Varnode *vn)
Replace the given Varnode with its (constant) value in the load image.
Definition: funcdata_varnode.cc:505
FuncProto::hasInputErrors
bool hasInputErrors(void) const
Has this prototype been marked as having an incorrect input parameter descriptions.
Definition: fspec.hh:1265
RuleShiftCompare::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2057
FuncCallSpecs::buildParam
Varnode * buildParam(Funcdata &data, Varnode *vn, ProtoParameter *param, Varnode *stackref)
Build a Varnode representing a specific parameter.
Definition: fspec.cc:4072
UserOpManage::parseJumpAssist
void parseJumpAssist(const Element *el, Architecture *glb)
Parse a <jumpassist> XML tag.
Definition: userop.cc:484
RuleTrivialShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3171
RuleRangeMeld::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1384
ActionInferTypes::canonicalReturnOp
static PcodeOp * canonicalReturnOp(Funcdata &data)
Definition: coreaction.cc:4565
FlowBlock::hasLoopIn
bool hasLoopIn(void) const
Is there a looping edge coming into this block.
Definition: block.cc:398
PcodeOp::previousOp
PcodeOp * previousOp(void) const
Return the previous op within this op's basic block or null.
Definition: op.cc:244
RuleIgnoreNan::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:8144
JumpTable::block2Position
int4 block2Position(const FlowBlock *bl) const
Convert a basic-block to an out-edge index from the switch.
Definition: jumptable.cc:2163
BlockInfLoop
An infinite loop structure.
Definition: block.hh:613
Varnode::high
HighVariable * high
High-level variable of which this is an instantiation.
Definition: varnode.hh:132
OpBehaviorFloatFloor
CPUI_FLOAT_FLOOR behavior.
Definition: opbehavior.hh:476
TransformVar::initialize
void initialize(uint4 tp, Varnode *v, int4 bits, int4 bytes, uintb value)
Initialize this variable from raw data.
Definition: transform.hh:197
RuleOrMask
Simplify INT_OR with full mask: V = W | 0xffff => V = W
Definition: ruleaction.hh:111
VarnodeCompareDefLoc
Compare two Varnode pointers by definition then location.
Definition: varnode.hh:39
TypeOpIntScarry
Information about the INT_SCARRY op-code.
Definition: typeop.hh:391
ArchitectureCapability::minorversion
static const uint4 minorversion
Current minor version of decompiler.
Definition: architecture.hh:72
PcodeOp::collapse
uintb collapse(bool &markedInput) const
Calculate the constant output produced by this op.
Definition: op.cc:337
BlockBasic::cover
RangeList cover
Original range of addresses covered by this basic block.
Definition: block.hh:367
TypeSpacebase::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:375
TypeOpBoolOr::TypeOpBoolOr
TypeOpBoolOr(TypeFactory *t)
Constructor.
Definition: typeop.cc:1349
TypeOpExtract::TypeOpExtract
TypeOpExtract(TypeFactory *t)
Constructor.
Definition: typeop.cc:1849
EffectRecord::return_address
@ return_address
The memory is being used to pass back a return value from the sub-function.
Definition: fspec.hh:310
EmitPrettyPrint::tagField
virtual void tagField(const char *ptr, syntax_highlight hl, const Datatype *ct, int4 off)
Emit an identifier for a field within a structured data-type.
Definition: prettyprint.cc:1035
InjectPayload::CALLMECHANISM_TYPE
@ CALLMECHANISM_TYPE
Injection to patch up data-flow around the caller/callee boundary.
Definition: pcodeinject.hh:83
RuleDivTermAdd::findSubshift
static PcodeOp * findSubshift(PcodeOp *op, int4 &n, OpCode &shiftopc)
Check for shift form of expression.
Definition: ruleaction.cc:6640
OptionInPlaceOps
Toggle whether in-place operators (+=, *=, &=, etc.) are emitted by the decompiler.
Definition: options.hh:129
FuncProto::setInternal
void setInternal(ProtoModel *m, Datatype *vt)
Set internal backing storage for this.
Definition: fspec.cc:3040
Range::contains
bool contains(const Address &addr) const
Determine if the address is in this Range.
Definition: address.hh:458
LoadImageSection::flags
uint4 flags
Properties of the section.
Definition: loadimage.hh:55
JumpModel::jumptable
JumpTable * jumptable
The jump-table that is building this model.
Definition: jumptable.hh:234
PrintLanguage::fieldtoken
@ fieldtoken
Emit atom as structure field.
Definition: printlanguage.hh:161
ActionMarkExplicit::checkNewToConstructor
static void checkNewToConstructor(Funcdata &data, Varnode *vn)
Set special properties on output of CPUI_NEW.
Definition: coreaction.cc:2716
Attributes::value
vector< string * > value
List of values for each formal XML attribute.
Definition: xml.hh:41
RegisterProgram::pspec
string pspec
Processor specification to configure with.
Definition: ghidra_process.hh:103
PcodeOp::getEvalType
uint4 getEvalType(void) const
Get the evaluation type of this op.
Definition: op.hh:160
FloatFormat::nan
@ nan
An invalid encoding, Not-a-Number.
Definition: float.hh:37
ActionConstantPtr::selectInferSpace
static AddrSpace * selectInferSpace(Varnode *vn, PcodeOp *op, const vector< AddrSpace * > &spaceList)
Select the AddrSpace in which we infer with the given constant is a pointer.
Definition: coreaction.cc:986
PropagationState::op
PcodeOp * op
The current descendant or the defining PcodeOp.
Definition: coreaction.hh:1029
EmitNoXml::tagComment
virtual void tagComment(const char *ptr, syntax_highlight hl, const AddrSpace *spc, uintb off)
Emit a comment string as part of the generated source code.
Definition: prettyprint.hh:250
ScopeMapper::first
Address first
The first address of the range.
Definition: database.hh:811
ScopeLocal::buildVariableName
virtual string buildVariableName(const Address &addr, const Address &pc, Datatype *ct, int4 &index, uint4 flags) const
Given an address and data-type, build a suitable generic symbol name.
Definition: varmap.cc:396
PrintC::pushBoolConstant
void pushBoolConstant(uintb val, const TypeBase *ct, const Varnode *vn, const PcodeOp *op)
Push a true or false token to the RPN stack.
Definition: printc.cc:1191
TraceDAG::BranchPoint::ismark
bool ismark
Possible mark.
Definition: blockaction.hh:106
FloatFormat::opTrunc
uintb opTrunc(uintb a, int4 sizeout) const
Convert floating-point to integer.
Definition: float.cc:516
ScopeGhidra::addSymbol
virtual SymbolEntry * addSymbol(const string &name, Datatype *ct, const Address &addr, const Address &usepoint)
Add a new Symbol to this Scope, given a name, data-type, and a single mapping.
Definition: database_ghidra.cc:388
ScopeGhidra::ghidra
ArchitectureGhidra * ghidra
Architecture and connection to the Ghidra client.
Definition: database_ghidra.hh:36
FuncProto::flags
uint4 flags
Boolean properties of the function prototype.
Definition: fspec.hh:1167
TypeOpReturn::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:295
TokenSplit::tagVariable
void tagVariable(const char *ptr, EmitXml::syntax_highlight h, const Varnode *v, const PcodeOp *o)
Create a variable identifier token.
Definition: prettyprint.hh:443
AddrSpaceManager::constructFloatExtensionAddress
Address constructFloatExtensionAddress(const Address &realaddr, int4 realsize, int4 logicalsize)
Build a logically lower precision storage location for a bigger floating point register.
Definition: translate.cc:725
Funcdata::typerecovery_on
@ typerecovery_on
Set if data-type recovery is started.
Definition: funcdata.hh:52
FuncCallSpecs::stackPlaceholderSlot
int4 stackPlaceholderSlot
Slot containing temporary stack tracing placeholder (-1 means unused)
Definition: fspec.hh:1443
space.hh
Classes for describing address spaces.
ActionDeindirect::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1148
RuleShiftCompare
Transform shifts in comparisons: V >> c == d => V == (d << c)
Definition: ruleaction.hh:398
ExecutablePcode::source
string source
Description of the source of this snippet.
Definition: pcodeinject.hh:136
Comment::type
uint4 type
The properties associated with the comment.
Definition: comment.hh:39
TypeOpCast
Information about the CAST op-code.
Definition: typeop.hh:708
Comment::user2
@ user2
The second user defined property.
Definition: comment.hh:48
CollapseStructure::checkSwitchSkips
bool checkSwitchSkips(FlowBlock *switchbl, FlowBlock *exitblock)
Check for switch edges that go straight to the exit block.
Definition: blockaction.cc:1587
InjectContext::inputlist
vector< VarnodeData > inputlist
Storage location for input parameters.
Definition: pcodeinject.hh:62
FuncProto::is_destructor
@ is_destructor
Function is an (object-oriented) destructor.
Definition: fspec.hh:1160
PcodeOp::removeInput
void removeInput(int4 slot)
Eliminate a specific input Varnode.
Definition: op.cc:201
JumpModelTrivial::clone
virtual JumpModel * clone(JumpTable *jt) const
Clone this model.
Definition: jumptable.cc:406
InjectPayload
An active container for a set of p-code operations that can be injected into data-flow.
Definition: pcodeinject.hh:78
PcodeOp::marker
@ marker
Definition: op.hh:73
ActionBlockStructure::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: blockaction.hh:299
PcodeInjectLibrary::callOtherTarget
vector< string > callOtherTarget
Map from injectid to callother-fixup target-op name.
Definition: pcodeinject.hh:172
InjectCallfixupGhidra
A call-fixup injection that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:50
TraceDAG::BlockTrace::destnode
FlowBlock * destnode
Next FlowBlock node this BlockTrace will try to push into.
Definition: blockaction.hh:130
FuncProto::cancelInjectId
void cancelInjectId(void)
Turn-off any in-lining for this function.
Definition: fspec.cc:3169
RangeHint::absorb
bool absorb(RangeHint *b)
Try to absorb the other RangeHint into this.
Definition: varmap.cc:107
SubfloatFlow::precision
int4 precision
Number of bytes of precision in the logical flow.
Definition: subflow.hh:151
ScopeInternal::multiEntrySet
SymbolNameTree multiEntrySet
Set of symbols with multiple entries.
Definition: database.hh:734
Architecture::defaultfp
ProtoModel * defaultfp
Parsed form of default prototype.
Definition: architecture.hh:138
TypeOpIntScarry::TypeOpIntScarry
TypeOpIntScarry(TypeFactory *t)
Constructor.
Definition: typeop.cc:1019
ValueSetSolver::readNodes
map< SeqNum, ValueSetRead > readNodes
Additional, after iteration, add-on value sets.
Definition: rangeutil.hh:290
ScoreProtoModel::ScoreProtoModel
ScoreProtoModel(bool isinput, const ProtoModel *mod, int4 numparam)
Constructor.
Definition: fspec.cc:2048
Database::nextScopeId
uint4 nextScopeId
Id for next attached scope (0 reserved for global scope)
Definition: database.hh:843
TypeOpCpoolref::cpool
ConstantPool * cpool
The constant pool container.
Definition: typeop.hh:762
HeritageInfo
Information about heritage passes performed for a specific address space.
Definition: heritage.hh:85
FloatFormat::zero
@ zero
An encoding of the value zero.
Definition: float.hh:36
AddrSpace::getPointerLowerBound
uintb getPointerLowerBound(void) const
Get lower bound for assuming an offset is a pointer.
Definition: space.hh:346
EmitNoXml::endFunction
virtual void endFunction(int4 id)
End a whole declaration and body of a function.
Definition: prettyprint.hh:226
TokenSplit::tagLine
void tagLine(void)
Create a line break token.
Definition: prettyprint.hh:578
Database::globalscope
Scope * globalscope
A quick reference to the global Scope.
Definition: database.hh:840
Heritage::protectFreeStores
bool protectFreeStores(AddrSpace *spc, vector< PcodeOp * > &freeStores)
Identify any CPUI_STORE ops that use a free pointer from a given address space.
Definition: heritage.cc:792
RulePropagateCopy::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:642
PreferSplitManager
Definition: prefersplit.hh:29
Scope::buildUndefinedName
virtual string buildUndefinedName(void) const =0
Build a formal undefined name, used internally when a Symbol is not given a name.
RuleLess2Zero::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5217
PrintJava::adjustTypeOperators
virtual void adjustTypeOperators(void)
Set basic data-type information for p-code operators.
Definition: printjava.cc:99
EmitPrettyPrint::checkstart
void checkstart(void)
Enforce whitespace for a start token.
Definition: prettyprint.cc:794
TypeOp::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:188
ActionUnreachable::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:482
OpBehaviorIntSlessEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:201
RuleSegment::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7212
TypeOpFloatAdd::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:583
PrintLanguage::pushOp
void pushOp(const OpToken *tok, const PcodeOp *op)
Push an operator token onto the RPN stack.
Definition: printlanguage.cc:117
AddrSpaceManager::getDefaultCodeSpace
AddrSpace * getDefaultCodeSpace(void) const
Get the default address space of this processor.
Definition: translate.hh:490
FuncProto::unjustifiedInputParam
bool unjustifiedInputParam(const Address &addr, int4 size, VarnodeData &res) const
Check if the given storage location looks like an unjustified input parameter.
Definition: fspec.cc:3499
HighVariable::numMergeClasses
int4 numMergeClasses
Number of different speculative merge classes in this.
Definition: variable.hh:60
ghidra_context.hh
Obtaining context information from a Ghidra client.
CircleRange::newDomain
static bool newDomain(uintb newMask, int4 newStep, uintb &myleft, uintb &myright)
Make this range fit in a new domain.
Definition: rangeutil.cc:141
TypeOpFunc::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:304
SubvariableFlow::traceBackward
bool traceBackward(ReplaceVarnode *rvn)
Trace the logical data-flow backward for the given subgraph variable.
Definition: subflow.cc:608
CollapseStructure::finaltrace
bool finaltrace
Have we a made search for unstructured edges in the final DAG.
Definition: blockaction.hh:191
MapState::MapState
MapState(AddrSpace *spc, const RangeList &rn, const RangeList &pm, Datatype *dt)
Constructor.
Definition: varmap.cc:703
ConditionalJoin::cbranch2
PcodeOp * cbranch2
CBRANCH at bottom of block2.
Definition: blockaction.hh:250
Symbol::isolate
@ isolate
Symbol should not speculatively merge automatically.
Definition: database.hh:183
TransformVar::input_duplicate
@ input_duplicate
This is a piece of an input that has already been visited.
Definition: transform.hh:42
AddrSpaceManager::splitlist
vector< JoinRecord * > splitlist
JoinRecords indexed by join address.
Definition: translate.hh:233
RuleLeftRight::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:391
PrintC::xorequal
static OpToken xorequal
The in-place logical xor operator.
Definition: printc.hh:109
Merge::markRedundantCopies
void markRedundantCopies(HighVariable *high, vector< PcodeOp * > &copy, int4 pos, int4 size)
Search for and mark redundant COPY ops into the given high as non-printing.
Definition: merge.cc:1139
Varnode
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
PcodeInjectLibrary::registerCallOtherFixup
void registerCallOtherFixup(const string &fixupName, int4 injectid)
Map a callother-fixup name to a payload id.
Definition: pcodeinject.cc:203
ArchitectureGhidra::readResponseEnd
static void readResponseEnd(istream &s)
Read the ending query response protocol marker.
Definition: ghidra_arch.cc:196
Database::clearResolveRecursive
void clearResolveRecursive(Scope *scope)
Clear the ownership ranges of a given Scope and its children.
Definition: database.cc:2749
ProtoModel::output
ParamList * output
Resource model for output parameters.
Definition: fspec.hh:621
ContextDatabase::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage)=0
Restore the state of this database object from a serialized XML stream.
prettyprint.hh
Routines for emitting high-level (C) language syntax in a well formatted way.
TransformManager::apply
void apply(void)
Apply the full transform to the function.
Definition: transform.cc:740
LoopBody::exitblock
FlowBlock * exitblock
Official exit block from loop, or NULL.
Definition: blockaction.hh:49
RuleConditionalMove::BoolExpress::mustreconstruct
bool mustreconstruct
Must make a copy of final boolean operation.
Definition: ruleaction.hh:1358
PrintLanguage::opStore
virtual void opStore(const PcodeOp *op)=0
Emit a STORE operator.
RuleSignNearMult
Simplify division form: (V + (V s>> 0x1f)>>(32-n)) & (-1<<n) => (V s/ 2^n) * 2^n
Definition: ruleaction.hh:1198
ValueSetSolver::generateConstraints
void generateConstraints(const vector< Varnode * > &worklist, const vector< PcodeOp * > &reads)
Generate constraints given a system of Varnodes.
Definition: rangeutil.cc:2234
FlowBlock::visitcount
int4 visitcount
A count of visits of this node for various algorithms.
Definition: block.hh:112
Varnode::externref
@ externref
Varnode address is specially mapped by the loader.
Definition: varnode.hh:89
RangeList
A disjoint set of Ranges, possibly across multiple address spaces.
Definition: address.hh:203
EmulatePcodeCache::breaktable
BreakTable * breaktable
The table of breakpoints.
Definition: emulate.hh:301
ContextInternal::FreeArray::size
int4 size
The number of words in the array.
Definition: globalcontext.hh:266
TypeFactory::clear
void clear(void)
Clear out all types.
Definition: type.cc:1325
InjectContext::calladdr
Address calladdr
If the instruction being injected is a call, this is the address being called.
Definition: pcodeinject.hh:61
ActionMarkExplicit::multipleInteraction
static int4 multipleInteraction(vector< Varnode * > &multlist)
Find multiple descendant chains.
Definition: coreaction.cc:2606
TypeOpSegment::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1725
RuleStoreVarnode::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3974
PrintLanguage::force_pointer
@ force_pointer
Force '*' notation for pointers.
Definition: printlanguage.hh:142
FlowInfo::splitBasic
void splitBasic(void)
Split raw p-code ops up into basic blocks.
Definition: flow.cc:956
RuleLess2Zero
Simplify INT_LESS applied to extremal constants.
Definition: ruleaction.hh:944
BlockList::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:499
PcodeOpRaw::getAddr
const Address & getAddr(void) const
Get address of this operation.
Definition: pcoderaw.hh:166
Heritage::depth
vector< int4 > depth
Dominator depth of individual blocks.
Definition: heritage.hh:207
BlockCopy::printTree
virtual void printTree(ostream &s, int4 level) const
Print tree structure of any blocks owned by this.
Definition: block.cc:2608
EmitXml::endFunction
virtual void endFunction(int4 id)
End a whole declaration and body of a function.
Definition: prettyprint.cc:52
Funcdata::big_varnodes_generated
@ big_varnodes_generated
Set when search for laned registers is complete.
Definition: funcdata.hh:60
TypeOpPtrsub::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:1671
EmulatePcodeOp::executeCbranch
virtual bool executeCbranch(void)
Check if the conditional of a CBRANCH is true.
Definition: emulateutil.cc:85
ValueSetSolver::ValueSetEdge::vn
Varnode * vn
The Varnode attached to a normal ValueSet node (or NULL)
Definition: rangeutil.hh:282
RuleRightShiftAnd::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:622
MemoryBank::getSpace
AddrSpace * getSpace(void) const
Get the address space associated with this memory bank.
Definition: memstate.hh:82
ConstantPoolInternal::clear
virtual void clear(void)
Release any (local) resources.
Definition: cpool.hh:195
EmulateFunction::executeBranch
virtual void executeBranch(void)
Standard behavior for a BRANCH.
Definition: jumptable.cc:90
TypeOpLoad::TypeOpLoad
TypeOpLoad(TypeFactory *t)
Constructor.
Definition: typeop.cc:358
SubvariableFlow::ReplaceVarnode::replacement
Varnode * replacement
The new smaller Varnode.
Definition: subflow.hh:45
EmitPrettyPrint::leftotal
int4 leftotal
Definition: prettyprint.hh:708
ScopeInternal::findFunction
virtual Funcdata * findFunction(const Address &addr) const
Find the function starting at the given address.
Definition: database.cc:2184
CommentOrder::operator()
bool operator()(const Comment *a, const Comment *b) const
Comparison operator.
Definition: comment.cc:119
PcodeInjectLibrary::restoreXmlInject
int4 restoreXmlInject(const string &src, const string &nm, int4 tp, const Element *el)
Read in and register an injection payload from an XML stream.
Definition: pcodeinject.cc:319
JumpTable::recoverMultistage
void recoverMultistage(Funcdata *fd)
Recover jump-table addresses keeping track of a possible previous stage.
Definition: jumptable.cc:2474
BlockCondition::saveXmlHeader
virtual void saveXmlHeader(ostream &s) const
Save basic information as XML attributes.
Definition: block.cc:2825
TypeOpNotEqual::TypeOpNotEqual
TypeOpNotEqual(TypeFactory *t)
Constructor.
Definition: typeop.cc:831
PcodeOp::indirect_store
@ indirect_store
CPUI_INDIRECT is caused by CPUI_STORE.
Definition: op.hh:100
TypeFactory::findNoName
Datatype * findNoName(Datatype &ct)
Find data-type (in this container) by function.
Definition: type.cc:1411
PrintLanguage::Atom::name
const string & name
The actual printed characters of the token.
Definition: printlanguage.hh:195
ProtoModelMerged::foldIn
void foldIn(ProtoModel *model)
Fold-in an additional prototype model.
Definition: fspec.cc:2175
ParamListStandard::resolverMap
vector< ParamEntryResolver * > resolverMap
Map from space id to resolver.
Definition: fspec.hh:499
FlowInfo::block_edge1
list< PcodeOp * > block_edge1
Source p-code op (Edges between basic blocks)
Definition: flow.hh:90
ParamEntry::getSlot
int4 getSlot(const Address &addr, int4 skip) const
Calculate the slot occupied by a specific address.
Definition: fspec.cc:231
TransformManager::newOps
list< TransformOp > newOps
Storage for PcodeOp placeholder nodes.
Definition: transform.hh:154
OpBehaviorFloatSub
CPUI_FLOAT_SUB behavior.
Definition: opbehavior.hh:412
BfdArchitecture::resolveArchitecture
virtual void resolveArchitecture(void)
Figure out the processor and compiler of the target executable.
Definition: bfd_arch.cc:82
PrintC::opCallind
virtual void opCallind(const PcodeOp *op)
Emit a CALLIND operator.
Definition: printc.cc:482
LoadTable::saveXml
void saveXml(ostream &s) const
Save a description of this as an <loadtable> XML tag.
Definition: jumptable.cc:21
InjectParameter::size
uint4 size
Size of the parameter Varnode in bytes.
Definition: pcodeinject.hh:37
RuleDivTermAdd::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6539
ParamListStandard::entry
list< ParamEntry > entry
The ordered list of parameter entries.
Definition: fspec.hh:498
PcodeInjectLibraryGhidra::getBehaviors
virtual const vector< OpBehavior * > & getBehaviors(void)
Get the array of op-code behaviors for initializing and emulator.
Definition: inject_ghidra.cc:202
PrintC::rightequal
static OpToken rightequal
The in-place right shift operator.
Definition: printc.hh:106
FuncCallSpecs::hasEffectTranslate
uint4 hasEffectTranslate(const Address &addr, int4 size) const
Calculate type of side-effect for a given storage location (with caller translation)
Definition: fspec.cc:4947
PrintLanguage::nofallthru
@ nofallthru
Fall-thru no longer exists.
Definition: printlanguage.hh:150
TypeVoid
Formal "void" data-type object.
Definition: type.hh:206
Varnode::coverdirty
@ coverdirty
Cover is not upto date.
Definition: varnode.hh:102
LanguageDescription::processor
string processor
Name of processor.
Definition: sleigh_arch.hh:50
ContextInternal::database
partmap< Address, FreeArray > database
Partition map of context blobs (FreeArray)
Definition: globalcontext.hh:275
TokenSplit::bump_t
@ bump_t
Required line break.
Definition: prettyprint.hh:322
FuncProto::paramshift_applied
@ paramshift_applied
paramshift parameters have been added and removed
Definition: fspec.hh:1154
RangeList::tree
set< Range > tree
The sorted list of Range objects.
Definition: address.hh:204
RuleConditionalMove::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1369
ArchitectureCapability::findCapability
static ArchitectureCapability * findCapability(const string &filename)
Find an extension to process a file.
Definition: architecture.cc:41
PrintC::option_nocasts
bool option_nocasts
Don't print a cast if true.
Definition: printc.hh:118
PrintLanguage::opCbranch
virtual void opCbranch(const PcodeOp *op)=0
Emit a CBRANCH operator.
BlockIf::preferComplement
virtual bool preferComplement(Funcdata &data)
Rearrange this hierarchy to simplify boolean expressions.
Definition: block.cc:2859
AddrSpaceManager::shortcut2Space
map< int4, AddrSpace * > shortcut2Space
Map from shortcut -> space.
Definition: translate.hh:222
MemoryState
All storage/state for a pcode machine.
Definition: memstate.hh:148
ProtoModel::getMaxInputDelay
int4 getMaxInputDelay(void) const
Return the maximum heritage delay across all possible input parameters.
Definition: fspec.hh:822
JumpBasic2
A basic jump-table model with an added default address path.
Definition: jumptable.hh:405
TreeHandler
A SAX interface implementation for constructing an in-memory DOM model.
Definition: xml.hh:217
RulePushMulti::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:251
PrintLanguage::emitExpression
virtual void emitExpression(const PcodeOp *op)=0
Emit a full expression.
OpBehaviorBoolAnd::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:520
Emulate::executeCallind
virtual void executeCallind(void)=0
Standard behavior for a CALLIND.
PrintC::opFloatAdd
virtual void opFloatAdd(const PcodeOp *op)
Emit a FLOAT_ADD operator.
Definition: printc.hh:269
ArchitectureGhidra::getPcodeInject
Document * getPcodeInject(const string &name, int4 type, const InjectContext &con)
Retrieve p-code to inject for a specific context.
Definition: ghidra_arch.cc:633
Comment::user3
@ user3
The third user defined property.
Definition: comment.hh:49
OpBehaviorIntLessEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:228
SleighArchitecture::isTranslateReused
bool isTranslateReused(void)
Test if last Translate object can be reused.
Definition: sleigh_arch.cc:138
BlockMap::sortlist
vector< FlowBlock * > sortlist
The list of deserialized FlowBlock objects.
Definition: block.hh:688
FlowInfo::ignore_outofbounds
@ ignore_outofbounds
Ignore/truncate flow into addresses out of the specified range.
Definition: flow.hh:58
TermOrder
A class for ordering Varnode terms in an additive expression.
Definition: coreaction.hh:1056
PropagationState::PropagationState
PropagationState(Varnode *v)
Constructor.
Definition: coreaction.cc:4367
LoopBody::setExitMarks
void setExitMarks(FlowBlock *graph)
Mark all the exits to this loop.
Definition: blockaction.cc:409
AddrSpace::type
spacetype type
Type of space (PROCESSOR, CONSTANT, INTERNAL, ...)
Definition: space.hh:94
PrintJava::opCpoolRefOp
virtual void opCpoolRefOp(const PcodeOp *op)
Emit a CPOOLREF operator.
Definition: printjava.cc:251
PrintLanguage::modstack
vector< uint4 > modstack
Printing modification stack.
Definition: printlanguage.hh:232
ArchitectureGhidra::getPcodePacked
uint1 * getPcodePacked(const Address &addr)
Get p-code for a single instruction.
Definition: ghidra_arch.cc:455
Funcdata::no_code
@ no_code
Set if there is no code available for this function.
Definition: funcdata.hh:53
RuleHighOrderAnd::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1239
JumpValuesRangeDefault::extravn
Varnode * extravn
The starting Varnode associated with the extra value.
Definition: jumptable.hh:205
OpBehaviorFloatEqual::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:349
ContextBitRange::getValue
uintm getValue(const uintm *vec) const
Retrieve this value from a given context blob.
Definition: globalcontext.hh:58
FuncCallSpecs::transferLockedInputParam
int4 transferLockedInputParam(ProtoParameter *param)
Get the index of the CALL input Varnode that matches the given parameter.
Definition: fspec.cc:4105
FlowInfo::injectSubFunction
bool injectSubFunction(FuncCallSpecs *fc)
Perform injection replacing the CALL at the given call site.
Definition: flow.cc:1247
AddrSpace::has_nearpointers
@ has_nearpointers
Does there exist near pointers into this space.
Definition: space.hh:87
OptionDatabase::optionmap
map< string, ArchOption * > optionmap
A map from option name to registered ArchOption instance.
Definition: options.hh:65
ArchitectureGhidra::cspecxml
string cspecxml
XML cspec passed from Ghidra.
Definition: ghidra_arch.hh:65
ActionConstantPtr::isPointer
static SymbolEntry * isPointer(AddrSpace *spc, Varnode *vn, PcodeOp *op, int4 slot, Address &rampoint, uintb &fullEncoding, Funcdata &data)
Determine if given Varnode might be a pointer constant.
Definition: coreaction.cc:1024
SleighBase::buildXrefs
void buildXrefs(vector< string > &errorPairs)
Build register map. Collect user-ops and context-fields.
Definition: sleighbase.cc:31
TypeOpBoolOr::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:541
TypeOpFloatCeil::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:653
PrintLanguage::instr_comment_type
uint4 instr_comment_type
Type of instruction comments to display.
Definition: printlanguage.hh:246
RuleSignShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3201
Emulate::executeNew
virtual void executeNew(void)=0
Standard behavior for (low-level) NEW op.
CommentDatabaseGhidra::endComment
virtual CommentSet::const_iterator endComment(const Address &fad) const
Get an iterator to the ending of comments for a single function.
Definition: comment_ghidra.cc:77
Address::m_minimal
@ m_minimal
Smallest possible address.
Definition: address.hh:53
VolatileOp::appendSize
static string appendSize(const string &base, int4 size)
Append a suffix to a string encoding a specific size.
Definition: userop.cc:39
RuleHumptyOr::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4913
ActionMultiCse::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:162
Varnode::activeheritage
@ activeheritage
The varnode is actively being heritaged.
Definition: varnode.hh:112
FloatingEdge
Class for holding an edge while the underlying graph is being manipulated.
Definition: blockaction.hh:29
SubvariableFlow::addSuggestedPatch
void addSuggestedPatch(ReplaceVarnode *rvn, PcodeOp *pushop, int4 sa)
Mark a subgraph variable flowing to an operation that expands it by padding with zero bits.
Definition: subflow.cc:1117
PcodeInjectLibrary::callOtherFixupMap
map< string, int4 > callOtherFixupMap
Map of registered callother-fixup names to injection id.
Definition: pcodeinject.hh:168
PrintLanguage::pushPartialSymbol
virtual void pushPartialSymbol(const Symbol *sym, int4 off, int4 sz, const Varnode *vn, const PcodeOp *op, Datatype *outtype)=0
Push a variable that represents only part of a symbol onto the RPN stack.
LanedRegister
Describes a (register) storage location and the ways it might be split into lanes.
Definition: transform.hh:88
VarnodeBank::xref
Varnode * xref(Varnode *vn)
Insert a Varnode into the sorted lists.
Definition: varnode.cc:915
OpBehaviorFloatRound::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:485
MemoryBank::setValue
void setValue(uintb offset, int4 size, uintb val)
Set the value of a (small) range of bytes.
Definition: memstate.cc:180
Heritage::splitJoinRead
void splitJoinRead(Varnode *vn, JoinRecord *joinrec)
Construct pieces for a join-space Varnode read by an operation.
Definition: heritage.cc:1689
JumpBasic::buildLabels
virtual void buildLabels(Funcdata *fd, vector< Address > &addresstable, vector< uintb > &label, const JumpModel *orig) const
Recover case labels associated with the Address table.
Definition: jumptable.cc:1381
Funcdata::newUniqueOut
Varnode * newUniqueOut(int4 s, PcodeOp *op)
Create a new temporary output Varnode.
Definition: funcdata_varnode.cc:122
RuleSlessToLess
Convert INT_SLESS to INT_LESS when comparing positive values.
Definition: ruleaction.hh:468
LoadImage::~LoadImage
virtual ~LoadImage(void)
LoadImage destructor.
Definition: loadimage.hh:119
PcodeOpEdge::slot
int4 slot
The input slot of the term.
Definition: coreaction.hh:1040
JumpTable::addBlockToSwitch
void addBlockToSwitch(BlockBasic *bl, uintb lab)
Force a given basic-block to be a switch destination.
Definition: jumptable.cc:2339
sign_extend
uintb sign_extend(uintb in, int4 sizein, int4 sizeout)
Sign-extend a value between two byte sizes.
Definition: address.cc:604
TypeOpEqual
Information about the INT_EQUAL op-code.
Definition: typeop.hh:301
TypeField::offset
int4 offset
Offset (into containing struct) of subfield.
Definition: type.hh:125
OpBehaviorIntSless
CPUI_INT_SLESS behavior.
Definition: opbehavior.hh:145
TreeHandler::setEncoding
virtual void setEncoding(const string &val)
Set the character encoding as specified by the current document.
Definition: xml.hh:237
HeritageInfo::warningissued
bool warningissued
true if warning issued previously
Definition: heritage.hh:92
Override::stringToType
static uint4 stringToType(const string &nm)
Convert a string to a flow override type.
Definition: override.cc:434
ActionPool::print
virtual int4 print(ostream &s, int4 num, int4 depth) const
Print a description of this Action to stream.
Definition: action.cc:736
ExecutablePcodeGhidra::restoreXml
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.cc:136
ActionSpacebase::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:267
Scope::addMapInternal
virtual SymbolEntry * addMapInternal(Symbol *sym, uint4 exfl, const Address &addr, int4 off, int4 sz, const RangeList &uselim)=0
Create a new SymbolEntry for a Symbol given a memory range.
TreeHandler::setDocumentLocator
virtual void setDocumentLocator(Locator locator)
Set the Locator object for documents.
Definition: xml.hh:224
ScopeInternal::findByName
virtual void findByName(const string &name, vector< Symbol * > &res) const
Find a Symbol by name within this Scope.
Definition: database.cc:2268
BlockIf::gototype
uint4 gototype
The type of unstructured edge (if present)
Definition: block.hh:554
ValueSetSolver::constraintsFromPath
void constraintsFromPath(int4 type, CircleRange &lift, Varnode *startVn, Varnode *endVn, PcodeOp *cbranch)
Generate constraints given a Varnode path.
Definition: rangeutil.cc:2171
BlockGraph::removeBlock
void removeBlock(FlowBlock *bl)
Remove a FlowBlock from this BlockGraph.
Definition: block.cc:1417
UserOpManage::~UserOpManage
~UserOpManage(void)
Destructor.
Definition: userop.cc:303
RawLoadImage::thefile
ifstream * thefile
Main file stream for image.
Definition: loadimage.hh:98
TypeOpNew
Information about the NEW op-code.
Definition: typeop.hh:773
BlockSwitch::CaseOrder::outindex
int4 outindex
Index coming out of switch to this case.
Definition: block.hh:639
MemoryHashOverlay::find
virtual uintb find(uintb addr) const
Overridden aligned word find.
Definition: memstate.cc:573
Varnode::intersects
bool intersects(const Varnode &op) const
Return true if the storage locations intersect.
Definition: varnode.cc:113
ParamActive
Container class for ParamTrial objects.
Definition: fspec.hh:223
TokenSplit::op
const PcodeOp * op
Pcode-op associated with this token.
Definition: prettyprint.hh:331
EmulateFunction::varnodeMap
map< Varnode *, uintb > varnodeMap
Light-weight memory state based on Varnodes.
Definition: jumptable.hh:102
Architecture::globalify
void globalify(void)
Mark all spaces as global.
Definition: architecture.cc:366
BlockSwitch::caseblocks
vector< CaseOrder > caseblocks
Blocks associated with switch cases.
Definition: block.hh:645
FuncProto::possibleInputParam
bool possibleInputParam(const Address &addr, int4 size) const
Decide whether a given storage location could be an input parameter.
Definition: fspec.cc:3439
ProtoStoreSymbol::clearOutput
virtual void clearOutput(void)
Clear the return value to TYPE_VOID.
Definition: fspec.cc:2555
BlockMap::findBlock
static FlowBlock * findBlock(const vector< FlowBlock * > &list, int4 ind)
Locate a FlowBlock with a given index.
Definition: block.cc:3212
TypeFactory::tree
DatatypeSet tree
Datatypes within this factory (sorted by function)
Definition: type.hh:385
ConstantSpace::ConstantSpace
ConstantSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind)
Only constructor.
Definition: space.cc:359
Funcdata::printRaw
void printRaw(ostream &s) const
Print raw p-code op descriptions to a stream.
Definition: funcdata.cc:181
CircleRange::translate2Op
int4 translate2Op(OpCode &opc, uintb &c, int4 &cslot) const
Translate range to a comparison op.
Definition: rangeutil.cc:1410
ContextBitRange::word
int4 word
Index of word containing this context value.
Definition: globalcontext.hh:31
TruncationTag::spaceName
string spaceName
Name of space to be truncated.
Definition: translate.hh:64
AliasChecker::AddBase
A helper class holding a Varnode pointer reference and a possible index added to it.
Definition: varmap.hh:111
AncestorRealistic::checkConditionalExe
bool checkConditionalExe(State &state)
Check if current Varnode produced by conditional flow.
Definition: funcdata_varnode.cc:1548
ScopeGhidra::findFunction
virtual Funcdata * findFunction(const Address &addr) const
Find the function starting at the given address.
Definition: database_ghidra.cc:321
Override::applyPrototype
void applyPrototype(Funcdata &data, FuncCallSpecs &fspecs) const
Look for and apply a function prototype override.
Definition: override.cc:150
TypePointer::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:240
ActionMergeRequired
Make required Varnode merges as dictated by CPUI_MULTIEQUAL, CPUI_INDIRECT, and addrtied property.
Definition: coreaction.hh:350
PcodeOp::isCollapsible
bool isCollapsible(void) const
Definition: op.cc:115
RuleModOpt
Simplify expressions that optimize INT_REM and INT_SREM.
Definition: ruleaction.hh:1209
ProtoParameter::operator!=
bool operator!=(const ProtoParameter &op2) const
Compare storage location and data-type for inequality.
Definition: fspec.hh:955
EmulateFunction::emulatePath
uintb emulatePath(uintb val, const PathMeld &pathMeld, PcodeOp *startop, Varnode *startvn)
Execute from a given starting point and value to the common end-point of the path set.
Definition: jumptable.cc:180
BreakTableCallBack::emulate
Emulate * emulate
The emulator associated with this table.
Definition: emulate.hh:138
JumpBasic::jrange
JumpValuesRange * jrange
Range of values for the (normalized) switch variable.
Definition: jumptable.hh:346
RuleIndirectCollapse
Remove a CPUI_INDIRECT if its blocking PcodeOp is dead.
Definition: ruleaction.hh:528
DynamicHash::vnproc
uint4 vnproc
Number of Varnodes processed in the markvn list so far.
Definition: dynamic.hh:61
PrintLanguage::Atom::highlight
EmitXml::syntax_highlight highlight
The type of highlighting to use when emitting the token.
Definition: printlanguage.hh:197
Varnode::isConstantExtended
int4 isConstantExtended(uintb &val) const
Definition: varnode.cc:699
ProtoStoreInternal::inparam
vector< ProtoParameter * > inparam
Descriptions of input parameters.
Definition: fspec.hh:1108
TypeEnum::TypeEnum
TypeEnum(const TypeEnum &op)
Construct from another TypeEnum.
Definition: type.cc:531
ParamEntryRange::subsorttype
SubsortPosition subsorttype
The sub-sort object for a rangemap.
Definition: fspec.hh:130
DynamicRecommend::usePoint
Address usePoint
Use point of the Symbol.
Definition: varmap.hh:50
RuleLoadVarnode
Convert LOAD operations using a constant offset to COPY.
Definition: ruleaction.hh:709
FlowInfo::flow_forinline
@ flow_forinline
Indicate flow is being generated to in-line (a function)
Definition: flow.hh:70
ActionHeritage::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:283
ParamListMerged
A union of other input parameter passing models.
Definition: fspec.hh:578
ArchitectureGhidra::pspecxml
string pspecxml
XML pspec passed from Ghidra.
Definition: ghidra_arch.hh:64
Funcdata::opDestroyRaw
void opDestroyRaw(PcodeOp *op)
Remove the given raw PcodeOp.
Definition: funcdata_op.cc:226
TypeCode::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:1024
PrintC::opIntMult
virtual void opIntMult(const PcodeOp *op)
Emit a INT_MULT operator.
Definition: printc.hh:255
InjectPayload::restoreXml
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: pcodeinject.cc:62
Funcdata::clearCallSpecs
void clearCallSpecs(void)
Remove all call specifications.
Definition: funcdata.cc:395
ActionConditionalConst::propagateConstant
void propagateConstant(Varnode *varVn, Varnode *constVn, FlowBlock *constBlock, Funcdata &data)
Replace reads of a given Varnode with a constant.
Definition: coreaction.cc:3549
ParamEntry::numslots
int4 numslots
(Maximum) number of slots that can store separate parameters
Definition: fspec.hh:71
TypeStruct::getSubType
virtual Datatype * getSubType(uintb off, uintb *newoff) const
Recover component data-type one-level down.
Definition: type.cc:783
ScopeInternal::getCategorySize
virtual int4 getCategorySize(int4 cat) const
Get the number of Symbols in the given category.
Definition: database.cc:2664
BlockList::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2749
SegmentedResolver::spc
AddrSpace * spc
The address space being segmented.
Definition: architecture.hh:284
AddrSpaceManager::resolvelist
vector< AddressResolver * > resolvelist
Special constant resolvers.
Definition: translate.hh:220
TypeOpSegment::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:756
TypeOpIntZext::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:352
TypeOpUnary
A generic unary operator: one input and one output.
Definition: typeop.hh:172
RuleConditionalMove::BoolExpress::initialize
bool initialize(Varnode *vn)
Initialize based on output Varnode.
Definition: ruleaction.cc:7780
CPUI_FLOAT_CEIL
@ CPUI_FLOAT_CEIL
Round towards +infinity.
Definition: opcodes.hh:104
ParameterSymbol::isHiddenReturn
virtual bool isHiddenReturn(void) const
Is this a pointer to storage for a return value.
Definition: fspec.cc:2358
RuleEqual2Constant::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5590
TypeBase
Base class for the fundamental atomic types.
Definition: type.hh:158
TypeFactory::setFields
bool setFields(vector< TypeField > &fd, TypeStruct *ot, int4 fixedsize)
Set fields on a TypeStruct.
Definition: type.cc:1487
LoadImageXml::cursymbol
map< Address, string >::const_iterator cursymbol
Current symbol being reported.
Definition: loadimage_xml.hh:35
SleighArchitecture::specpaths
static FileManage specpaths
Known directories that contain .ldefs files.
Definition: sleigh_arch.hh:123
AddrSpaceManager::findJoinInternal
JoinRecord * findJoinInternal(uintb offset) const
Find JoinRecord for offset in the join space.
Definition: translate.cc:655
ContextCache::context
const uintm * context
The current cached context blob.
Definition: globalcontext.hh:315
AliasChecker::gatherOffset
static uintb gatherOffset(Varnode *vn)
If the given Varnode is a sum result, return the constant portion of this sum.
Definition: varmap.cc:659
Rule2Comp2Mult::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:652
Varnode::characterizeOverlap
int4 characterizeOverlap(const Varnode &op) const
Return 0, 1, or 2 for "no overlap", "partial overlap", "identical storage".
Definition: varnode.cc:147
FuncProto::updateAllTypes
void updateAllTypes(const vector< string > &namelist, const vector< Datatype * > &typelist, bool dtdtdt)
Set this entire function prototype based on a list of names and data-types.
Definition: fspec.cc:3310
RulePiece2Sext
Concatenation with sign bits becomes an extension: concat( V s>> #0x1f , V) => sext(V)
Definition: ruleaction.hh:91
CapabilityPoint::getList
static vector< CapabilityPoint * > & getList(void)
Retrieve the list of extension point singletons.
Definition: capability.cc:22
FloatFormat::exp_pos
int4 exp_pos
(lowest) bit position of exponent
Definition: float.hh:45
ActionDatabase::universalname
static const char universalname[]
The name of the universal root Action.
Definition: action.hh:299
ActionMultiCse::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:868
blockaction.hh
Actions and classes associated with transforming and structuring the control-flow graph.
BlockGraph::createVirtualRoot
static FlowBlock * createVirtualRoot(const vector< FlowBlock * > &rootlist)
Create a single root block.
Definition: block.cc:914
OpBehaviorFloatSub::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:413
GhidraCommand::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:72
CPUI_MAX
@ CPUI_MAX
Value indicating the end of the op-code values.
Definition: opcodes.hh:127
Funcdata::saveXmlHigh
void saveXmlHigh(ostream &s) const
Save an XML description of all HighVariables to stream.
Definition: funcdata.cc:607
ContextGhidra::getTrackedDefault
virtual TrackedSet & getTrackedDefault(void)
Get the set of default values for all tracked registers.
Definition: ghidra_context.hh:71
ScoreProtoModel
Class for calculating "goodness of fit" of parameter trials against a prototype model.
Definition: fspec.hh:843
sleighbase.hh
Base class for applications that process SLEIGH format specifications.
BlockSwitch::getNumLabels
int4 getNumLabels(int4 i) const
Get the number of labels associated with one case block.
Definition: block.hh:658
EmitPrettyPrint::spaceremain
int4 spaceremain
Space remaining in current line.
Definition: prettyprint.hh:706
TypeOpFloatRound::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:667
ActionSegmentize::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:126
mostsigbit_set
int4 mostsigbit_set(uintb val)
Return index of most significant bit set in given value.
Definition: address.cc:705
ScopeGhidra
An implementation of the Scope interface by querying a Ghidra client for Symbol information.
Definition: database_ghidra.hh:35
TypePointer::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:419
IPTR_CONSTANT
@ IPTR_CONSTANT
Special space to represent constants.
Definition: space.hh:29
BlockGoto
A block that terminates with an unstructured (goto) branch to another block.
Definition: block.hh:442
EmitXml::indentlevel
int4 indentlevel
Current indent level (in fixed width characters)
Definition: prettyprint.hh:80
ScopeGhidra::restrictScope
virtual void restrictScope(Funcdata *f)
Convert this to a local Scope.
Definition: database_ghidra.hh:103
TypeOpCall::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:592
RuleDoubleIn::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: double.hh:294
ParamListStandard::ParamListStandard
ParamListStandard(const ParamListStandard &op2)
Copy constructor.
Definition: fspec.cc:421
ActionMarkExplicit
Find explicit Varnodes: Varnodes that have an explicit token representing them in the output.
Definition: coreaction.hh:415
PrintC::pushSymbol
virtual void pushSymbol(const Symbol *sym, const Varnode *vn, const PcodeOp *op)
Push a specific Symbol onto the RPN stack.
Definition: printc.cc:1563
TokenSplit::closeParen
void closeParen(char c, int4 id)
Create a close parenthesis.
Definition: prettyprint.hh:528
OpBehaviorFloatDiv::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:594
Varnode::mapped
@ mapped
Varnode has a database entry associated with it.
Definition: varnode.hh:99
UserOpManage::parseSegmentOp
void parseSegmentOp(const Element *el, Architecture *glb)
Parse a <segmentop> XML tag.
Definition: userop.cc:417
OptionInferConstPtr::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:228
JumpBasic::backup2Switch
static uintb backup2Switch(Funcdata *fd, uintb output, Varnode *outvn, Varnode *invn)
Back up the constant value in the output Varnode to the value in the input Varnode.
Definition: jumptable.cc:464
FlowBlock::halfDeleteInEdge
void halfDeleteInEdge(int4 slot)
Delete the in half of an edge, correcting indices.
Definition: block.cc:88
FuncCallSpecs::inputConsume
vector< int4 > inputConsume
Number of bytes consumed by sub-function, for each input parameter.
Definition: fspec.hh:1448
CommentDatabaseInternal::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore all comments from XML.
Definition: comment.cc:250
ConstantPoolGhidra::clear
virtual void clear(void)
Release any (local) resources.
Definition: cpool_ghidra.hh:39
Action::status_repeat
@ status_repeat
Repeating the same action.
Definition: action.hh:65
JoinSpace::JoinSpace
JoinSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind)
Definition: space.cc:463
TypeOpIntZext
Information about the INT_ZEXT op-code.
Definition: typeop.hh:349
TransformManager::newSplit
TransformVar * newSplit(Varnode *vn, const LaneDescription &description)
Create placeholder nodes splitting a Varnode into its lanes.
Definition: transform.cc:441
SymbolEntry::addr
Address addr
Starting address of the storage location.
Definition: database.hh:55
TokenSplit::label_t
@ label_t
A code label.
Definition: prettyprint.hh:315
AddrSpaceManager::setDefaultDataSpace
void setDefaultDataSpace(int4 index)
Set the default address space for data.
Definition: translate.cc:268
RuleConcatZext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4389
SleighArchitecture::loadLanguageDescription
static void loadLanguageDescription(const string &specfile, ostream &errs)
Read a SLEIGH .ldefs file.
Definition: sleigh_arch.cc:95
PrintLanguage::emitOp
void emitOp(const ReversePolish &entry)
Send an operator token from the RPN to the emitter.
Definition: printlanguage.cc:326
PrintC::pushType
virtual void pushType(const Datatype *ct)
Push a data-type name onto the RPN expression stack.
Definition: printc.cc:1176
TokenSplit::begin
@ begin
A token that starts a printing group.
Definition: prettyprint.hh:282
TypeOpIntSdiv::TypeOpIntSdiv
TypeOpIntSdiv(TypeFactory *t)
Constructor.
Definition: typeop.cc:1268
DynamicHash::hash
uint8 hash
The calculated hash value.
Definition: dynamic.hh:71
AncestorRealistic::stateStack
vector< State > stateStack
Holds the depth-first traversal stack.
Definition: funcdata.hh:605
RuleConcatCommute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:767
EmitPrettyPrint::endVarDecl
virtual void endVarDecl(int4 id)
End a variable declaration.
Definition: prettyprint.cc:952
CPUI_POPCOUNT
@ CPUI_POPCOUNT
Count the 1-bits.
Definition: opcodes.hh:125
ghidra_translate.hh
Class for fetching p-code from a Ghidra client.
Action::getSubRule
virtual Rule * getSubRule(const string &specify)
Retrieve a specific sub-rule by name.
Definition: action.cc:277
emulateutil.hh
(Lightweight) emulation interface for executing PcodeOp objects within a syntax tree or for executing...
ProtoParameter::resetSizeLockType
virtual void resetSizeLockType(TypeFactory *factory)=0
Clear this parameter's data-type preserving any size-lock.
RegisterProgram::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:162
RuleAddMultCollapse::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3755
Cover::compareTo
int4 compareTo(const Cover &op2) const
Give ordering of this and another Cover.
Definition: cover.cc:221
RuleEmbed
Simplify PIECE intended as embedding: concat(V, sub(W,0)) => W & 0xff | (zext(W) << 8)
Definition: ruleaction.hh:904
FlowBlock::edge_flags
edge_flags
Boolean properties on edges.
Definition: block.hh:95
EmitNoXml::beginStatement
virtual int4 beginStatement(const PcodeOp *op)
Begin a source code statement.
Definition: prettyprint.hh:235
TypeOpIntLeft::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1127
TokenSplit::spaces
void spaces(int4 num, int4 bump)
Create a whitespace token.
Definition: prettyprint.hh:574
LoadImageFunc
A record indicating a function symbol.
Definition: loadimage.hh:36
PrintLanguage::opIntSdiv
virtual void opIntSdiv(const PcodeOp *op)=0
Emit a INT_SDIV operator.
EmulateSnippet::checkForLegalCode
bool checkForLegalCode(void) const
Check for p-code that is deemed illegal for a snippet.
Definition: emulateutil.cc:325
TypeOpFunc::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:310
FuncCallSpecs::insertPcode
void insertPcode(Funcdata &data)
Inject any upon-return p-code at this call site.
Definition: fspec.cc:4545
FuncProto::setScope
void setScope(Scope *s, const Address &startpoint)
Set a backing symbol Scope for this.
Definition: fspec.cc:3028
Cover::addRefRecurse
void addRefRecurse(const FlowBlock *bl)
Fill-in this recursively from the given block.
Definition: cover.cc:463
Varnode::def
PcodeOp * def
The defining operation of this Varnode.
Definition: varnode.hh:131
PrintLanguage::clear
virtual void clear(void)
Clear the RPN stack and the low-level emitter.
Definition: printlanguage.cc:770
RuleMultNegOne::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6205
ValueSet
A range of values attached to a Varnode within a data-flow subsystem.
Definition: rangeutil.hh:111
Funcdata::beginDef
VarnodeDefSet::const_iterator beginDef(void) const
Start of all Varnodes sorted by definition address.
Definition: funcdata.hh:336
AddrSpaceManager::uniqspace
AddrSpace * uniqspace
Temporary space associated with processor.
Definition: translate.hh:230
TransformManager::newOpReplace
TransformOp * newOpReplace(int4 numParams, OpCode opc, PcodeOp *replace)
Create a new placeholder op intended to replace an existing op.
Definition: transform.cc:499
PropagationState
A class that holds a data-type traversal state during type propagation.
Definition: coreaction.hh:1025
DocumentStorage::doclist
vector< Document * > doclist
The list of documents held by this container.
Definition: xml.hh:250
LoadImageGhidra
An implementation of the LoadImage interface using a Ghidra client as the back-end.
Definition: loadimage_ghidra.hh:29
ContextGhidra::getRegionForSet
virtual void getRegionForSet(vector< uintm * > &res, const Address &addr1, const Address &addr2, int4 num, uintm mask)
Grab the context blob(s) for the given address range, marking bits that will be set.
Definition: ghidra_context.hh:38
PrintC::emitGlobalVarDeclsRecursive
void emitGlobalVarDeclsRecursive(Scope *scope)
Emit variable declarations for all global symbols under given scope.
Definition: printc.cc:2217
ActionNodeJoin::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: blockaction.hh:338
SegmentOp::constresolve
VarnodeData constresolve
How to resolve constant near pointers.
Definition: userop.hh:205
TypeOpFloatEqual
Information about the FLOAT_EQUAL op-code.
Definition: typeop.hh:545
FlowBlock::f_interior_gotoin
@ f_interior_gotoin
Block is target of unstructured jump to its interior.
Definition: block.hh:85
JumpModel::isOverride
virtual bool isOverride(void) const =0
Return true if this model was manually overridden.
AddrSpace::deadcodedelay
int4 deadcodedelay
Delay before deadcode removal is allowed on this space.
Definition: space.hh:109
EmulatePcodeOp::setCurrentOp
void setCurrentOp(PcodeOp *op)
Establish the current PcodeOp being emulated.
Definition: emulateutil.hh:79
JumpTable::numIndicesByBlock
int4 numIndicesByBlock(const FlowBlock *bl) const
Return the number of address table entries that target the given basic-block.
Definition: jumptable.cc:2264
AddrSpace::saveXmlAttributes
virtual void saveXmlAttributes(ostream &s, uintb offset) const
Save an address as XML.
Definition: space.cc:118
Action::resetStats
virtual void resetStats(void)
Reset all the counts to zero.
Definition: action.cc:106
Datatype::metatype
type_metatype metatype
Meta-type - type disregarding size.
Definition: type.hh:82
LanedRegister::restoreXml
bool restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore object from XML stream.
Definition: transform.cc:284
Funcdata::destroyVarnode
void destroyVarnode(Varnode *vn)
Delete the given Varnode from this function.
Definition: funcdata_varnode.cc:261
FlowBlock::saveXmlHeader
virtual void saveXmlHeader(ostream &s) const
Save basic information as XML attributes.
Definition: block.cc:2333
TypeOpIntAnd::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1099
PrintLanguage::emitBlockCondition
virtual void emitBlockCondition(const BlockCondition *bl)=0
Emit a conditional statement.
Action::apply
virtual int4 apply(Funcdata &data)=0
Make a single attempt to apply this Action.
TypeOpBoolAnd::TypeOpBoolAnd
TypeOpBoolAnd(TypeFactory *t)
Constructor.
Definition: typeop.cc:1342
Override::hasDeadcodeDelay
bool hasDeadcodeDelay(AddrSpace *spc) const
Check if a delay override is already installed for an address space.
Definition: override.cc:82
TokenSplit::bl
const FlowBlock * bl
Associated Control-flow.
Definition: prettyprint.hh:334
FlowInfo::reinterpreted_present
@ reinterpreted_present
Indicate we have encountered reinterpreted data.
Definition: flow.hh:67
Varnode::setSymbolProperties
bool setSymbolProperties(SymbolEntry *entry)
Set properties from the given Symbol to this Varnode.
Definition: varnode.cc:367
Override::typeToString
static string typeToString(uint4 tp)
Convert a flow override type to a string.
Definition: override.cc:418
CastStrategy::UNKNOWN_PROMOTION
@ UNKNOWN_PROMOTION
The type of integer promotion cannot be determined.
Definition: cast.hh:48
BlockGraph::clearEdgeFlags
void clearEdgeFlags(uint4 flags)
Clear a set of properties from all edges in the graph.
Definition: block.cc:892
FuncCallSpecs::effective_extrapop
int4 effective_extrapop
Working extrapop for the CALL.
Definition: fspec.hh:1441
rangemap::AddrRange::subsort
subsorttype subsort
How this should be sub-sorted.
Definition: rangemap.hh:82
TypeEnum::getMatches
bool getMatches(uintb val, vector< string > &matchname) const
Recover the named representation.
Definition: type.cc:609
LoadImageXml::archtype
string archtype
The architecture string.
Definition: loadimage_xml.hh:30
PcodeOp::binary
@ binary
Evaluate as binary expression.
Definition: op.hh:85
PrintC::divequal
static OpToken divequal
The in-place division operator.
Definition: printc.hh:101
RulePiece2Zext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:84
RuleOrConsume::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:402
LabSymbol::restoreXml
virtual void restoreXml(const Element *el)
Restore this Symbol from an XML stream.
Definition: database.cc:696
SeqNum::getAddr
const Address & getAddr(void) const
Get the address portion of a sequence number.
Definition: address.hh:126
SymbolEntry::getSubsort
subsorttype getSubsort(void) const
Get the sub-sort object.
Definition: database.cc:73
OptionReadOnly::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:201
Action::status
uint4 status
Current status.
Definition: action.hh:80
TypeSpacebase::spaceid
AddrSpace * spaceid
The address space we are treating as a structure.
Definition: type.hh:358
ScopeGhidra::saveXml
virtual void saveXml(ostream &s) const
Write out this as a <scope> XML tag.
Definition: database_ghidra.hh:109
TypeOpNew::TypeOpNew
TypeOpNew(TypeFactory *t)
Constructor.
Definition: typeop.cc:1810
JumpBasic::normalvn
Varnode * normalvn
Normalized switch Varnode.
Definition: jumptable.hh:350
Address::operator!=
bool operator!=(const Address &op2) const
Compare two addresses for inequality.
Definition: address.hh:335
AddrSpace::stackGrowsNegative
virtual bool stackGrowsNegative(void) const
Return true if a stack in this space grows negative.
Definition: space.hh:470
ScopeGhidra::buildVariableName
virtual string buildVariableName(const Address &addr, const Address &pc, Datatype *ct, int4 &index, uint4 flags) const
Given an address and data-type, build a suitable generic symbol name.
Definition: database_ghidra.hh:70
BlockMap::BlockMap
BlockMap(const BlockMap &op2)
Copy constructor.
Definition: block.cc:3184
ProtoModel::unjustifiedInputParam
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
TraceDAG::BranchPoint
Definition: blockaction.hh:100
BlockSwitch::CaseOrder::basicblock
const FlowBlock * basicblock
The first basic-block to execute within the case block.
Definition: block.hh:635
AliasChecker::gatherInternal
void gatherInternal(void) const
Run through Varnodes looking for pointers into the stack.
Definition: varmap.cc:502
CollapseStructure::ruleBlockInfLoop
bool ruleBlockInfLoop(FlowBlock *bl)
Attempt to apply the BlockInfLoop structure.
Definition: blockaction.cc:1559
BlockSwitch::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:3165
AliasChecker::aliasBoundary
uintb aliasBoundary
Shallowest alias.
Definition: varmap.hh:124
SubForm
Definition: double.hh:107
RuleDoubleIn
Definition: double.hh:291
Funcdata::seenDeadcode
void seenDeadcode(AddrSpace *spc)
Mark that dead Varnodes have been seen in a specific address space.
Definition: funcdata.hh:213
ActionVarnodeProps::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1226
StackSolver
A class that solves for stack-pointer changes across unknown sub-functions.
Definition: coreaction.cc:30
LoadImage::getNextSection
virtual bool getNextSection(LoadImageSection &sec) const
Get info on the next section.
Definition: loadimage.hh:174
PcodeOp::startbasic
@ startbasic
This instruction starts a basic block.
Definition: op.hh:67
BlockSwitch::CaseOrder::block
FlowBlock * block
The structured case block.
Definition: block.hh:634
TypeEnum::namemap
map< uintb, string > namemap
Map from integer to name.
Definition: type.hh:280
OpBehaviorIntMult
CPUI_INT_MULT behavior.
Definition: opbehavior.hh:285
TypeFactory::restoreXmlTypeNoRef
Datatype * restoreXmlTypeNoRef(const Element *el, bool forcecore)
Restore from an XML tag.
Definition: type.cc:2038
RuleLess2Zero::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:947
PrintLanguage::pushType
virtual void pushType(const Datatype *ct)=0
Push a data-type name onto the RPN expression stack.
StructureGraph
Command to structure a control-flow graph.
Definition: ghidra_process.hh:170
BreakCallBack::pcodeCallback
virtual bool pcodeCallback(PcodeOpRaw *op)
Call back method for pcode based breakpoints.
Definition: emulate.hh:102
CPUI_STORE
@ CPUI_STORE
Store at a pointer into a specified address space.
Definition: opcodes.hh:38
Funcdata::nodeSplit
void nodeSplit(BlockBasic *b, int4 inedge)
Split control-flow into a basic block, duplicating its p-code into a new block.
Definition: funcdata_block.cc:906
TypeBase::TypeBase
TypeBase(int4 s, type_metatype m, const string &n)
Construct TypeBase from a size, meta-type, and name.
Definition: type.hh:167
ActionMarkImplied::DescTreeElement
This class holds a single entry in a stack used to forward traverse Varnode expressions.
Definition: coreaction.hh:439
ActionPrototypeWarnings::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3969
TypeOpCallother::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:702
JumpAssisted::userop
JumpAssistOp * userop
The jumpassist p-code models.
Definition: jumptable.hh:474
ParamList::checkSplit
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.
EmulatePcodeCache::opcache
vector< PcodeOpRaw * > opcache
The cache of current p-code ops.
Definition: emulate.hh:298
RuleShiftBitops::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:539
PrintC::opCall
virtual void opCall(const PcodeOp *op)
Emit a CALL operator.
Definition: printc.cc:451
RuleDumptyHump
Simplify join and break apart: sub( concat(V,W), c) => sub(W,c)
Definition: ruleaction.hh:884
DatatypeCompare::operator()
bool operator()(const Datatype *a, const Datatype *b) const
Comparison operator.
Definition: type.hh:134
EquateSymbol::isValueClose
bool isValueClose(uintb op2Value, int4 size) const
Is the given value similar to this equate.
Definition: database.cc:619
TypeFactory::nametree
DatatypeNameSet nametree
Cross-reference by name.
Definition: type.hh:386
PrintC::opTypeCast
void opTypeCast(const PcodeOp *op)
Push the given p-code op using type-cast syntax to the RPN stack.
Definition: printc.cc:314
PcodeOpBank::destroyDead
void destroyDead(void)
Destroy/retire all PcodeOps in the dead list.
Definition: op.cc:706
Action::tmpbreak_start
@ tmpbreak_start
Temporary break at start of action.
Definition: action.hh:73
RuleFuncPtrEncoding::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:8174
MemoryImage
A kind of MemoryBank which retrieves its data from an underlying LoadImage.
Definition: memstate.hh:93
Merge::purgeHigh
void purgeHigh(HighVariable *high)
Remove cached intersection tests for a given HighVariable.
Definition: merge.cc:1456
Scope::queryFunction
Funcdata * queryFunction(const string &name) const
Look-up a function by name.
Definition: database.cc:1134
RulePiecePathology::isPathology
static bool isPathology(Varnode *vn, Funcdata &data)
Return true if concatenating with a SUBPIECE of the given Varnode is unusual.
Definition: ruleaction.cc:8676
TypeOpCall::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:544
TransformManager
Class for splitting larger registers holding smaller logical lanes.
Definition: transform.hh:150
RuleAndDistribute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1303
PcodeOpBank::end
PcodeOpTree::const_iterator end(const Address &addr) const
End of all PcodeOps at one Address.
Definition: op.cc:887
PrintLanguage::optoken
@ optoken
Emit atom as operator.
Definition: printlanguage.hh:159
Action::basegroup
string basegroup
Base group this action belongs to.
Definition: action.hh:86
FlowBlock::preferComplement
virtual bool preferComplement(Funcdata &data)
Rearrange this hierarchy to simplify boolean expressions.
Definition: block.hh:716
JoinSpace::saveXmlAttributes
virtual void saveXmlAttributes(ostream &s, uintb offset) const
Definition: space.cc:476
Translate::Translate
Translate(void)
Constructor for the translator.
Definition: translate.cc:841
RuleCollapseConstants::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:622
TypeFactory::getTypeStruct
TypeStruct * getTypeStruct(const string &n)
Create an (empty) structure.
Definition: type.cc:1817
TypeFactory::align
int4 align
Alignment of structures.
Definition: type.hh:382
ScopeInternal::saveXml
virtual void saveXml(ostream &s) const
Write out this as a <scope> XML tag.
Definition: database.cc:2498
funcdata.hh
Utilities for processing data structures associated with a single function.
AddrSpaceManager::fspecspace
AddrSpace * fspecspace
Space for internal callspec pointers.
Definition: translate.hh:227
TruncationTag
Object for describing how a space should be truncated.
Definition: translate.hh:63
TypeFactory::parseDataOrganization
void parseDataOrganization(const Element *el)
Parse the <data_organization> tag.
Definition: type.cc:2219
SpacebaseSpace::isNegativeStack
bool isNegativeStack
true if stack grows in negative direction
Definition: translate.hh:174
ToOpEdge
An edge between a Varnode and a PcodeOp.
Definition: dynamic.hh:30
ContextInternal::getContext
virtual const uintm * getContext(const Address &addr) const
Get the context blob of values associated with a given address.
Definition: globalcontext.hh:292
MemoryPageOverlay::MemoryPageOverlay
MemoryPageOverlay(AddrSpace *spc, int4 ws, int4 ps, MemoryBank *ul)
Constructor for page overlay.
Definition: memstate.cc:531
RuleSwitchSingle::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5070
BlockBasic::removeOp
void removeOp(PcodeOp *inst)
Remove PcodeOp from this basic block.
Definition: block.cc:2185
Scope::glb
Architecture * glb
Architecture of this scope.
Definition: database.hh:424
TypeOpLoad
Information about the LOAD op-code.
Definition: typeop.hh:215
IopSpace::restoreXml
virtual void restoreXml(const Element *el)
Recover the details of this space from XML.
Definition: op.cc:61
BfdArchitecture::buildLoader
virtual void buildLoader(DocumentStorage &store)
Build the LoadImage object and load the executable image.
Definition: bfd_arch.cc:64
popcount
int4 popcount(uintb val)
Return the number of one bits in the given value.
Definition: address.cc:726
HighVariable::copy_in2
@ copy_in2
There exists at least 2 COPYs into this HighVariable from other HighVariables.
Definition: variable.hh:52
ConditionalExecution::posta_outslot
int4 posta_outslot
The out edge from iblock to posta.
Definition: condexe.hh:140
RuleMultiCollapse
Collapse MULTIEQUAL whose inputs all trace to the same value.
Definition: ruleaction.hh:538
FlowBlock::f_dead
@ f_dead
Block is in process of being deleted.
Definition: block.hh:88
RulePushPtr::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6067
EmitXml::emitsXml
virtual bool emitsXml(void) const
Determine if this is an XML markup emitter.
Definition: prettyprint.hh:197
Rule::checkActionBreak
bool checkActionBreak(void)
Check if an action breakpoint is turned on.
Definition: action.cc:701
TypeOpCall::TypeOpCall
TypeOpCall(TypeFactory *t)
Constructor.
Definition: typeop.cc:537
RuleLess2Zero::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5211
ScopeGhidra::isNameUsed
virtual bool isNameUsed(const string &name) const
Check if the given name is used within this scope.
Definition: database_ghidra.hh:92
FuncProto::assumedInputExtension
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
DynamicHash::markvn
vector< const Varnode * > markvn
List of Varnodes is the sub-graph being hashed.
Definition: dynamic.hh:66
OpFollow::opc
OpCode opc
The particular p-code operation.
Definition: userop.hh:170
RuleSubRight::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6288
TraceDAG::processExitConflict
void processExitConflict(list< BadEdgeScore >::iterator start, list< BadEdgeScore >::iterator end)
Process a set of conflicting BlockTrace objects that go to the same exit point.
Definition: blockaction.cc:687
TraceDAG::BranchPoint::createTraces
void createTraces(void)
Given the BlockTrace objects, given a new BranchPoint.
Definition: blockaction.cc:492
Funcdata::opStackStore
PcodeOp * opStackStore(AddrSpace *spc, uintb off, PcodeOp *op, bool insertafter)
Create a STORE expression at an offset relative to a spacebase register for a given address space.
Definition: funcdata_op.cc:478
ConditionalJoin::a_in2
int4 a_in2
In edge of exita coming from block2.
Definition: blockaction.hh:246
RuleLessEqual2Zero::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:957
FlowInfo::deleteCallSpec
void deleteCallSpec(FuncCallSpecs *fc)
Remove the given call site from the list for this function.
Definition: flow.cc:1269
RuleSubvarSext::isaggressive
int4 isaggressive
Is it guaranteed the root is a sub-variable needing to be trimmed.
Definition: ruleaction.hh:1315
Funcdata::vbank
VarnodeBank vbank
Container of Varnode objects for this function.
Definition: funcdata.hh:76
RuleXorCollapse::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3714
ConstantPool::clear
virtual void clear(void)=0
Release any (local) resources.
ProtoStoreInternal::clearInput
virtual void clearInput(int4 i)
Clear the input parameter at the specified slot.
Definition: fspec.cc:2630
ContextGhidra::getDefaultValue
virtual uintm * getDefaultValue(void)
Retrieve the memory region holding all default context values.
Definition: ghidra_context.hh:44
HighVariable::setSymbol
void setSymbol(Varnode *vn) const
Update Symbol information for this from the given member Varnode.
Definition: variable.cc:39
TypeOp::evaluateBinary
uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on an input value.
Definition: typeop.hh:78
Funcdata::activeoutput
ParamActive * activeoutput
Data for assessing which parameters are passed to this function.
Definition: funcdata.hh:82
FlowInfo::emitter
PcodeEmitFd emitter
PCodeOp factory (configured to allocate into data and obank)
Definition: flow.hh:84
ActionMergeMultiEntry
Try to merge Varnodes specified by Symbols with multiple SymbolEntrys.
Definition: coreaction.hh:384
RuleCollectTerms::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:64
loadimage_ghidra.hh
Use the Ghidra client as a load image.
PrintC::PrintC
PrintC(Architecture *g, const string &nm="c-language")
Constructor.
Definition: printc.cc:94
EmitPrettyPrint::emitsXml
virtual bool emitsXml(void) const
Determine if this is an XML markup emitter.
Definition: prettyprint.hh:770
FuncProto::paramShift
void paramShift(int4 paramshift)
Add parameters to the front of the input parameter list.
Definition: fspec.cc:2847
UnimplError::instruction_length
int4 instruction_length
Definition: translate.hh:36
Varnode::return_address
@ return_address
Is the varnode storage for a return address.
Definition: varnode.hh:101
RuleAndMask
Collapse unnecessary INT_AND.
Definition: ruleaction.hh:121
ParameterSymbol::isIndirectStorage
virtual bool isIndirectStorage(void) const
Is this really a pointer to the true parameter.
Definition: fspec.cc:2352
UserOpManage::vol_read
VolatileReadOp * vol_read
(Single) volatile read operation
Definition: userop.hh:254
OpBehaviorIntSub
CPUI_INT_SUB behavior.
Definition: opbehavior.hh:197
ActionConstantPtr
Check for constants, with pointer type, that correspond to global symbols.
Definition: coreaction.hh:181
unsignedCompare128
int4 unsignedCompare128(uint8 *a, uint8 *b)
Compare two unsigned 128-bit values.
Definition: address.cc:852
CastStrategy
A strategy for applying type casts.
Definition: cast.hh:40
OpBehaviorFloatCeil::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:469
RuleSignNearMult::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7084
PrintLanguage::opCopy
virtual void opCopy(const PcodeOp *op)=0
Emit a COPY operator.
SubvariableFlow::PatchRecord::copy_patch
@ copy_patch
Turn op into a COPY of the logical value.
Definition: subflow.hh:67
ContextInternal::getTrackedDefault
virtual TrackedSet & getTrackedDefault(void)
Get the set of default values for all tracked registers.
Definition: globalcontext.hh:295
BlockGraph::forceFalseEdge
void forceFalseEdge(const FlowBlock *out0)
Force the false out edge to go to the given FlowBlock.
Definition: block.cc:1130
PrintC::opCpoolRefOp
virtual void opCpoolRefOp(const PcodeOp *op)
Emit a CPOOLREF operator.
Definition: printc.cc:863
PcodeInjectLibraryGhidra::contextCache
InjectContextGhidra contextCache
A context object that wraps data in XML for the Ghidra client.
Definition: inject_ghidra.hh:81
BfdArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const
Determine if this extension can handle this file.
Definition: bfd_arch.cc:41
PrintLanguage::nodepend
vector< NodePending > nodepend
Data-flow nodes waiting to be pushed onto the RPN stack.
Definition: printlanguage.hh:236
SplitFlow::traceBackward
bool traceBackward(TransformVar *rvn)
Try to trace the pair of logical values, backward, through the defining op.
Definition: subflow.cc:1602
coveringmask
uintb coveringmask(uintb val)
Return a mask that covers the given value.
Definition: address.cc:770
JumpAssistOp::calcsize
int4 calcsize
Id of p-code script that calculates number of indices (== -1 if no script)
Definition: userop.hh:233
Symbol::Symbol
Symbol(Scope *sc)
Construct for use with restoreXml()
Definition: database.hh:191
Funcdata::findCoveringInput
Varnode * findCoveringInput(int4 s, const Address &loc) const
Find the input Varnode that contains the given range.
Definition: funcdata.hh:278
CollapseStructure::ruleBlockProperIf
bool ruleBlockProperIf(FlowBlock *bl)
Attempt to apply a 2 component form of BlockIf.
Definition: blockaction.cc:1358
PrintLanguage::force_hex
@ force_hex
Force printing of hex.
Definition: printlanguage.hh:138
BlockGoto::gototarget
FlowBlock * gototarget
The target block of the unstructured branch.
Definition: block.hh:443
TypeOpCallother::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:284
RuleXorCollapse::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3721
OpBehaviorBoolOr::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:527
IopSpace::printRaw
virtual void printRaw(ostream &s, uintb offset) const
Write an address in this space to a stream.
Definition: op.cc:35
ArchitectureGhidra::writeStringStream
static void writeStringStream(ostream &s, const string &msg)
Send a string to the client.
Definition: ghidra_arch.cc:167
BlockGraph::collectReachable
void collectReachable(vector< FlowBlock * > &res, FlowBlock *bl, bool un) const
Collect reachable/unreachable FlowBlocks from a given start FlowBlock.
Definition: block.cc:2047
FloatFormat::setExponentCode
uintb setExponentCode(uintb x, uintb code) const
Set the exponent of an encoded value.
Definition: float.cc:184
TypeField::name
string name
Name of subfield.
Definition: type.hh:126
ActionParamDouble
Deal with situations that look like double precision parameters.
Definition: coreaction.hh:694
CPUI_LOAD
@ CPUI_LOAD
Load from a pointer into a specified address space.
Definition: opcodes.hh:37
JumpBasic::ispoint
static bool ispoint(Varnode *vn)
Is it possible for the given Varnode to be a switch variable?
Definition: jumptable.cc:428
ParamTrial::splitLo
ParamTrial splitLo(int4 sz) const
Create a trial representing the last part of this.
Definition: fspec.cc:1318
Funcdata::setInputVarnode
Varnode * setInputVarnode(Varnode *vn)
Mark a Varnode as an input to the function.
Definition: funcdata_varnode.cc:327
RuleSubNormal
Pull-back SUBPIECE through INT_RIGHT and INT_SRIGHT.
Definition: ruleaction.hh:1106
Funcdata::beginLoc
VarnodeLocSet::const_iterator beginLoc(AddrSpace *spaceid) const
Start of Varnodes stored in a given address space.
Definition: funcdata.hh:304
ParamTrial::killedbycall
@ killedbycall
Data in this location is unlikely to flow thru a func and still be a param.
Definition: fspec.hh:165
CPUI_INT_SEXT
@ CPUI_INT_SEXT
Sign extension.
Definition: opcodes.hh:59
FuncProto::dotdotdot
@ dotdotdot
Set if this prototype takes variable arguments (varargs)
Definition: fspec.hh:1149
EmitPrettyPrint::setMaxLineSize
virtual void setMaxLineSize(int4 val)
Provide a maximum line size to the pretty printer.
Definition: prettyprint.cc:1205
Heritage::StackNode::traversals
uint4 traversals
What kind of operations has this pointer accumulated.
Definition: heritage.hh:186
ActionExtraPopSetup
Define formal link between stack-pointer values before and after sub-function calls.
Definition: coreaction.hh:640
CastStrategy::intPromotionType
virtual int4 intPromotionType(const Varnode *vn) const =0
Calculate the integer promotion code of a given Varnode.
WidenerNone::doWidening
virtual bool doWidening(const ValueSet &valueSet, CircleRange &range, const CircleRange &newRange)
For an iteration that isn't stabilizing attempt to widen the given ValueSet.
Definition: rangeutil.cc:1882
ActionSegmentize::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:613
Funcdata::opSetOpcode
void opSetOpcode(PcodeOp *op, OpCode opc)
Set the op-code for a specific PcodeOp.
Definition: funcdata_op.cc:23
ConstantPoolInternal::empty
virtual bool empty(void) const
Is the container empty of records.
Definition: cpool.hh:194
PcodeInjectLibrary::scriptMap
map< string, int4 > scriptMap
Map of registered script names to ExecutablePcode id.
Definition: pcodeinject.hh:170
PcodeOpRaw::clearInputs
void clearInputs(void)
Remove all input varnodes to this op.
Definition: pcoderaw.hh:199
FlowInfo::handleOutOfBounds
void handleOutOfBounds(const Address &fromaddr, const Address &toaddr)
Generate warning message or throw exception for given flow that is out of bounds.
Definition: flow.cc:505
Varnode::volatil
@ volatil
This varnode's value is volatile.
Definition: varnode.hh:85
RulePtrArith::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5932
RuleOrPredicate::MultiPredicate::discoverConditionalZero
bool discoverConditionalZero(Varnode *vn)
Verify that CBRANCH boolean expression is either (vn == 0) or (vn != 0)
Definition: condexe.cc:968
BlockGraph::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *m)
Restore this BlockGraph from an XML stream.
Definition: block.cc:1329
FuncProto::resolveModel
void resolveModel(ParamActive *active)
If this has a merged model, pick the most likely model (from the merged set)
Definition: fspec.cc:2909
Heritage::findAddressForces
void findAddressForces(vector< PcodeOp * > &copySinks, vector< PcodeOp * > &forces)
Find the last PcodeOps that write to specific addresses that flow to specific sites.
Definition: heritage.cc:466
RuleSubCommute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4122
TypeSpacebase::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:1153
DynamicHash::gatherFirstLevelVars
static void gatherFirstLevelVars(vector< Varnode * > &varlist, const Funcdata *fd, const Address &addr, uint8 h)
Get the Varnodes immediately attached to PcodeOps at the given address.
Definition: dynamic.cc:426
TraceDAG::TraceDAG
TraceDAG(list< FloatingEdge > &lg)
Clear the visitcount field of any FlowBlock we have modified.
Definition: blockaction.cc:944
ParamListStandard::buildTrialMap
void buildTrialMap(ParamActive *active) const
Build map from parameter trials to model ParamEntrys.
Definition: fspec.cc:586
EmulatePcodeCache::current_op
int4 current_op
Index of current pcode op within machine instruction.
Definition: emulate.hh:304
Datatype::restoreXmlBasic
void restoreXmlBasic(const Element *el)
Recover basic data-type properties.
Definition: type.cc:273
ActionInferTypes::writeBack
static bool writeBack(Funcdata &data)
Commit the final propagated data-types to Varnodes.
Definition: coreaction.cc:4077
FuncProto::hasEffect
uint4 hasEffect(const Address &addr, int4 size) const
Calculate the effect this has an a given storage location.
Definition: fspec.cc:3349
IopSpace::saveXmlAttributes
virtual void saveXmlAttributes(ostream &s, uintb offset) const
Save an address as XML.
Definition: op.hh:35
RuleTrivialBool::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:451
ArchitectureGhidra::modifySpaces
virtual void modifySpaces(Translate *trans)
Modify address spaces as required by this Architecture.
Definition: ghidra_arch.hh:80
FuncCallSpecs::fd
Funcdata * fd
The Funcdata object for the called functon (if known)
Definition: fspec.hh:1440
Action::disableRule
bool disableRule(const string &specify)
Disable a specific Rule within this.
Definition: action.cc:218
TypeOpPopcount::TypeOpPopcount
TypeOpPopcount(TypeFactory *t)
Constructor.
Definition: typeop.cc:1864
opcodes.hh
All the individual p-code operations.
PcodeEmit::dump
virtual void dump(const Address &addr, OpCode opc, VarnodeData *outvar, VarnodeData *vars, int4 isize)=0
The main pcode emit method.
Scope::parent
Scope * parent
The parent scope.
Definition: database.hh:417
ConditionalJoin::exitb
BlockBasic * exitb
Second (common) exit point.
Definition: blockaction.hh:244
FloatFormat::denormalized
@ denormalized
A denormalized encoding (for very small values)
Definition: float.hh:38
AncestorRealistic::pop_fail
@ pop_fail
Backtracking, from path with a bad ancestor.
Definition: funcdata.hh:601
TokenSplit::docu_e
@ docu_e
End of a document.
Definition: prettyprint.hh:296
RuleBxor2NotEqual::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:104
RawBinaryArchitecture::saveXml
virtual void saveXml(ostream &s) const
Serialize this architecture to XML.
Definition: raw_arch.cc:84
AddrSpace::restoreXml
virtual void restoreXml(const Element *el)
Recover the details of this space from XML.
Definition: space.cc:297
TypeFactory::parseEnumConfig
void parseEnumConfig(const Element *el)
Parse the <enum> tag.
Definition: type.cc:2253
RangeHint::RangeType
RangeType
The basic categorization of the range.
Definition: varmap.hh:74
PrintLanguage::opBinary
void opBinary(const OpToken *tok, const PcodeOp *op)
Push a binary operator onto the RPN stack.
Definition: printlanguage.cc:666
FlowBlock::clearOutEdgeFlag
void clearOutEdgeFlag(int4 i, uint4 lab)
Remove an out edge label.
Definition: block.cc:238
WidenerFull
Class for doing normal widening.
Definition: rangeutil.hh:234
ContextDatabase::createSet
virtual TrackedSet & createSet(const Address &addr1, const Address &addr2)=0
Create a tracked register set that is valid over the given range.
ActionSetCasts::castOutput
static int4 castOutput(PcodeOp *op, Funcdata &data, CastStrategy *castStrategy)
Insert cast to output Varnode type after given PcodeOp if it is necessary.
Definition: coreaction.cc:2162
OptionErrorReinterpreted::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:649
BlockSwitch::CaseOrder::chain
int4 chain
Who we immediately chain to, expressed as caseblocks index, -1 for no chaining.
Definition: block.hh:638
EmitPrettyPrint::expand
void expand(void)
Expand the stream buffer.
Definition: prettyprint.cc:562
LaneDescription::restriction
bool restriction(int4 numLanes, int4 skipLanes, int4 bytePos, int4 size, int4 &resNumLanes, int4 &resSkipLanes) const
Decide if a given truncation is natural for this description.
Definition: transform.cc:129
TransformManager::preexistingGuard
static bool preexistingGuard(int4 slot, TransformVar *rvn)
Should newPreexistingOp be called.
Definition: transform.hh:240
circularqueue::circularqueue
circularqueue(int4 sz)
Construct queue of a given size.
Definition: prettyprint.hh:630
EmulatePcodeOp::EmulatePcodeOp
EmulatePcodeOp(Architecture *g)
Constructor.
Definition: emulateutil.cc:20
FunctionSymbol::saveXml
virtual void saveXml(ostream &s) const
Save this Symbol to an XML stream.
Definition: database.cc:571
EmitXml::endFuncProto
virtual void endFuncProto(int4 id)
End a function prototype declaration.
Definition: prettyprint.cc:146
SleighArchitecture::resolveArchitecture
virtual void resolveArchitecture(void)
Figure out the processor and compiler of the target executable.
Definition: sleigh_arch.cc:171
Architecture::commentdb
CommentDatabase * commentdb
Comments for this architecture.
Definition: architecture.hh:147
CompilerTag::restoreXml
void restoreXml(const Element *el)
Restore the record from an XML stream.
Definition: sleigh_arch.cc:27
InjectContext::saveXml
virtual void saveXml(ostream &s) const =0
Save this context to an XML stream as a <context> tag.
PrintLanguage::head_comment_type
uint4 head_comment_type
Type of header comments to display.
Definition: printlanguage.hh:247
Scope::addFunction
FunctionSymbol * addFunction(const Address &addr, const string &nm)
Create a function Symbol at the given address in this Scope.
Definition: database.cc:1555
HeritageInfo::deadremoved
int4 deadremoved
>0 if Varnodes in this space have been eliminated
Definition: heritage.hh:90
TraceDAG::BlockTrace::BlockTrace
BlockTrace(BranchPoint *t, int4 po, int4 eo)
Construct given a parent BranchPoint and path index.
Definition: blockaction.cc:579
TypeOpIntRem::TypeOpIntRem
TypeOpIntRem(TypeFactory *t)
Constructor.
Definition: typeop.cc:1288
ContextInternal::registerVariable
virtual void registerVariable(const string &nm, int4 sbit, int4 ebit)
Register a new named context variable (as a bit range) with the database.
Definition: globalcontext.cc:380
ProtoModel::checkOutputJoin
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
PcodeInjectLibrary::manualCallOtherFixup
virtual int4 manualCallOtherFixup(const string &name, const string &outname, const vector< string > &inname, const string &snippet)=0
Manually add a callother-fixup payload given a compilable snippet of p-code source.
ContextCache
A helper class for caching the active context blob to minimize database lookups.
Definition: globalcontext.hh:309
Database::resolveScopeSymbolName
Scope * resolveScopeSymbolName(const string &fullname, const string &delim, string &basename, Scope *start) const
Get the Scope (and base name) associated with a qualified Symbol name.
Definition: database.cc:2929
ConditionalExecution::predefineDirectMulti
void predefineDirectMulti(PcodeOp *op)
Prebuild a replacement MULTIEQUAL for output Varnode of the given PcodeOp in posta_block.
Definition: condexe.cc:501
TraceDAG::activecount
int4 activecount
Number of active BlockTrace objects.
Definition: blockaction.hh:157
ActionActiveParam
Determine active parameters to sub-functions.
Definition: coreaction.hh:712
CPUI_MULTIEQUAL
@ CPUI_MULTIEQUAL
Phi-node operator.
Definition: opcodes.hh:112
Varnode::clearCover
void clearCover(void) const
Turn off any coverage information.
Definition: varnode.cc:217
PcodeEmitFd::fd
Funcdata * fd
The Funcdata container to emit to.
Definition: funcdata.hh:554
SleighBase::getUserOpNames
virtual void getUserOpNames(vector< string > &res) const
Get a list of all user-defined pcode ops.
Definition: sleighbase.cc:135
TypeFactory::getTypeCode
TypeCode * getTypeCode(const string &n)
Create a default "code" type.
Definition: type.cc:1740
FspecSpace::saveXmlAttributes
virtual void saveXmlAttributes(ostream &s, uintb offset) const
Save an address as XML.
Definition: fspec.cc:1564
Datatype::flags
uint4 flags
Boolean properties of the type.
Definition: type.hh:83
EmitXml::closeGroup
virtual void closeGroup(int4 id)
End a group of things that are printed together.
Definition: prettyprint.hh:137
EmulateFunction::getVarnodeValue
virtual uintb getVarnodeValue(Varnode *vn) const
Given a specific Varnode, retrieve the current value for it from the machine state.
Definition: jumptable.cc:143
opFlipInPlaceExecute
void opFlipInPlaceExecute(Funcdata &data, vector< PcodeOp * > &fliplist)
Perform op-code flips (in-place) to change a boolean value.
Definition: funcdata_op.cc:1083
RuleConditionalMove
Simplify various conditional move situations.
Definition: ruleaction.hh:1349
TypeField
Specifies subfields of a structure or what a pointer points to.
Definition: type.hh:124
IPTR_PROCESSOR
@ IPTR_PROCESSOR
Normal spaces modelled by processor.
Definition: space.hh:30
TypeOpIntOr::TypeOpIntOr
TypeOpIntOr(TypeFactory *t)
Constructor.
Definition: typeop.cc:1105
Translate::getUserOpNames
virtual void getUserOpNames(vector< string > &res) const =0
Get a list of all user-defined pcode ops.
PrintC::opFloatTrunc
virtual void opFloatTrunc(const PcodeOp *op)
Emit a FLOAT_TRUNC operator.
Definition: printc.hh:278
ProtoModel::characterizeAsInputParam
int4 characterizeAsInputParam(const Address &loc, int4 size) const
Characterize whether the given range overlaps parameter storage.
Definition: fspec.hh:717
ProtoModel::possibleInputParamWithSlot
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
OptionProtoEval::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:697
PrintLanguage::emitBlockGraph
virtual void emitBlockGraph(const BlockGraph *bl)=0
Emit (an unspecified) list of blocks.
Architecture::cacheAddrSpaceProperties
void cacheAddrSpaceProperties(void)
Calculate some frequently used space properties and cache them.
Definition: architecture.cc:651
RawBinaryArchitecture::buildLoader
virtual void buildLoader(DocumentStorage &store)
Build the LoadImage object and load the executable image.
Definition: raw_arch.cc:51
TypeOpPopcount::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:801
FlowBlock::f_joined_block
@ f_joined_block
Block is a merged form of original basic blocks.
Definition: block.hh:91
BlockCondition::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2807
Architecture::translate
const Translate * translate
Translation method for this binary.
Definition: architecture.hh:143
TypeFactory::dependentOrder
void dependentOrder(vector< Datatype * > &deporder) const
Place all data-types in dependency order.
Definition: type.cc:1611
CircleRange::widen
void widen(const CircleRange &op2, bool leftIsStable)
Widen the unstable bound to match containing range.
Definition: rangeutil.cc:1381
JumpModelTrivial::size
uint4 size
Number of addresses in the table as reported by the JumpTable.
Definition: jumptable.hh:323
SleighArchitecture::description
static vector< LanguageDescription > description
List of languages we know about.
Definition: sleigh_arch.hh:92
ProtoModelMerged::intersectEffects
void intersectEffects(const vector< EffectRecord > &efflist)
Fold EffectRecords into this model.
Definition: fspec.cc:2123
Funcdata::deadRemovalAllowed
bool deadRemovalAllowed(AddrSpace *spc) const
Check if dead code removal is allowed for a specific address space.
Definition: funcdata.hh:225
TypeFactory::typecache16
Datatype * typecache16
Specially cached 16-byte float type.
Definition: type.hh:389
RuleShiftAnd::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4506
ValueSet::iterate
bool iterate(Widener &widener)
Regenerate this value set from operator inputs.
Definition: rangeutil.cc:1597
PrintC::not_equal
static OpToken not_equal
The not equal operator.
Definition: printc.hh:90
OptionIntegerFormat
Set the formatting strategy used by the decompiler to emit integers.
Definition: options.hh:189
Scope::stackClosestFit
static const Scope * stackClosestFit(const Scope *scope1, const Scope *scope2, const Address &addr, int4 size, const Address &usepoint, SymbolEntry **addrmatch)
Definition: database.cc:909
PrintC::opIndirect
virtual void opIndirect(const PcodeOp *op)
Emit a INDIRECT operator.
Definition: printc.hh:283
TransformManager::opSetOutput
void opSetOutput(TransformOp *rop, TransformVar *rvn)
Mark given variable as output of given op.
Definition: transform.hh:223
OpBehaviorIntLeft
CPUI_INT_LEFT behavior.
Definition: opbehavior.hh:261
PcodeOp::is_destructor
@ is_destructor
Op is call to a destructor.
Definition: op.hh:105
TypeFactory::getTypePointerAbsolute
TypePointer * getTypePointerAbsolute(int4 s, Datatype *pt, uint4 ws)
Construct an absolute pointer data-type.
Definition: type.cc:1774
ActionDeadCode::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:548
PrintLanguage::docSingleGlobal
virtual void docSingleGlobal(const Symbol *sym)=0
Emit the declaration for a single (global) Symbol.
RuleTestSign
Convert sign-bit test to signed comparison: (V s>> 0x1f) != 0 => V s< 0
Definition: ruleaction.hh:578
RulePtrFlow::hasTruncations
bool hasTruncations
true if this architecture needs truncated pointers
Definition: ruleaction.hh:1266
BlockMultiGoto::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:2697
GhidraTranslate::glb
ArchitectureGhidra * glb
The Ghidra Architecture and connection to the client.
Definition: ghidra_translate.hh:35
DynamicHash::clear
void clear(void)
Called for each additional hash (after the first)
Definition: dynamic.cc:190
ProtoParameter::isSizeTypeLocked
virtual bool isSizeTypeLocked(void) const =0
Is the size of the parameter locked.
TypeOpPtrsub::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1708
AddrSpaceManager::renormalizeJoinAddress
void renormalizeJoinAddress(Address &addr, int4 size)
Make sure a possibly offset join address has a proper JoinRecord.
Definition: translate.cc:803
RangeHint::type
Datatype * type
Putative data-type for a single element of this range.
Definition: varmap.hh:83
FunctionSymbol::fd
Funcdata * fd
The underlying meta-data object for the function.
Definition: database.hh:252
TypeOpIntSright::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1217
Architecture::types
TypeFactory * types
List of types for this binary.
Definition: architecture.hh:142
TransformVar::flags
uint4 flags
Boolean properties of the placeholder.
Definition: transform.hh:48
FuncCallSpecs::getSpacebaseRelative
Varnode * getSpacebaseRelative(void) const
Get the active stack-pointer Varnode at this call site.
Definition: fspec.cc:4049
TypeOp::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.hh:139
Address::operator=
Address & operator=(const Address &op2)
Copy an address.
Definition: address.hh:315
EmulatePcodeOp::getExecuteAddress
virtual Address getExecuteAddress(void) const
Get the address of the current instruction being executed.
Definition: emulateutil.hh:80
ActionDirectWrite::propagateIndirect
bool propagateIndirect
Propagate thru CPUI_INDIRECT ops.
Definition: coreaction.hh:238
SubvariableFlow::PatchRecord::in2
ReplaceVarnode * in2
(optional second parameter)
Definition: subflow.hh:76
Architecture::readonlypropagate
bool readonlypropagate
true if readonly values should be treated as constants
Definition: architecture.hh:128
EffectRecord::EffectRecord
EffectRecord(const Address &addr, int4 size)
Construct a memory range with an unknown effect.
Definition: fspec.cc:1625
FlowBlock::negateCondition
virtual bool negateCondition(bool toporbottom)
Flip the condition computed by this.
Definition: block.cc:282
Sleigh::allowContextSet
virtual void allowContextSet(bool val) const
Toggle whether disassembly is allowed to affect context.
Definition: sleigh.cc:684
RuleLoadVarnode::vnSpacebase
static AddrSpace * vnSpacebase(Architecture *glb, Varnode *vn, uintb &val, AddrSpace *spc)
Check if given Varnode is spacebase + a constant.
Definition: ruleaction.cc:3855
RuleConcatZero::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:827
RuleSubExtComm::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4056
PrototypePieces::dotdotdot
bool dotdotdot
True if prototype takes variable arguments.
Definition: fspec.hh:1133
Varnode::constantMatch
bool constantMatch(uintb val) const
Return true if this is a constant with value val.
Definition: varnode.hh:264
VarnodeBank::create
Varnode * create(int4 s, const Address &m, Datatype *ct)
Create a free Varnode object.
Definition: varnode.cc:874
TypeOpCbranch::TypeOpCbranch
TypeOpCbranch(TypeFactory *t)
Constructor.
Definition: typeop.cc:491
FuncProto::numLikelyTrash
int4 numLikelyTrash(void) const
Get the number of likely-trash locations.
Definition: fspec.cc:3375
RawBinaryArchitectureCapability
Extension point for building an Architecture that reads in raw images.
Definition: raw_arch.hh:22
EffectRecord::operator==
bool operator==(const EffectRecord &op2) const
Equality operator.
Definition: fspec.hh:1554
FuncCallSpecs::buildInputFromTrials
void buildInputFromTrials(Funcdata &data)
Set the final input Varnodes to this CALL based on ParamActive analysis.
Definition: fspec.cc:4713
JumpBasicOverride::clearCopySpecific
void clearCopySpecific(void)
Clear varnodes and ops that are specific to one instance of a function.
Definition: jumptable.cc:1815
MemoryBank::getWordSize
int4 getWordSize(void) const
Get the number of bytes in a word for this memory bank.
Definition: memstate.hh:65
FloatFormat::getHostFloat
double getHostFloat(uintb encoding, floatclass *type) const
Convert an encoding into host's double.
Definition: float.cc:233
ScopeGhidra::clearUnlocked
virtual void clearUnlocked(void)
Clear all unlocked symbols from this scope.
Definition: database_ghidra.hh:102
CPoolRecord::string_literal
@ string_literal
Constant reference to string (passed back as byteData)
Definition: cpool.hh:49
SymbolEntry::getFirstUseAddress
Address getFirstUseAddress(void) const
Get the first code address where this storage is valid.
Definition: database.cc:98
ContextDatabase::getDefaultValue
virtual uintm * getDefaultValue(void)=0
Retrieve the memory region holding all default context values.
Funcdata::printVarnodeTree
void printVarnodeTree(ostream &s) const
Print a description of all Varnodes to a stream.
Definition: funcdata.cc:524
TokenSplit::startComment
int4 startComment(void)
Create a "start a comment block" command.
Definition: prettyprint.hh:561
FuncCallSpecs::offset_unknown
@ offset_unknown
"Magic" stack offset indicating the offset is unknown
Definition: fspec.hh:1463
RuleZextEliminate
Eliminate INT_ZEXT in comparisons: zext(V) == c => V == c
Definition: ruleaction.hh:458
JumpBasic::markModel
void markModel(bool val)
Mark (or unmark) all PcodeOps involved in the model.
Definition: jumptable.cc:1216
Funcdata::opMarkHalt
void opMarkHalt(PcodeOp *op, uint4 flag)
Mark given CPUI_RETURN op as a special halt.
Definition: funcdata_op.cc:35
TypeOpStore::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:231
MemoryBank::MemoryBank
MemoryBank(AddrSpace *spc, int4 ws, int4 ps)
Generic constructor for a memory bank.
Definition: memstate.cc:73
TokenSplit::tag_type
tag_type
The exhaustive list of possible token types.
Definition: prettyprint.hh:294
ProtoModel::hasThis
bool hasThis
True if this model has a this parameter (auto-parameter)
Definition: fspec.hh:629
FlowInfo::isInArray
static bool isInArray(vector< PcodeOp * > &array, PcodeOp *op)
Test if the given p-code op is a member of an array.
Definition: flow.cc:740
PrintC::opBoolXor
virtual void opBoolXor(const PcodeOp *op)
Emit a BOOL_XOR operator.
Definition: printc.hh:261
RulePtrArith::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5926
ActionDatabase::addToGroup
bool addToGroup(const string &grp, const string &basegroup)
Add a group to a root Action.
Definition: action.cc:1048
DynamicHash::opedgeproc
uint4 opedgeproc
Number of edges processed in the opedge list.
Definition: dynamic.hh:63
TypeCode::setProperties
void setProperties(bool hasThisPtr, bool isConstructor, bool isDestructor)
Set additional function properties.
Definition: type.cc:974
EmitNoXml::endFuncProto
virtual void endFuncProto(int4 id)
End a function prototype declaration.
Definition: prettyprint.hh:238
PcodeOpBank::deadlist
list< PcodeOp * > deadlist
List of dead PcodeOps.
Definition: op.hh:247
ParameterBasic::isSizeTypeLocked
virtual bool isSizeTypeLocked(void) const
Is the size of the parameter locked.
Definition: fspec.hh:978
Comment::addr
Address addr
Address associated with the comment.
Definition: comment.hh:41
ActionGroupList::contains
bool contains(const string &nm) const
Check if this ActionGroupList contains a given group.
Definition: action.hh:37
Heritage::heritage
void heritage(void)
Perform one pass of heritage.
Definition: heritage.cc:2231
PrintLanguage::pending
int4 pending
Number of data-flow nodes waiting to be pushed.
Definition: printlanguage.hh:237
EquateSymbol
A Symbol that holds equate information for a constant.
Definition: database.hh:270
Varnode::annotation
@ annotation
This varnode is an annotation and has no dataflow.
Definition: varnode.hh:73
AddrSpace::getName
const string & getName(void) const
Get the name.
Definition: space.hh:262
ConditionalExecution::postb_block
BlockBasic * postb_block
First block in postb path.
Definition: condexe.hh:142
FuncProto::printRaw
void printRaw(const string &funcname, ostream &s) const
Print this prototype as a single line of text.
Definition: fspec.cc:3611
FlowInfo::setupCallSpecs
bool setupCallSpecs(PcodeOp *op, FuncCallSpecs *fc)
Set up the FuncCallSpecs object for a new call site.
Definition: flow.cc:666
LoadImageXml::chunk
map< Address, vector< uint1 > > chunk
Chunks of image data, mapped by address.
Definition: loadimage_xml.hh:33
RuleSubvarSubpiece::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7296
PrintLanguage::force_dec
@ force_dec
Force printing of dec.
Definition: printlanguage.hh:139
PrintLanguage::opCast
virtual void opCast(const PcodeOp *op)=0
Emit a CAST operator.
CollapseStructure::loopbody
list< LoopBody > loopbody
The list of loop bodies for this control-flow graph.
Definition: blockaction.hh:195
SegmentOp::execute
virtual uintb execute(const vector< uintb > &input) const
Compute the output value of this operation, given constant inputs.
Definition: userop.cc:156
CapabilityPoint::initialize
virtual void initialize(void)=0
Complete initialization of an extension point.
TypeOpNew::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1817
Varnode::copySymbol
void copySymbol(const Varnode *vn)
Copy symbol info from vn.
Definition: varnode.cc:438
RulePtrFlow::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7392
ExecutablePcodeGhidra::printTemplate
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_ghidra.cc:143
EmulateSnippet
Emulate a snippet of PcodeOps out of a functional context.
Definition: emulateutil.hh:111
TraceDAG::removeActive
void removeActive(BlockTrace *trace)
Remove a BlockTrace from the active category.
Definition: blockaction.cc:791
JumpAssistOp::restoreXml
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.cc:244
TypeArray::TypeArray
TypeArray(void)
Internal constructor for restoreXml.
Definition: type.hh:252
PcodeEmitFd::dump
virtual void dump(const Address &addr, OpCode opc, VarnodeData *outvar, VarnodeData *vars, int4 isize)
The main pcode emit method.
Definition: funcdata.cc:834
RulePiece2Zext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:262
ScopeMapper
An Address range associated with the symbol Scope that owns it.
Definition: database.hh:795
RuleZextShiftZext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4460
RangeList::merge
void merge(const RangeList &op2)
Merge another RangeList into this.
Definition: address.cc:385
Cover
A description of the topological scope of a single variable object.
Definition: cover.hh:68
SleighArchitecture::buildSpecFile
virtual void buildSpecFile(DocumentStorage &store)
Load any relevant specification files.
Definition: sleigh_arch.cc:202
Merge::findAllIntoCopies
static void findAllIntoCopies(HighVariable *high, vector< PcodeOp * > &copyIns, bool filterTemps)
Find all the COPY ops into the given HighVariable.
Definition: merge.cc:1185
LoadImage::openSectionInfo
virtual void openSectionInfo(void) const
Prepare to read section info.
Definition: loadimage.hh:159
circularqueue::setMax
void setMax(int4 sz)
Establish a new maximum queue size.
Definition: prettyprint.hh:649
Datatype::utf32
@ utf32
32-bit wide chars in unicode UTF32
Definition: type.hh:76
AliasChecker::deriveBoundaries
void deriveBoundaries(const FuncProto &proto)
Set up basic boundaries for the stack layout.
Definition: varmap.cc:475
TypeOpPtrsub::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1677
MemoryState::memspace
vector< MemoryBank * > memspace
Memory banks associated with each address space.
Definition: memstate.hh:151
Override::queryMultistageJumptable
bool queryMultistageJumptable(const Address &addr) const
Check for a multistage marker for a specific indirect jump.
Definition: override.cc:181
ActionRedundBranch::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:504
TruncationTag::size
uint4 size
Size truncated addresses into the space.
Definition: translate.hh:65
EmulateSnippet::getLoadImageValue
uintb getLoadImageValue(AddrSpace *spc, uintb offset, int4 sz) const
Pull a value from the load-image given a specific address.
Definition: emulateutil.cc:148
Funcdata::opInsertBefore
void opInsertBefore(PcodeOp *op, PcodeOp *follow)
Insert given PcodeOp before a specific op.
Definition: funcdata_op.cc:318
Address::operator==
bool operator==(const Address &op2) const
Compare two addresses for equality.
Definition: address.hh:327
FloatFormat::createFloat
static double createFloat(bool sign, uintb signif, int4 exp)
Create a double given sign, fractional, and exponent.
Definition: float.cc:80
PcodeOp::getSlot
int4 getSlot(const Varnode *vn) const
Get the slot number of the indicated input varnode.
Definition: op.hh:157
BlockGraph::newBlockCopy
BlockCopy * newBlockCopy(FlowBlock *bl)
Build a new BlockCopy.
Definition: block.cc:1581
rangemap::erase
void erase(const_iterator iter)
Erase a record given an iterator.
Definition: rangemap.hh:167
IPTR_IOP
@ IPTR_IOP
Special internal PcodeOp reference.
Definition: space.hh:34
FlowBlock::f_goto_edge
@ f_goto_edge
Edge is unstructured.
Definition: block.hh:96
PcodeOp::unary
@ unary
Evaluate as unary expression.
Definition: op.hh:84
Varnode::isAddrTied
bool isAddrTied(void) const
Are all Varnodes at this storage location components of the same high-level variable?
Definition: varnode.hh:230
PcodeOpBank::insertAfterDead
void insertAfterDead(PcodeOp *op, PcodeOp *prev)
Insert the given PcodeOp after a point in the dead list.
Definition: op.cc:774
ParamListStandard::findEntry
const ParamEntry * findEntry(const Address &loc, int4 size) const
Given storage location find matching ParamEntry.
Definition: fspec.cc:448
Architecture::setDefaultModel
void setDefaultModel(const string &nm)
Set the default PrototypeModel.
Definition: architecture.cc:261
LoadImageXml::LoadImageXml
LoadImageXml(const string &f, const Element *el)
Constructor.
Definition: loadimage_xml.cc:21
HighVariable::symboloffset
int4 symboloffset
-1=perfect symbol match >=0, offset
Definition: variable.hh:67
Funcdata::structureReset
void structureReset(void)
Calculate initial basic block structures (after a control-flow change)
Definition: funcdata_block.cc:621
Address::getSpace
AddrSpace * getSpace(void) const
Get the address space.
Definition: address.hh:294
ActionVarnodeProps
Transform based on Varnode properties, such as read-only and volatile.
Definition: coreaction.hh:215
EmulatePcodeCache::executeInstruction
void executeInstruction(void)
Execute (the rest of) a single machine instruction.
Definition: emulate.cc:446
SymbolEntry::restoreXml
List::const_iterator restoreXml(List::const_iterator iter, const AddrSpaceManager *manage)
Restore this from an XML stream.
Definition: database.cc:195
PrintC::shift_left
static OpToken shift_left
The left shift operator.
Definition: printc.hh:83
SegmentOp::spc
AddrSpace * spc
The physical address space into which a segmented pointer points.
Definition: userop.hh:200
PrintLanguage::pushUnnamedLocation
virtual void pushUnnamedLocation(const Address &addr, const Varnode *vn, const PcodeOp *op)=0
Push an address as a substitute for a Symbol onto the RPN stack.
Merge::mergeMultiEntry
void mergeMultiEntry(void)
Merge together Varnodes mapped to SymbolEntrys from the same Symbol.
Definition: merge.cc:819
OpBehaviorFloatNan::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:381
RuleDoubleShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1837
TypeOp::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:212
OptionMaxLineWidth
Set the maximum number of characters per decompiled line.
Definition: options.hh:153
FlowBlock::f_donothing_loop
@ f_donothing_loop
Block does nothing in infinite loop (halt)
Definition: block.hh:87
RulePopcountBoolXor
Simplify boolean expressions that are combined through POPCOUNT.
Definition: ruleaction.hh:1423
BlockCopy::saveXmlHeader
virtual void saveXmlHeader(ostream &s) const
Save basic information as XML attributes.
Definition: block.cc:2614
TypeOpFloatNan::TypeOpFloatNan
TypeOpFloatNan(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1384
TypeOpIntSborrow
Information about the INT_SBORROW op-code.
Definition: typeop.hh:399
ScopeInternal::findAddr
virtual SymbolEntry * findAddr(const Address &addr, const Address &usepoint) const
Find a Symbol at a given address and usepoint.
Definition: database.cc:2087
MemoryBank::space
AddrSpace * space
The address space associated with this memory.
Definition: memstate.hh:41
FlowInfo::insn_max
uint4 insn_max
Maximum number of instructions.
Definition: flow.hh:93
CommentDatabaseGhidra::addComment
virtual void addComment(uint4 tp, const Address &fad, const Address &ad, const string &txt)
Definition: comment_ghidra.cc:56
OpBehaviorSubpiece
CPUI_SUBPIECE behavior.
Definition: opbehavior.hh:499
JumpValues::getValue
virtual uintb getValue(void) const =0
Get the current value.
CPUI_INT_LESS
@ CPUI_INT_LESS
Integer comparison, unsigned less-than (<)
Definition: opcodes.hh:55
RangeList::saveXml
void saveXml(ostream &s) const
Write this RangeList to an XML stream.
Definition: address.cc:538
RangeList::printBounds
void printBounds(ostream &s) const
Print a description of this RangeList to stream.
Definition: address.cc:522
CircleRange::setRange
void setRange(uintb lft, uintb rgt, int4 size, int4 step)
Set directly to a specific range.
Definition: rangeutil.cc:217
ActionActiveParam::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:715
ExecutablePcode::glb
Architecture * glb
The Architecture owning this snippet.
Definition: pcodeinject.hh:135
FlowInfo::doInjection
void doInjection(InjectPayload *payload, InjectContext &icontext, PcodeOp *op, FuncCallSpecs *fc)
Inject the given payload into this flow.
Definition: flow.cc:1158
ActionMergeType
Try to merge Varnodes of the same type (if they don't hold different values at the same time)
Definition: coreaction.hh:395
Comment::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore the comment from XML.
Definition: comment.cc:55
BreakTable::doPcodeOpBreak
virtual bool doPcodeOpBreak(PcodeOpRaw *curop)=0
Invoke any breakpoints associated with this particular pcodeop.
SymbolNameTree
set< Symbol *, SymbolCompareName > SymbolNameTree
A set of Symbol objects sorted by name.
Definition: database.hh:324
JumpModel
A jump-table execution model.
Definition: jumptable.hh:232
DatatypeNameSet
set< Datatype *, DatatypeNameCompare > DatatypeNameSet
A set of data-types sorted by name.
Definition: type.hh:153
architecture.hh
Architecture and associated classes that help manage a single processor architecture and load image.
GhidraTranslate::getRegisterName
virtual string getRegisterName(AddrSpace *base, uintb off, int4 size) const
Get the name of a register given its location.
Definition: ghidra_translate.cc:71
TypeSpacebase::getAddress
Address getAddress(uintb off, int4 sz, const Address &point) const
Construct an Address given an offset.
Definition: type.cc:1171
ProtoStoreSymbol::ProtoStoreSymbol
ProtoStoreSymbol(Scope *sc, const Address &usepoint)
Constructor.
Definition: fspec.cc:2419
Scope::addExternalRef
ExternRefSymbol * addExternalRef(const Address &addr, const Address &refaddr, const string &nm)
Definition: database.cc:1582
FlowBlock::setGotoBranch
void setGotoBranch(int4 i)
Mark a goto branch.
Definition: block.cc:293
RuleTrivialArith::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:441
ArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const =0
Determine if this extension can handle this file.
EmitPrettyPrint::stopIndent
virtual void stopIndent(int4 id)
End an indent level.
Definition: prettyprint.cc:1163
Funcdata::localoverride
Override localoverride
Overrides of data-flow, prototypes, etc. that are local to this function.
Definition: funcdata.hh:83
Address
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
Database::addRange
void addRange(Scope *scope, AddrSpace *spc, uintb first, uintb last)
Add an address range to the ownership of a Scope.
Definition: database.cc:2873
PrototypePieces::intypes
vector< Datatype * > intypes
Input data-types.
Definition: fspec.hh:1131
RangeHint::highind
int4 highind
Minimum upper bound on the array index (if this is open)
Definition: varmap.hh:86
TypeOpLoad::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:221
JumpBasicOverride::values
vector< uintb > values
Normalized switch variable values associated with addresses.
Definition: jumptable.hh:427
ParamListStandard::pointermax
int4 pointermax
If non-zero, maximum size of a data-type before converting to a pointer.
Definition: fspec.hh:495
TypeOpIntLess::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:336
MemoryHashOverlay::alignshift
int4 alignshift
How many LSBs are thrown away from address when doing hash table lookup.
Definition: memstate.hh:130
SplitFlow::processNextWork
bool processNextWork(void)
Process the next logical value on the worklist.
Definition: subflow.cc:1675
AddrSpace::addressToByte
static uintb addressToByte(uintb val, uint4 ws)
Scale from addressable units to byte units.
Definition: space.hh:487
PrintC::emitBlockGraph
virtual void emitBlockGraph(const BlockGraph *bl)
Emit (an unspecified) list of blocks.
Definition: printc.cc:2359
TypeFactory::restoreXml
void restoreXml(const Element *el)
Restore this container from a stream.
Definition: type.cc:2174
RuleFloatRange::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1486
ContextGhidra
An implementation of a ContextDatabase obtaining context information via a Ghidra client.
Definition: ghidra_context.hh:31
PcodeInjectLibrary::registerCallMechanism
void registerCallMechanism(const string &fixupName, int4 injectid)
Map a call mechanism name to a payload id.
Definition: pcodeinject.cc:219
ScopeInternal::assignDefaultNames
void assignDefaultNames(int4 &base)
Assign a default name (via buildVariableName) to any unnamed symbol.
Definition: database.cc:2706
MapState::checker
AliasChecker checker
A collection of pointer Varnodes into our address space.
Definition: varmap.hh:151
SeqNum::SeqNum
SeqNum(const SeqNum &op2)
Copy a sequence number.
Definition: address.hh:123
PrintLanguage::opSubpiece
virtual void opSubpiece(const PcodeOp *op)=0
Emit a SUBPIECE operator.
BlockGraph::newBlockSwitch
BlockSwitch * newBlockSwitch(const vector< FlowBlock * > &cs, bool hasExit)
Build a new BlockSwitch.
Definition: block.cc:1797
ParamEntry::alignment
int4 alignment
How much alignment (0 means only 1 logical value is allowed)
Definition: fspec.hh:70
RulePtrFlow::propagateFlowToDef
bool propagateFlowToDef(Varnode *vn)
Propagate ptrflow property to given Varnode and the defining PcodeOp.
Definition: ruleaction.cc:7437
BlockInfLoop::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2998
EmitXml::endStatement
virtual void endStatement(int4 id)
End a source code statement.
Definition: prettyprint.cc:133
RangeHint::flags
uint4 flags
Additional boolean properties of this range.
Definition: varmap.hh:84
ConditionalExecution::cbranch
PcodeOp * cbranch
CBRANCH in iblock.
Definition: condexe.hh:133
rangemap::const_iterator
PartIterator const_iterator
The main sub-range iterator data-type.
Definition: rangemap.hh:125
FuncProto::clearUnlockedInput
void clearUnlockedInput(void)
Clear input parameters that have not been locked.
Definition: fspec.cc:3140
ConstantPoolInternal::createRecord
virtual CPoolRecord * createRecord(const vector< uintb > &refs)
Allocate a new CPoolRecord object, given a reference to it.
Definition: cpool.cc:198
BlockSwitch::CaseOrder::gototype
uint4 gototype
(If non-zero) What type of unstructured case is this?
Definition: block.hh:640
Funcdata::restoreXml
uint8 restoreXml(const Element *el)
Restore the state of this function from an XML description.
Definition: funcdata.cc:719
Symbol::restoreXml
virtual void restoreXml(const Element *el)
Restore this Symbol from an XML stream.
Definition: database.cc:499
BlockBasic::getEntryAddr
Address getEntryAddr(void) const
Get the address of the (original) first operation to execute.
Definition: block.cc:2195
ActionDoNothing::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:493
FlowBlock::swapEdges
void swapEdges(void)
Swap the first and second out edges.
Definition: block.cc:206
JumpValuesRange::getSize
virtual uintb getSize(void) const
Return the number of values the variables can take.
Definition: jumptable.cc:268
ParamList::getMaxDelay
virtual int4 getMaxDelay(void) const =0
Return the maximum heritage delay across all possible parameters.
Funcdata::nodeSplitCloneVarnode
void nodeSplitCloneVarnode(PcodeOp *op, PcodeOp *newop)
Duplicate output Varnode of the given p-code op, as part of splitting a block.
Definition: funcdata_block.cc:785
ValueSetSolver::ValueSetEdge::iter
list< PcodeOp * >::const_iterator iter
The iterator position for a normal ValueSet node.
Definition: rangeutil.hh:283
PcodeOpBank::changeOpcode
void changeOpcode(PcodeOp *op, TypeOp *newopc)
Change the op-code for the given PcodeOp.
Definition: op.cc:740
CastStrategy::isSubpieceCastEndian
virtual bool isSubpieceCastEndian(Datatype *outtype, Datatype *intype, uint4 offset, bool isbigend) const =0
Is the given data-type truncation considered a cast, given endianess concerns.
TypeOpIntZext::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:940
RuleSwitchSingle
Convert BRANCHIND with only one computed destination to a BRANCH.
Definition: ruleaction.hh:914
ActionRestructureVarnode::numpass
int4 numpass
Number of passes performed for this function.
Definition: coreaction.hh:813
BlockSwitch::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:675
GuardRecord::valueMatch
int4 valueMatch(Varnode *vn2, Varnode *baseVn2, int4 bitsPreserved2) const
Determine if this guard applies to the given Varnode.
Definition: jumptable.cc:593
Funcdata::setRestartPending
void setRestartPending(bool val)
Toggle whether analysis needs to be restarted for this function.
Definition: funcdata.hh:186
FuncProto::setParamshiftApplied
void setParamshiftApplied(bool val)
Toggle whether a parameter shift has been applied.
Definition: fspec.hh:1176
GuardRecord::cbranch
PcodeOp * cbranch
PcodeOp CBRANCH the branches around the switch.
Definition: jumptable.hh:131
EmulatePcodeOp::lastOp
PcodeOp * lastOp
Last PcodeOp that was executed.
Definition: emulateutil.hh:45
Datatype::coretype
@ coretype
This is a basic type which will never be redefined.
Definition: type.hh:66
SubvariableFlow::patchlist
list< PatchRecord > patchlist
Operations getting patched (but with no flow thru)
Definition: subflow.hh:89
ScopeMapper::subsorttype
NullSubsort subsorttype
The sub-sort object for a rangemap.
Definition: database.hh:807
JoinSpace::restoreXmlAttributes
virtual uintb restoreXmlAttributes(const Element *el, uint4 &size) const
Definition: space.cc:529
BlockIf::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2852
FlowBlock::removeInEdge
void removeInEdge(int4 slot)
Remove an incoming edge.
Definition: block.cc:118
ParameterPieces
Basic elements of a parameter: address, data-type, properties.
Definition: fspec.hh:294
EmulateMemory::executeBranchind
virtual void executeBranchind(void)
Standard behavior for a BRANCHIND.
Definition: emulate.cc:270
JumpAssistOp::index2addr
int4 index2addr
Id of p-code script performing index2addr (must be present)
Definition: userop.hh:231
JumpTable::setLastAsMostCommon
void setLastAsMostCommon(void)
Set the most common jump-table target to be the last address in the table.
Definition: jumptable.cc:2328
FuncCallSpecs::name
string name
Name of function if present.
Definition: fspec.hh:1438
ProtoStoreSymbol::clearInput
virtual void clearInput(int4 i)
Clear the input parameter at the specified slot.
Definition: fspec.cc:2506
TypeFactory::restoreXmlTypeWithCodeFlags
Datatype * restoreXmlTypeWithCodeFlags(const Element *el, bool hasThisPtr, bool isConstructor, bool isDestructor)
Restore data-type from XML with extra "code" flags.
Definition: type.cc:1953
PrototypePieces
Raw components of a function prototype (obtained from parsing source code)
Definition: fspec.hh:1127
Varnode::isIndirectZero
bool isIndirectZero(void) const
Is this just a special placeholder representing INDIRECT creation?
Definition: varnode.hh:247
ParamActive::getNumUsed
int4 getNumUsed(void) const
Get number of trials marked as formal parameters.
Definition: fspec.cc:1538
RulePullsubMulti::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:929
Architecture::buildLoader
virtual void buildLoader(DocumentStorage &store)=0
Build the LoadImage object and load the executable image.
TypeOpFloatNan
Information about the FLOAT_NAN op-code.
Definition: typeop.hh:573
AddTreeState::coeff
vector< uintb > coeff
Associated constant multiple.
Definition: ruleaction.hh:36
ValueSetSolver::establishValueSets
void establishValueSets(const vector< Varnode * > &sinks, const vector< PcodeOp * > &reads, Varnode *stackReg, bool indirectAsCopy)
Build value sets for a data-flow system.
Definition: rangeutil.cc:2402
Merge::mergeOpcode
void mergeOpcode(OpCode opc)
Try to force merges of input to output for all p-code ops of a given type.
Definition: merge.cc:265
DynamicHash::getOpCodeFromHash
static OpCode getOpCodeFromHash(uint8 h)
Retrieve the encoded op-code from a hash.
Definition: dynamic.cc:490
EmitPrettyPrint::startComment
virtual int4 startComment(void)
Start a comment block within the emitted source code.
Definition: prettyprint.cc:1111
TransformManager::newConstant
TransformVar * newConstant(int4 size, int4 lsbOffset, uintb val)
Make placeholder for constant Varnode.
Definition: transform.cc:395
ContextCache::curspace
AddrSpace * curspace
Address space of the current valid range.
Definition: globalcontext.hh:312
ContextInternal::FreeArray::mask
uintm * mask
The mask array indicating which variables are explicitly set.
Definition: globalcontext.hh:265
ParamListStandard::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage, vector< EffectRecord > &effectlist, bool normalstack)
Restore the model from an XML stream.
Definition: fspec.cc:1020
ParamListStandard::possibleParam
virtual bool possibleParam(const Address &loc, int4 size) const
Does the given storage location make sense as a parameter.
Definition: fspec.cc:926
ScopeLocal::remapSymbolDynamic
SymbolEntry * remapSymbolDynamic(Symbol *sym, uint8 hash, const Address &usepoint)
Make the primary mapping for the given Symbol, dynamic.
Definition: varmap.cc:1208
PrintLanguage::line_commentindent
int4 line_commentindent
Number of characters a comment line should be indented.
Definition: printlanguage.hh:238
Rule::type_disable
@ type_disable
Is this rule disabled.
Definition: action.hh:196
PrintC::checkPrintNegation
virtual bool checkPrintNegation(const Varnode *vn)
Check whether a given boolean Varnode can be printed in negated form.
Definition: printc.cc:1997
Rule::warnings_given
@ warnings_given
Set if a warning for this rule has been given before.
Definition: action.hh:199
TypeOpCpoolref::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1787
FloatFormat::opNan
uintb opNan(uintb a) const
Test if Not-a-Number (NaN)
Definition: float.cc:403
PrintC::pushCharConstant
void pushCharConstant(uintb val, const TypeChar *ct, const Varnode *vn, const PcodeOp *op)
Push a single character constant to the RPN stack.
Definition: printc.cc:1293
VarnodeBank::findCoveringInput
Varnode * findCoveringInput(int4 s, const Address &loc) const
Find an input Varnode covering a range.
Definition: varnode.cc:1137
Funcdata::findCoveredInput
Varnode * findCoveredInput(int4 s, const Address &loc) const
Find the first input Varnode covered by the given range.
Definition: funcdata.hh:271
TokenSplit::endStatement
void endStatement(int4 id)
Create an "end source code statement" command.
Definition: prettyprint.hh:422
StructureGraph::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:327
BlockCondition::opc
OpCode opc
Type of boolean operation.
Definition: block.hh:517
AncestorRealistic::enterNode
int4 enterNode(State &state)
Traverse into a new Varnode.
Definition: funcdata_varnode.cc:1578
ProtoModel::extrapop
int4 extrapop
Extra bytes popped from stack.
Definition: fspec.hh:619
ActionShadowVar::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:881
Heritage::guardCallOverlappingInput
void guardCallOverlappingInput(FuncCallSpecs *fc, const Address &addr, int4 size)
Guard an address range that is larger than any single parameter.
Definition: heritage.cc:1047
OpBehaviorFloatFloat2Float
CPUI_FLOAT_FLOAT2FLOAT behavior.
Definition: opbehavior.hh:452
UserOpManage::vol_write
VolatileWriteOp * vol_write
(Single) volatile write operation
Definition: userop.hh:255
PrintC::leftequal
static OpToken leftequal
The in-place left shift operator.
Definition: printc.hh:105
ParameterBasic::isNameLocked
virtual bool isNameLocked(void) const
Is the parameter name locked.
Definition: fspec.hh:977
TypePointer::printRaw
virtual void printRaw(ostream &s) const
Print a description of the type to stream.
Definition: type.cc:380
FuncProto::updateOutputNoTypes
void updateOutputNoTypes(const vector< Varnode * > &triallist, TypeFactory *factory)
Update the return value based on Varnode trials, but don't store the data-type.
Definition: fspec.cc:3286
SymbolEntry::EntrySubsort::EntrySubsort
EntrySubsort(bool val)
Given a boolean value, construct the earliest/latest possible sub-sort.
Definition: database.hh:95
RuleMultiCollapse::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2958
CommentSorter::commmap
map< Subsort, Comment * > commmap
Comments for the current function, sorted by block.
Definition: comment.hh:231
JumpBasic::findUnnormalized
virtual void findUnnormalized(uint4 maxaddsub, uint4 maxleftright, uint4 maxext)
Recover the unnormalized switch variable.
Definition: jumptable.cc:1337
Funcdata::opDeadInsertAfter
void opDeadInsertAfter(PcodeOp *op, PcodeOp *prev)
Moved given PcodeOp to specified point in the dead list.
Definition: funcdata.hh:413
ConditionalExecution::findInitPre
bool findInitPre(void)
Find initblock, based on iblock.
Definition: condexe.cc:397
PrintC::opFloatSqrt
virtual void opFloatSqrt(const PcodeOp *op)
Emit a FLOAT_SQRT operator.
Definition: printc.hh:275
EmitNoXml::openParen
virtual int4 openParen(char o, int4 id=0)
Emit an open parenthesis.
Definition: prettyprint.hh:258
OpBehaviorIntZext::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:235
TypeFactory::TypeFactory
TypeFactory(Architecture *g)
Construct a factory.
Definition: type.cc:1204
PcodeCacher
Definition: sleigh.hh:35
Datatype::saveXmlRef
void saveXmlRef(ostream &s) const
Write an XML reference of this to stream.
Definition: type.cc:257
Funcdata
Container for data structures associated with a single function.
Definition: funcdata.hh:45
ArchitectureGhidra::getComments
Document * getComments(const Address &fad, uint4 flags)
Retrieve comments for a particular function.
Definition: ghidra_arch.cc:560
SubvariableFlow::ReplaceVarnode::mask
uintb mask
Bits making up the logical sub-variable.
Definition: subflow.hh:46
Datatype
The base datatype class for the decompiler.
Definition: type.hh:62
ArchitectureCapability::majorversion
static const uint4 majorversion
Current major version of decompiler.
Definition: architecture.hh:71
RangeList::getRange
const Range * getRange(AddrSpace *spaceid, uintb offset) const
Get Range containing the given byte.
Definition: address.cc:425
OpBehaviorFloatCeil
CPUI_FLOAT_CEIL behavior.
Definition: opbehavior.hh:468
RuleDoubleShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:361
RuleDoubleShift
Simplify chained shifts INT_LEFT and INT_RIGHT.
Definition: ruleaction.hh:358
ConditionalJoin::match
bool match(BlockBasic *b1, BlockBasic *b2)
Test blocks for the merge condition.
Definition: blockaction.cc:2045
ArchitectureGhidra::passJavaException
static void passJavaException(ostream &s, const string &tp, const string &msg)
Send an exception message to the Ghidra client.
Definition: ghidra_arch.cc:239
Heritage::seenDeadCode
void seenDeadCode(AddrSpace *spc)
Inform system of dead code removal in given space.
Definition: heritage.cc:2356
ArchitectureGhidra::getExternalRefXML
Document * getExternalRefXML(const Address &addr)
Retrieve a description of an external function.
Definition: ghidra_arch.cc:497
CPUI_PTRADD
@ CPUI_PTRADD
Index into an array ([])
Definition: opcodes.hh:118
TransformVar::val
uintb val
Value of constant or (bit) position within the original big Varnode.
Definition: transform.hh:51
Varnode::~Varnode
~Varnode(void)
Destructor.
Definition: varnode.cc:555
PcodeOpBank::storelist
list< PcodeOp * > storelist
List of STORE PcodeOps.
Definition: op.hh:249
MemoryBank::find
virtual uintb find(uintb addr) const =0
Retrieve a word from memory bank at an aligned location.
PrintJavaCapability::printJavaCapability
static PrintJavaCapability printJavaCapability
The singleton instance.
Definition: printjava.hh:29
Funcdata::installSwitchDefaults
void installSwitchDefaults(void)
Make sure default switch cases are properly labeled.
Definition: funcdata_block.cc:604
RulePtrsubCharConstant::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6386
PcodeOpBank::findOp
PcodeOp * findOp(const SeqNum &num) const
Find a PcodeOp by sequence number.
Definition: op.cc:834
Funcdata::saveXml
void saveXml(ostream &s, uint8 id, bool savetree) const
Emit an XML description of this function to stream.
Definition: funcdata.cc:687
SymbolEntry::hash
uint8 hash
A dynamic storage address (an alternative to addr for dynamic symbols)
Definition: database.hh:56
CPUI_FLOAT_NOTEQUAL
@ CPUI_FLOAT_NOTEQUAL
Floating-point comparison, in-equality (!=)
Definition: opcodes.hh:87
BlockList
A series of blocks that execute in sequence.
Definition: block.hh:495
RuleSubvarAnd::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7251
TokenSplit::hl
EmitXml::syntax_highlight hl
Highlighting for token.
Definition: prettyprint.hh:329
Varnode::contains
int4 contains(const Varnode &op) const
Return info about the containment of op in this.
Definition: varnode.cc:97
DynamicHash::addrresult
Address addrresult
Address most closely associated with variable.
Definition: dynamic.hh:70
ActionOutputPrototype
Set the (already) recovered output data-type as a formal part of the prototype.
Definition: coreaction.hh:863
Action::status_start
@ status_start
At start of action.
Definition: action.hh:63
TraceDAG::BadEdgeScore::operator<
bool operator<(const BadEdgeScore &op2) const
Compare for grouping.
Definition: blockaction.cc:628
Action::name
string name
Name of the action.
Definition: action.hh:85
CPoolRecord::pointer_method
@ pointer_method
Pointer to a method, name in token, signature in type.
Definition: cpool.hh:51
EmitXml::tagFuncName
virtual void tagFuncName(const char *ptr, syntax_highlight hl, const Funcdata *fd, const PcodeOp *op)
Emit a function identifier.
Definition: prettyprint.cc:197
JumpValues::getStartOp
virtual PcodeOp * getStartOp(void) const =0
Get the PcodeOp associated with the current value.
RuleConditionalMove::BoolExpress::in0
Varnode * in0
First input.
Definition: ruleaction.hh:1356
EmulateFunction::EmulateFunction
EmulateFunction(Funcdata *f)
Constructor.
Definition: jumptable.cc:124
PrintCCapability::buildLanguage
virtual PrintLanguage * buildLanguage(Architecture *glb)
Build the main PrintLanguage object corresponding to this capability.
Definition: printc.cc:86
OpBehaviorIntSub::recoverInputBinary
virtual uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering an input value.
Definition: opbehavior.cc:295
RawLoadImage::getArchType
virtual string getArchType(void) const
Get a string indicating the architecture type.
Definition: loadimage.cc:69
Funcdata::clean_up_index
uint4 clean_up_index
Creation index of first Varnode created after start of cleanup.
Definition: funcdata.hh:63
PrintLanguage::pushVnImplied
void pushVnImplied(const Varnode *vn, const PcodeOp *op, uint4 m)
Push an implied variable onto the RPN stack.
Definition: printlanguage.cc:185
ActionNormalizeSetup::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:595
ConditionMarker::boolvn
Varnode * boolvn
If basevn is defined by BOOL_NEGATE, this is the unnegated Varnode.
Definition: condexe.hh:36
PrintLanguage::writeUtf8
static void writeUtf8(ostream &s, int4 codepoint)
Write unicode character to stream in UTF8 encoding.
Definition: printlanguage.cc:488
OpBehaviorIntLess
CPUI_INT_LESS behavior.
Definition: opbehavior.hh:159
Scope::inScope
virtual bool inScope(const Address &addr, int4 size, const Address &usepoint) const
Query if the given range is owned by this Scope.
Definition: database.hh:531
Varnode::Varnode
Varnode(int4 s, const Address &m, Datatype *dt)
Construct a free Varnode.
Definition: varnode.cc:523
ScopeInternal::maptable
vector< EntryMap * > maptable
Rangemaps of SymbolEntry, one map for each address space.
Definition: database.hh:731
ScopeInternal::setAttribute
virtual void setAttribute(Symbol *sym, uint4 attr)
Set boolean Varnode properties on a Symbol.
Definition: database.cc:2065
PcodeOpEdge::vn
Varnode * vn
The term Varnode.
Definition: coreaction.hh:1041
RuleAndOrLump::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:454
PcodeOp::nextOp
PcodeOp * nextOp(void) const
Return the next op in the control-flow from this or null.
Definition: op.cc:223
ProtoStore::restoreXml
virtual void restoreXml(const Element *el, ProtoModel *model)=0
Restore any internal parameter descriptions from an XML stream.
SetAction::sendResult
virtual void sendResult(void)
Send results of the command (if any) back to the Ghidra client.
Definition: ghidra_process.cc:397
PrintJava::opLoad
virtual void opLoad(const PcodeOp *op)
Emit a LOAD operator.
Definition: printjava.cc:196
ContextCache::allowset
bool allowset
If set to false, and setContext() call is dropped.
Definition: globalcontext.hh:311
RuleMultiCollapse::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:541
ActionDirectWrite
Mark Varnodes built out of legal parameters.
Definition: coreaction.hh:237
PrintLanguage::emitVarDecl
virtual void emitVarDecl(const Symbol *sym)=0
Emit a variable declaration.
ArchOption::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const =0
Apply a particular configuration option to the Architecture.
EvaluationError
Definition: opbehavior.hh:28
BlockBasic::getSplitPoint
virtual FlowBlock * getSplitPoint(void)
Get the leaf splitting block.
Definition: block.cc:2247
AddrSpace::addressToByteInt
static int4 addressToByteInt(int4 val, uint4 ws)
Scale int4 from addressable units to byte units.
Definition: space.hh:505
PrintC::emitGotoStatement
void emitGotoStatement(const FlowBlock *bl, const FlowBlock *exp_bl, uint4 type)
Emit a statement representing an unstructured branch.
Definition: printc.cc:1912
Cover::merge
void merge(const Cover &op2)
Merge this with another Cover block by block.
Definition: cover.cc:415
RuleSubvarCompZero::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7586
FlowBlock::parent
FlowBlock * parent
The parent block to which this belongs.
Definition: block.hh:108
ActionDatabase::registerUniversal
void registerUniversal(Action *act)
Register the universal root Action.
Definition: action.cc:961
OptionIntegerFormat::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:522
AddrSpace::getManager
AddrSpaceManager * getManager(void) const
Get the space manager.
Definition: space.hh:269
TransformOp::attemptInsertion
bool attemptInsertion(Funcdata *fd)
Try to put the new PcodeOp into its basic block.
Definition: transform.cc:250
Rule::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: action.cc:689
EmitXml::indentincrement
int4 indentincrement
Change in indentlevel per level of nesting.
Definition: prettyprint.hh:82
ContextBitRange::setValue
void setValue(uintm *vec, uintm val) const
Set this value within a given context blob.
Definition: globalcontext.hh:47
CommentDatabaseGhidra
An implementation of CommentDatabase backed by a Ghidra client.
Definition: comment_ghidra.hh:30
ProtoModel::possibleOutputParamWithSlot
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
ParamListStandard::getType
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:515
ParamListStandardOut::getType
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:545
ActionStackPtrFlow::analysis_finished
bool analysis_finished
True if analysis already performed.
Definition: coreaction.hh:84
AncestorRealistic::State::State
State(PcodeOp *o, int4 s)
Constructor given a Varnode read.
Definition: funcdata.hh:584
CPUI_BRANCH
@ CPUI_BRANCH
Always branch.
Definition: opcodes.hh:40
RuleDivTermAdd2::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6681
TypeArray
Datatype object representing an array of elements.
Definition: type.hh:245
FlowInfo::xrefControlFlow
PcodeOp * xrefControlFlow(list< PcodeOp * >::const_iterator oiter, bool &startbasic, bool &isfallthru, FuncCallSpecs *fc)
Analyze control-flow within p-code for a single instruction.
Definition: flow.cc:249
ActionLikelyTrash::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2051
Varnode::input
@ input
This varnode has no ancestor.
Definition: varnode.hh:74
Symbol::saveXmlBody
void saveXmlBody(ostream &s) const
Save details of the Symbol to XML.
Definition: database.cc:472
TypeOpNotEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:312
PrintLanguage::emitVarDeclStatement
virtual void emitVarDeclStatement(const Symbol *sym)=0
Emit a variable declaration statement.
Varnode::hasCover
bool hasCover(void) const
Does this have Cover information?
Definition: varnode.hh:259
ActionBlockStructure
Structure control-flow using standard high-level code constructs.
Definition: blockaction.hh:296
PcodeOp::special_prop
@ special_prop
Does some special form of datatype propagation.
Definition: op.hh:106
Comment::saveXml
void saveXml(ostream &s) const
Save the comment to an XML stream.
Definition: comment.cc:33
FlowBlock::f_switch_out
@ f_switch_out
Output is decided by switch.
Definition: block.hh:79
LaneDivide
Definition: subflow.hh:165
MapState::gatherHighs
void gatherHighs(const Funcdata &fd)
Add HighVariables as hints to the collection.
Definition: varmap.cc:911
Funcdata::findLinkedVarnode
Varnode * findLinkedVarnode(SymbolEntry *entry) const
Find a Varnode matching the given Symbol mapping.
Definition: funcdata_varnode.cc:1032
PrintLanguage::pushAtom
void pushAtom(const Atom &atom)
Push a variable token onto the RPN stack.
Definition: printlanguage.cc:150
AddrSpace::getIndex
int4 getIndex(void) const
Get the integer identifier.
Definition: space.hh:317
OpBehaviorSubpiece::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:724
SubvariableFlow::PatchRecord::patchOp
PcodeOp * patchOp
Op being affected.
Definition: subflow.hh:74
OpBehaviorFloatFloor::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:697
SubvariableFlow::PatchRecord::in1
ReplaceVarnode * in1
The logical variable input.
Definition: subflow.hh:75
AddrSpaceManager::getIopSpace
AddrSpace * getIopSpace(void) const
Get the internal pcode op space.
Definition: translate.hh:442
RuleConcatCommute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4271
TYPE_VOID
@ TYPE_VOID
Standard "void" type, absence of type.
Definition: type.hh:34
Address::isJoin
bool isJoin(void) const
Is this a join value.
Definition: address.hh:418
TraceDAG::current_activeiter
list< BlockTrace * >::iterator current_activeiter
The current active BlockTrace being pushed.
Definition: blockaction.hh:160
SpacebaseSpace
A virtual space stack space.
Definition: translate.hh:170
BlockGraph::clear
void clear(void)
Clear all component FlowBlock objects.
Definition: block.cc:1165
CommentDatabaseGhidra::clearType
virtual void clearType(const Address &fad, uint4 tp)
Clear all comments matching (one of) the indicated types.
Definition: comment_ghidra.hh:38
OpBehaviorIntSrem::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:492
RuleTrivialBool
Simplify boolean expressions when one side is constant.
Definition: ruleaction.hh:448
RulePiece2Sext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:289
TypeFactory
Container class for all Datatype objects in an Architecture.
Definition: type.hh:380
SubvariableFlow::ReplaceOp
Placeholder node for PcodeOp operating on smaller logical values.
Definition: subflow.hh:52
RuleSubvarSext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7704
ParamActive::trial
vector< ParamTrial > trial
The list of parameter trials.
Definition: fspec.hh:224
TypeOpReturn::TypeOpReturn
TypeOpReturn(TypeFactory *t)
Constructor.
Definition: typeop.cc:762
SplitFlow::laneDescription
LaneDescription laneDescription
Description of how to split Varnodes.
Definition: subflow.hh:133
TypeCode::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:1080
TypeOpCopy::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:344
ExecutablePcode::built
bool built
Whether build() method has run, setting up the emulator.
Definition: pcodeinject.hh:137
TypeOpFloatFloor::TypeOpFloatFloor
TypeOpFloatFloor(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1468
RuleHumptyOr
Simplify masked pieces INT_ORed together: (V & ff00) | (V & 00ff) => V
Definition: ruleaction.hh:894
TransformOp::special
uint4 special
Special handling code when creating.
Definition: transform.hh:76
InjectedUserOp
A user defined operation that is injected with other p-code.
Definition: userop.hh:83
Scope::getCategorySize
virtual int4 getCategorySize(int4 cat) const =0
Get the number of Symbols in the given category.
RuleZextShiftZext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:807
Architecture::lanerecords
vector< LanedRegister > lanerecords
Vector registers that have preferred lane sizes.
Definition: architecture.hh:155
Funcdata::switchOverJumpTables
void switchOverJumpTables(const FlowInfo &flow)
Convert jump-table addresses to basic block indices.
Definition: funcdata_block.cc:595
Funcdata::Funcdata
Funcdata(const string &nm, Scope *conf, const Address &addr, int4 sz=0)
Constructor.
Definition: funcdata.cc:23
DynamicHash::clearTotalPosition
static void clearTotalPosition(uint8 &h)
Clear the collision total and position fields within a hash.
Definition: dynamic.cc:526
OptionWarning::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:319
CollapseStructure::likelylistfull
bool likelylistfull
Have we generated a likely goto list for the current innermost loop.
Definition: blockaction.hh:192
SeqNum::operator<<
friend ostream & operator<<(ostream &s, const SeqNum &sq)
Write out a SeqNum to a stream.
Definition: address.cc:19
ScopeLocal::ScopeLocal
ScopeLocal(AddrSpace *spc, Funcdata *fd, Architecture *g)
Constructor.
Definition: varmap.cc:268
Funcdata::opRemoveInput
void opRemoveInput(PcodeOp *op, int4 slot)
Remove a specific input slot for the given PcodeOp.
Definition: funcdata_op.cc:264
DeregisterProgram::inid
int4 inid
The id of the Architecture being terminated.
Definition: ghidra_process.hh:120
LowlevelError::LowlevelError
LowlevelError(const string &s)
Initialize the error with an explanatory string.
Definition: error.hh:47
Action::checkStartBreak
bool checkStartBreak(void)
Check start breakpoint.
Definition: action.cc:50
PrintC::scope
static OpToken scope
The sub-scope/namespace operator.
Definition: printc.hh:66
ScopeLocal::stackGrowsNegative
bool stackGrowsNegative
Marked true if the stack is considered to grow towards smaller offsets.
Definition: varmap.hh:187
TypeEnum::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:296
EmitXml::getParenLevel
int4 getParenLevel(void) const
Get the current parentheses depth.
Definition: prettyprint.hh:202
FlowBlock::isDecisionIn
bool isDecisionIn(int4 i) const
Can this and the i-th input be merged into a BlockIf or BlockList.
Definition: block.hh:246
Translate::instructionLength
virtual int4 instructionLength(const Address &baseaddr) const =0
Get the length of a machine instruction.
TypeFactory::typecache10
Datatype * typecache10
Specially cached 10-byte float type.
Definition: type.hh:388
FuncProto::~FuncProto
~FuncProto(void)
Destructor.
Definition: fspec.cc:3048
Funcdata::beginOpDead
list< PcodeOp * >::const_iterator beginOpDead(void) const
Start of PcodeOp objects in the dead list.
Definition: funcdata.hh:461
Address::isBigEndian
bool isBigEndian(void) const
Is data at this address big endian encoded.
Definition: address.hh:269
LoadImageSection::unalloc
@ unalloc
Not allocated in memory (debug info)
Definition: loadimage.hh:47
TokenSplit::endFuncProto
void endFuncProto(int4 id)
Create an "end function prototype declaration" command.
Definition: prettyprint.hh:434
TypeOpIntXor::TypeOpIntXor
TypeOpIntXor(TypeFactory *t)
Constructor.
Definition: typeop.cc:1077
RuleSubvarAnd
Perform SubVariableFlow analysis triggered by INT_AND.
Definition: ruleaction.hh:1231
PrintC::emitBlockDoWhile
virtual void emitBlockDoWhile(const BlockDoWhile *bl)
Emit a loop structure, check at bottom.
Definition: printc.cc:2606
Datatype::size
int4 size
Size (of variable holding a value of this type)
Definition: type.hh:80
RuleSignForm
Normalize sign extraction: sub(sext(V),c) => V s>> 31
Definition: ruleaction.hh:1187
Datatype::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:110
Translate::addRegister
virtual void addRegister(const string &nm, AddrSpace *base, uintb offset, int4 size)=0
Add a named register to the model for this processor.
Funcdata::branchRemoveInternal
void branchRemoveInternal(BlockBasic *bb, int4 num)
Remove an outgoing branch of the given basic block.
Definition: funcdata_block.cc:190
ConstantPool::saveXml
virtual void saveXml(ostream &s) const =0
Save all records in this container to an XML stream.
InjectPayloadGhidra::getSource
virtual string getSource(void) const
Return a string describing the source of the injection (.cspec, prototype model, etc....
Definition: inject_ghidra.hh:46
ActionInferTypes::propagateAddIn2Out
static Datatype * propagateAddIn2Out(TypeFactory *typegrp, PcodeOp *op, int4 inslot)
Propagate a pointer data-type through an ADD operation.
Definition: coreaction.cc:4136
EffectRecord::killedbycall
@ killedbycall
The memory is changed and is completely unrelated to its original value.
Definition: fspec.hh:309
ActionPrototypeTypes::extendInput
void extendInput(Funcdata &data, Varnode *invn, ProtoParameter *param, BlockBasic *topbl)
Extend Varnode inputs to match prototype model.
Definition: coreaction.cc:3675
Sleigh::setContextDefault
virtual void setContextDefault(const string &nm, uintm val)
Set the default value for a particular context variable.
Definition: sleigh.cc:678
JumpValuesRange
single entry switch variable that can take a range of values
Definition: jumptable.hh:177
ActionNameVars::linkSymbols
static void linkSymbols(Funcdata &data, vector< Varnode * > &namerec)
Link formal Symbols to their HighVariable representative in the given Function.
Definition: coreaction.cc:2461
OpBehaviorFloatTrunc
CPUI_FLOAT_TRUNC behavior.
Definition: opbehavior.hh:460
CPUI_BOOL_XOR
@ CPUI_BOOL_XOR
Boolean exclusive-or (^^)
Definition: opcodes.hh:80
PrintC::emitLabelStatement
void emitLabelStatement(const FlowBlock *bl)
Emit any required label statement for a given basic block.
Definition: printc.cc:2741
SleighArchitecture
An Architecture that uses the decompiler's native SLEIGH translation engine.
Definition: sleigh_arch.hh:89
BlockSwitch::CaseOrder::label
uintb label
The label for this case, as an untyped constant.
Definition: block.hh:636
Address::justifiedContain
int4 justifiedContain(int4 sz, const Address &op2, int4 sz2, bool forceleft) const
Determine if op2 is the least significant part of this.
Definition: address.cc:125
FlowInfo::findRelTarget
PcodeOp * findRelTarget(PcodeOp *op, Address &res) const
Generate the target PcodeOp for a relative branch.
Definition: flow.cc:147
ValueSetSolver::ValueSetEdge::getNext
ValueSet * getNext(void)
Get the ValueSet pointed to by this iterator and advance the iterator.
Definition: rangeutil.cc:1914
ScopeGhidra::endDynamic
virtual list< SymbolEntry >::iterator endDynamic(void)
Ending iterator to dynamic SymbolEntrys.
Definition: database_ghidra.hh:99
BlockGraph::identifyInternal
void identifyInternal(BlockGraph *ident, const vector< FlowBlock * > &nodes)
Move nodes from this into a new BlockGraph.
Definition: block.cc:866
TypeOp::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const =0
Push the specific PcodeOp to the emitter's RPN stack.
MapIterator::operator!=
bool operator!=(const MapIterator &op2) const
Inequality operator.
Definition: database.hh:372
LoadImageGhidra::adjustVma
virtual void adjustVma(long adjust)
Adjust load addresses with a global offset.
Definition: loadimage_ghidra.cc:47
CPoolRecord::pointer_field
@ pointer_field
Pointer to a field, name in token, data-type in type.
Definition: cpool.hh:52
TraceDAG::insertActive
void insertActive(BlockTrace *trace)
Move a BlockTrace into the active category.
Definition: blockaction.cc:779
SubvariableFlow::ReplaceVarnode::val
uintb val
Value of constant (when vn==NULL)
Definition: subflow.hh:47
Varnode::varnode_flags
varnode_flags
Definition: varnode.hh:70
ArchitectureGhidra::getMappedSymbolsXML
Document * getMappedSymbolsXML(const Address &addr)
Get symbols associated with the given address.
Definition: ghidra_arch.cc:475
Funcdata::linkJumpTable
JumpTable * linkJumpTable(PcodeOp *op)
Link jump-table with a given BRANCHIND.
Definition: funcdata_block.cc:421
Funcdata::opInsertAfter
void opInsertAfter(PcodeOp *op, PcodeOp *prev)
Insert given PcodeOp after a specific op.
Definition: funcdata_op.cc:346
PrintLanguage::NodePending::NodePending
NodePending(const Varnode *v, const PcodeOp *o, uint4 m)
Construct a pending data-flow node.
Definition: printlanguage.hh:185
LoopBody::compare_ends
static bool compare_ends(LoopBody *a, LoopBody *b)
Compare the head then tail.
Definition: blockaction.cc:466
TypeOpInt2Comp
Information about the INT_2COMP op-code.
Definition: typeop.hh:407
Heritage::setDeadCodeDelay
void setDeadCodeDelay(AddrSpace *spc, int4 delay)
Set delay for a specific space.
Definition: heritage.cc:2380
TypeFactory::saveXmlCoreTypes
void saveXmlCoreTypes(ostream &s) const
Save core types to stream.
Definition: type.cc:2012
DatatypeNameCompare::operator()
bool operator()(const Datatype *a, const Datatype *b) const
Comparison operator.
Definition: type.hh:143
BlockCopy::copy
FlowBlock * copy
The block being mirrored by this (usually a BlockBasic)
Definition: block.hh:418
ActionNormalizeSetup
Prepare function prototypes for "normalize" simplification.
Definition: coreaction.hh:592
RuleBitUndistribute::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2613
PrintLanguage::opReturn
virtual void opReturn(const PcodeOp *op)=0
Emit a RETURN operator.
RegisterProgram::tspec
string tspec
Configuration (address-spaces) for the Translate object.
Definition: ghidra_process.hh:105
PrintLanguage::syntax
@ syntax
Emit atom as syntax.
Definition: printlanguage.hh:156
opFlipInPlaceTest
int4 opFlipInPlaceTest(PcodeOp *op, vector< PcodeOp * > &fliplist)
Trace a boolean value to a set of PcodeOps that can be changed to flip the boolean value.
Definition: funcdata_op.cc:1023
SubvariableFlow::addBooleanPatch
void addBooleanPatch(PcodeOp *pullop, ReplaceVarnode *rvn, int4 slot)
Mark a subgraph bit variable flowing into an operation taking a boolean input.
Definition: subflow.cc:1099
ConditionalExecution::verify
bool verify(void)
Verify that we have a removable iblock.
Definition: condexe.cc:732
AddrSpaceManager::setDefaultCodeSpace
void setDefaultCodeSpace(int4 index)
Set the default address space (for code)
Definition: translate.cc:254
OpBehaviorEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:167
WidenerFull::fullIteration
int4 fullIteration
The iteration at which a full range is produced.
Definition: rangeutil.hh:236
Funcdata::endLoc
VarnodeLocSet::const_iterator endLoc(const Address &addr) const
End of Varnodes at a storage address.
Definition: funcdata.hh:313
PcodeInjectLibrary::injection
vector< InjectPayload * > injection
Registered injections.
Definition: pcodeinject.hh:166
TYPE_CODE
@ TYPE_CODE
Data is actual executable code.
Definition: type.hh:40
VolatileReadOp
An operation that reads from volatile memory.
Definition: userop.hh:112
Funcdata::compareCallspecs
static bool compareCallspecs(const FuncCallSpecs *a, const FuncCallSpecs *b)
Compare call specification objects by call site address.
Definition: funcdata.cc:449
SleighArchitecture::printMessage
virtual void printMessage(const string &message) const
Print an error message to console.
Definition: sleigh_arch.hh:113
Heritage::clear
void clear(void)
Reset all analysis of heritage.
Definition: heritage.cc:2420
SubvariableFlow::addPush
void addPush(PcodeOp *pushOp, ReplaceVarnode *rvn)
Mark an operation where original data-flow is being pushed into a subgraph variable.
Definition: subflow.cc:1047
DynamicHash
A hash utility to uniquely identify a temporary Varnode in data-flow.
Definition: dynamic.hh:60
TypeEnum::setNameMap
void setNameMap(const map< uintb, string > &nmap)
Establish the value -> name map.
Definition: type.cc:542
rangemap::find_overlap
const_iterator find_overlap(linetype point, linetype end) const
Find first record overlapping given interval.
Definition: rangemap.hh:411
TypeOpIntSdiv::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1276
ActionMultiCse::preferredOutput
static bool preferredOutput(Varnode *out1, Varnode *out2)
Which of two outputs is preferred.
Definition: coreaction.cc:730
PcodeOp::special
@ special
Cannot be evaluated (without special processing)
Definition: op.hh:86
LoadImageXml::adjustVma
virtual void adjustVma(long adjust)
Adjust load addresses with a global offset.
Definition: loadimage_xml.cc:262
OpToken::stage
int4 stage
Additional elements consumed from the RPN stack when emitting this token.
Definition: printlanguage.hh:93
Override::clear
void clear(void)
Clear the entire set of overrides.
Definition: override.cc:19
AddrSpace::isTruncated
bool isTruncated(void) const
Return true if this space is truncated from its original size.
Definition: space.hh:435
ActionActiveReturn
Determine which sub-functions have active output Varnodes.
Definition: coreaction.hh:725
TypeOpFloatLessEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:569
OptionErrorUnimplemented
Toggle whether unimplemented instructions are treated as a fatal error.
Definition: options.hh:219
InjectPayload::CALLOTHERFIXUP_TYPE
@ CALLOTHERFIXUP_TYPE
Injection that replaces a user-defined p-code op, CALLOTHER.
Definition: pcodeinject.hh:82
ParameterBasic::setNameLock
virtual void setNameLock(bool val)
Toggle the lock on the name.
Definition: fspec.cc:2274
Override::generateOverrideMessages
void generateOverrideMessages(vector< string > &messagelist, Architecture *glb) const
Create warning messages that describe current overrides.
Definition: override.cc:269
TermPatternOp
A user defined p-code op that has a dynamically defined procedure.
Definition: userop.hh:144
RulePullsubMulti::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:225
xml_tree
Document * xml_tree(istream &i)
Parse the given XML stream into an in-memory document.
BlockBasic::setOrder
void setOrder(void)
Reset the SeqNum::order field for all PcodeOp objects in this block.
Definition: block.cc:2524
Varnode::printRawHeritage
void printRawHeritage(ostream &s, int4 depth) const
Print a simple SSA subtree rooted at this.
Definition: varnode.cc:658
ValueSet::next
ValueSet * next
Next ValueSet to iterate.
Definition: rangeutil.hh:139
SubvariableFlow::PatchRecord
Operation with a new logical value as (part of) input, but output Varnode is unchanged.
Definition: subflow.hh:63
LoopBody::emitLikelyEdges
void emitLikelyEdges(list< FloatingEdge > &likely, FlowBlock *graph)
Collect likely unstructured edges.
Definition: blockaction.cc:357
Scope::buildVariableName
virtual string buildVariableName(const Address &addr, const Address &pc, Datatype *ct, int4 &index, uint4 flags) const =0
Given an address and data-type, build a suitable generic symbol name.
OpBehaviorFloatNeg::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:421
TypeOpFloatNeg::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:611
OpBehaviorFloatLessEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:564
TypeOpIntLeft::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:450
TokenSplit::count
int4 count
Associated id (for matching begin/end pairs)
Definition: prettyprint.hh:344
MemoryHashOverlay::insert
virtual void insert(uintb addr, uintb val)
Overridden aligned word insert.
Definition: memstate.cc:549
LaneDivide::WorkNode::vn
Varnode * vn
The underlying Varnode with lanes.
Definition: subflow.hh:169
ParamEntry
A contiguous range of memory that can be used to pass parameters.
Definition: fspec.hh:48
CPoolRecord::tag
uint4 tag
Descriptor of type of the object.
Definition: cpool.hh:64
ParameterBasic::addr
Address addr
Storage address of the parameter.
Definition: fspec.hh:966
TypeOpFloatCeil
Information about the FLOAT_CEIL op-code.
Definition: typeop.hh:650
Funcdata::remapDynamicVarnode
void remapDynamicVarnode(Varnode *vn, Symbol *sym, const Address &usepoint, uint8 hash)
Remap a Symbol to a given Varnode using a new dynamic mapping.
Definition: funcdata_varnode.cc:960
TransformManager::preserveAddress
virtual bool preserveAddress(Varnode *vn, int4 bitSize, int4 lsbOffset) const
Should the address of the given Varnode be preserved when constructing a piece.
Definition: transform.cc:344
HighVariable::getTiedVarnode
Varnode * getTiedVarnode(void) const
Find the first address tied member Varnode.
Definition: variable.cc:384
CircleRange::pullBack
Varnode * pullBack(PcodeOp *op, Varnode **constMarkup, bool usenzmask)
Pull-back this range through given PcodeOp.
Definition: rangeutil.cc:1012
SymbolEntry::size
int4 size
Number of bytes consumed by this (piece of the) storage.
Definition: database.hh:58
Architecture::min_funcsymbol_size
int4 min_funcsymbol_size
Minimum size of a function symbol.
Definition: architecture.hh:126
GhidraCommand::rawAction
virtual void rawAction(void)=0
Perform the action of the command.
Varnode::precishi
@ precishi
Is this Varnode the high part of a double precision value.
Definition: varnode.hh:104
SubvariableFlow::ReplaceOp::op
PcodeOp * op
op getting paralleled
Definition: subflow.hh:54
OpBehaviorNotEqual
CPUI_INT_NOTEQUAL behavior.
Definition: opbehavior.hh:138
SymbolEntry::linetype
uintb linetype
The linear element for a rangemap of SymbolEntry.
Definition: database.hh:111
ContextDatabase
An interface to a database of disassembly/decompiler context information.
Definition: globalcontext.hh:108
Heritage::disjoint
LocationMap disjoint
Disjoint cover of memory locations currently being heritaged.
Definition: heritage.hh:203
RuleSub2Add::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3691
TrackedContext
A tracked register (Varnode) and the value it contains.
Definition: globalcontext.hh:68
TypeFactory::getBaseNoChar
Datatype * getBaseNoChar(int4 s, type_metatype m)
Get atomic type excluding "char".
Definition: type.cc:1667
Scope::~Scope
virtual ~Scope(void)
Destructor.
Definition: database.cc:1104
FspecSpace
A special space for encoding FuncCallSpecs.
Definition: fspec.hh:283
SubvariableFlow::addTerminalPatchSameOp
void addTerminalPatchSameOp(PcodeOp *pullop, ReplaceVarnode *rvn, int4 slot)
Mark an operation where a subgraph variable is naturally pulled into the original data-flow.
Definition: subflow.cc:1081
PrintC::greater_equal
static OpToken greater_equal
The greater than or equal operator.
Definition: printc.hh:88
Funcdata::heritage
Heritage heritage
Manager for maintaining SSA form.
Definition: funcdata.hh:80
CommentSorter::setupHeader
void setupHeader(uint4 headerType)
Prepare to walk comments in the header.
Definition: comment.cc:391
BlockGraph::buildDomDepth
int4 buildDomDepth(vector< int4 > &depth) const
Calculate dominator depths.
Definition: block.cc:1949
BlockGraph::moveOutEdge
void moveOutEdge(FlowBlock *blold, int4 slot, FlowBlock *blnew)
Move indicated out edge to a new FlowBlock.
Definition: block.cc:1402
TypeOpLoad::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:412
rangemap::AddrRange::a
linetype a
Start of full range occupied by the entire recordtype.
Definition: rangemap.hh:80
PcodeInjectLibrary::tempbase
uintb tempbase
Offset within unique space for allocating temporaries within a payload.
Definition: pcodeinject.hh:165
TypeStruct::TypeStruct
TypeStruct(const TypeStruct &op)
Construct from another TypeStruct.
Definition: type.cc:712
ScoreProtoModel::finalscore
int4 finalscore
The final fitness score.
Definition: fspec.hh:859
Database
A manager for symbol scopes for a whole executable.
Definition: database.hh:838
TypeOpIntDiv
Information about the INT_DIV op-code.
Definition: typeop.hh:485
Symbol::category
int2 category
Special category (-1==none 0=parameter 1=equate)
Definition: database.hh:166
Funcdata::linkSymbol
Symbol * linkSymbol(Varnode *vn)
Find or create Symbol associated with given Varnode.
Definition: funcdata_varnode.cc:973
TypeSpacebase::glb
Architecture * glb
Architecture for accessing symbol table.
Definition: type.hh:360
TokenSplit::line_t
@ line_t
Required line break with one-time indent level.
Definition: prettyprint.hh:323
OptionCommentInstruction
Toggle whether different comment types are emitted by the decompiler in the body of a function.
Definition: options.hh:183
ScopeGhidra::clear
virtual void clear(void)
Clear all symbols from this scope.
Definition: database_ghidra.cc:253
Scope::findOverlap
virtual SymbolEntry * findOverlap(const Address &addr, int4 size) const =0
Find first Symbol overlapping the given memory range.
PcodeOp::addlflags
uint4 addlflags
Additional boolean attributes for this op.
Definition: op.hh:115
ScopeGhidra::processHole
void processHole(const Element *el) const
Process a response describing a hole.
Definition: database_ghidra.cc:90
AncestorRealistic::State::seen_kill
@ seen_kill
Indicates the Varnode is killed by a call on at least path to MULTIEQUAL.
Definition: funcdata.hh:573
MemoryPageOverlay::insert
virtual void insert(uintb addr, uintb val)
Overridden aligned word insert.
Definition: memstate.cc:417
RegisterProgram::corespec
string corespec
A description of core data-types for the TypeFactory object.
Definition: ghidra_process.hh:106
RawBinaryArchitectureCapability::operator=
RawBinaryArchitectureCapability & operator=(const RawBinaryArchitectureCapability &op2)
Not implemented.
cover.hh
Classes describing the topological scope of variables within a function.
RuleOrCollapse::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:427
EmulatePcodeCache::executeBranch
virtual void executeBranch(void)
Execute branch (including relative branches)
Definition: emulate.cc:402
RuleZextEliminate::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2479
AddrSpaceManager::resolveConstant
Address resolveConstant(AddrSpace *spc, uintb val, int4 sz, const Address &point, uintb &fullEncoding) const
Resolve a native constant into an Address.
Definition: translate.cc:562
BlockGraph::addLoopEdge
void addLoopEdge(FlowBlock *begin, int4 outindex)
Mark a given edge as a loop edge.
Definition: block.cc:1351
PcodeOp::start
SeqNum start
What instruction address is this attached to.
Definition: op.hh:116
TreeHandler::setError
virtual void setError(const string &errmsg)
Callback for handling an error condition during XML parsing.
Definition: xml.hh:239
PrintC::andequal
static OpToken andequal
The in-place logical and operator.
Definition: printc.hh:107
Database::removeRange
void removeRange(Scope *scope, AddrSpace *spc, uintb first, uintb last)
Remove an address range from ownership of a Scope.
Definition: database.cc:2887
Funcdata::findVarnodeInput
Varnode * findVarnodeInput(int4 s, const Address &loc) const
Find the input Varnode with the given size and storage address.
Definition: funcdata.hh:285
SleighBase::maxdelayslotbytes
uint4 maxdelayslotbytes
Maximum number of bytes in a delay-slot directive.
Definition: sleighbase.hh:36
TruncationTag::restoreXml
void restoreXml(const Element *el)
Restore this from XML.
Definition: translate.cc:20
UniqueSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: space.cc:449
PrintLanguage::opFloatFloat2Float
virtual void opFloatFloat2Float(const PcodeOp *op)=0
Emit a FLOAT_FLOAT2FLOAT operator.
RuleOrMask::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:114
FunctionSymbol::FunctionSymbol
FunctionSymbol(Scope *sc, const string &nm, int4 size)
Construct given the name.
Definition: database.cc:540
Funcdata::nodeJoinCreateBlock
BlockBasic * nodeJoinCreateBlock(BlockBasic *block1, BlockBasic *block2, BlockBasic *exita, BlockBasic *exitb, bool fora_block1ishigh, bool forb_block1ishigh, const Address &addr)
Create a new basic block for holding a merged CBRANCH.
Definition: funcdata_block.cc:696
ContextInternal::getVariable
virtual ContextBitRange & getVariable(const string &nm)
Retrieve the context variable description object by name.
Definition: globalcontext.cc:397
Varnode::precislo
@ precislo
Is this Varnode the low part of a double precision value.
Definition: varnode.hh:103
Override::insertIndirectOverride
void insertIndirectOverride(const Address &callpoint, const Address &directcall)
Override an indirect call turning it into a direct call.
Definition: override.cc:99
Architecture::protoModels
map< string, ProtoModel * > protoModels
Parsed forms of possible prototypes.
Definition: architecture.hh:137
Architecture::Architecture
Architecture(void)
Construct an uninitialized Architecture.
Definition: architecture.cc:85
CommentDatabase::clearType
virtual void clearType(const Address &fad, uint4 tp)=0
Clear all comments matching (one of) the indicated types.
BlockMap::manage
const AddrSpaceManager * manage
Address space manager used to restore FlowBlock address ranges.
Definition: block.hh:687
EmulateFunction
A light-weight emulator to calculate switch targets from switch variables.
Definition: jumptable.hh:100
Architecture::hasModel
bool hasModel(const string &nm) const
Does this Architecture have a specific PrototypeModel.
Definition: architecture.cc:184
SymbolEntry::initialize
void initialize(const EntryInitData &data, uintb a, uintb b)
Fully initialize this.
Definition: database.cc:60
PrintC::emitVarDeclStatement
virtual void emitVarDeclStatement(const Symbol *sym)
Emit a variable declaration statement.
Definition: printc.cc:2119
FuncProto::likelytrash
vector< VarnodeData > likelytrash
Locations that may contain trash values.
Definition: fspec.hh:1169
xml_readbool
bool xml_readbool(const string &attr)
Read an XML attribute value as a boolean.
Definition: xml.hh:382
CapabilityPoint
Class for automatically registering extension points to the decompiler.
Definition: capability.hh:36
Varnode::loc
Address loc
Storage location (or constant value) of the Varnode.
Definition: varnode.hh:128
TypeOpBinary
A generic binary operator: two inputs and one output.
Definition: typeop.hh:155
TypeOpFloatEqual::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:548
EmulateSnippet::setVarnodeValue
void setVarnodeValue(uintb offset, uintb val)
Set a temporary register value in the machine state.
Definition: emulateutil.hh:170
TypeArray::getSubEntry
Datatype * getSubEntry(int4 off, int4 sz, int4 *newoff, int4 *el) const
Figure out what a byte range overlaps.
Definition: type.cc:495
PrintC::emitEnumDefinition
void emitEnumDefinition(const TypeEnum *ct)
Emit the definition of an enumeration data-type.
Definition: printc.cc:1761
TypeFactory::getTypeCode
TypeCode * getTypeCode(void)
Get an "anonymous" function data-type.
Definition: type.cc:1726
RuleNegateIdentity::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:164
FuncProto::copyFlowEffects
void copyFlowEffects(const FuncProto &op2)
Copy properties that affect data-flow.
Definition: fspec.cc:2948
RuleSubvarAnd::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7257
ActionDynamicMapping::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:989
RuleDivOpt::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6937
unsignedSubtract128
void unsignedSubtract128(uint8 *a, uint8 *b)
Subtract (in-place) a 128-bit value from a base 128-value.
Definition: address.cc:834
JumpAssistOp
A user defined p-code op for assisting the recovery of jump tables.
Definition: userop.hh:229
ScopeInternal::retypeSymbol
virtual void retypeSymbol(Symbol *sym, Datatype *ct)
Change the data-type of a Symbol within this Scope.
Definition: database.cc:2033
CommentSorter::findPosition
bool findPosition(Subsort &subsort, Comment *comm, const Funcdata *fd)
Establish sorting key for a Comment.
Definition: comment.cc:268
Merge::hideShadows
bool hideShadows(HighVariable *high)
Hide shadow Varnodes related to the given HighVariable by consolidating COPY chains.
Definition: merge.cc:968
ContextCache::getContext
void getContext(const Address &addr, uintm *buf) const
Retrieve the context blob for the given address.
Definition: globalcontext.cc:582
CPUI_RETURN
@ CPUI_RETURN
Return from subroutine.
Definition: opcodes.hh:47
ContextGhidra::getContext
virtual const uintm * getContext(const Address &addr) const
Get the context blob of values associated with a given address.
Definition: ghidra_context.hh:60
TokenSplit::fd
const Funcdata * fd
Associated Function.
Definition: prettyprint.hh:335
TypeOpFloatAbs::TypeOpFloatAbs
TypeOpFloatAbs(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1426
DynamicHash::markop
vector< const PcodeOp * > markop
List of PcodeOps in the sub-graph being hashed.
Definition: dynamic.hh:65
AddrSpaceManager::joinallocate
uintb joinallocate
Next offset to be allocated in join space.
Definition: translate.hh:231
FlowBlock::restoreXmlHeader
virtual void restoreXmlHeader(const Element *el)
Restore basic information for XML attributes.
Definition: block.cc:2340
ParameterSymbol::isNameUndefined
virtual bool isNameUndefined(void) const
Is the name of this parameter undefined.
Definition: fspec.cc:2364
Funcdata::isHeritaged
bool isHeritaged(Varnode *vn)
Check if a specific Varnode has been linked in fully to the syntax tree (SSA)
Definition: funcdata.hh:237
Scope::Scope
Scope(const string &nm, Architecture *g)
Construct an empty scope, given a name and Architecture.
Definition: database.hh:505
TYPE_UNKNOWN
@ TYPE_UNKNOWN
An unknown low-level type. Treated as an unsigned integer.
Definition: type.hh:36
TypeOpBranch::TypeOpBranch
TypeOpBranch(TypeFactory *t)
Constructor.
Definition: typeop.cc:477
EmulateSnippet::currentOp
PcodeOpRaw * currentOp
Current p-code op being executed.
Definition: emulateutil.hh:116
ActionInferTypes::localcount
int4 localcount
Number of passes performed for this function.
Definition: coreaction.hh:924
CastStrategy::isZextCast
virtual bool isZextCast(Datatype *outtype, Datatype *intype) const =0
Is zero-extending an input data-type, producing an output data-type, considered a cast.
TransformManager::createOps
void createOps(void)
Create a new op for each placeholder.
Definition: transform.cc:649
CPUI_INT_XOR
@ CPUI_INT_XOR
Logical/bitwise exclusive-or (^)
Definition: opcodes.hh:67
SubvariableFlow::PatchRecord::patchtype
patchtype
The possible types of patches on ops being performed.
Definition: subflow.hh:66
InjectPayload::dynamic
bool dynamic
True if the injection is generated dynamically.
Definition: pcodeinject.hh:89
PathMeld::internalIntersect
void internalIntersect(vector< int4 > &parentMap)
Calculate intersection of a new Varnode path with the old path.
Definition: jumptable.cc:750
SleighBase::root
SubtableSymbol * root
The root SLEIGH decoding symbol.
Definition: sleighbase.hh:34
SymbolEntry::subsorttype
EntrySubsort subsorttype
The sub-sort object for a rangemap.
Definition: database.hh:112
TraceDAG::BlockTrace::activeiter
list< BlockTrace * >::iterator activeiter
Position of this in the active trace list.
Definition: blockaction.hh:132
ActionRestructureHigh::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2102
BlockBasic::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2552
SleighArchitecture::last_languageindex
static int4 last_languageindex
Index of the LanguageDescription associated with the last Translate object.
Definition: sleigh_arch.hh:91
ParameterSymbol::getName
virtual const string & getName(void) const
Get the name of the parameter ("" for return value)
Definition: fspec.cc:2310
Architecture::userops
UserOpManage userops
Specifically registered user-defined p-code ops.
Definition: architecture.hh:153
PrintLanguage::pushAnnotation
virtual void pushAnnotation(const Varnode *vn, const PcodeOp *op)=0
Push an address which is not in the normal data-flow.
RuleOrPredicate::MultiPredicate::discoverZeroSlot
bool discoverZeroSlot(Varnode *vn)
Check if vn is produced by a 2-branch MULTIEQUAL, one side of which is a zero constant.
Definition: condexe.cc:887
OpBehaviorIntSright
CPUI_INT_SRIGHT behavior.
Definition: opbehavior.hh:277
GhidraTranslate::getUserOpNames
virtual void getUserOpNames(vector< string > &res) const
Get a list of all user-defined pcode ops.
Definition: ghidra_translate.cc:88
BfdArchitectureCapability::BfdArchitectureCapability
BfdArchitectureCapability(void)
Singleton constructor.
Definition: bfd_arch.cc:23
TypeOpEqual::TypeOpEqual
TypeOpEqual(TypeFactory *t)
Constructor.
Definition: typeop.cc:810
ParamListStandard::forceNoUse
void forceNoUse(ParamActive *active, int4 start, int4 stop) const
Mark every trial above the first "definitely not used" as inactive.
Definition: fspec.cc:739
SymbolEntry::uselimit
RangeList uselimit
Code address ranges where this storage is valid.
Definition: database.hh:59
BlockGoto::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:455
FuncProto::is_inline
@ is_inline
Should this be inlined (within calling function) by decompiler.
Definition: fspec.hh:1152
MapState::reconcileDatatypes
void reconcileDatatypes(void)
Decide on data-type for RangeHints at the same address.
Definition: varmap.cc:762
TokenSplit::beginBlock
int4 beginBlock(const FlowBlock *b)
Create a "begin control-flow element" command.
Definition: prettyprint.hh:377
ActionDeterminedBranch
Remove conditional branches if the condition is constant.
Definition: coreaction.hh:512
ArchitectureGhidra::sin
istream & sin
Input stream for interfacing with Ghidra.
Definition: ghidra_arch.hh:61
TokenSplit::rtyp_b
@ rtyp_b
Start of a return type declaration.
Definition: prettyprint.hh:301
BlockGraph::printTree
virtual void printTree(ostream &s, int4 level) const
Print tree structure of any blocks owned by this.
Definition: block.cc:1216
RuleSubvarShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1295
RulePtrFlow::truncatePointer
Varnode * truncatePointer(AddrSpace *spc, PcodeOp *op, Varnode *vn, int4 slot, Funcdata &data)
Truncate pointer Varnode being read by given PcodeOp.
Definition: ruleaction.cc:7483
OptionToggleRule::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:758
TypeOpPtradd::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:1623
EmitXml::keyword_color
@ keyword_color
Keyword in the high-level language.
Definition: prettyprint.hh:88
SymbolEntry::updateType
bool updateType(Varnode *vn) const
Update a Varnode data-type from this.
Definition: database.cc:111
Funcdata::totalReplaceConstant
void totalReplaceConstant(Varnode *vn, uintb val)
Replace every read reference of the given Varnode with a constant value.
Definition: funcdata_varnode.cc:1227
EmitXml::beginFunction
virtual int4 beginFunction(const Funcdata *fd)
Begin a whole declaration and body of a function.
Definition: prettyprint.cc:44
CommentOrder
Compare two Comment pointers.
Definition: comment.hh:72
UserOpManage::getSegmentOp
SegmentOp * getSegmentOp(int4 i) const
Definition: userop.hh:277
ScopeLocal::isUnaffectedStorage
bool isUnaffectedStorage(Varnode *vn) const
Is this a storage location for unaffected registers.
Definition: varmap.hh:206
LaneDescription::lanePosition
vector< int4 > lanePosition
Significance positions of lanes in bytes.
Definition: transform.hh:129
PcodeOpBank::alivelist
list< PcodeOp * > alivelist
List of alive PcodeOps.
Definition: op.hh:248
FuncCallSpecs::transferLockedInput
bool transferLockedInput(vector< Varnode * > &newinput)
List and/or create a Varnode for each input parameter of this prototype.
Definition: fspec.cc:4166
RuleSplitFlow
Try to detect and split artificially joined Varnodes.
Definition: ruleaction.hh:1253
InjectCallotherGhidra::InjectCallotherGhidra
InjectCallotherGhidra(const string &src, const string &nm)
Constructor.
Definition: inject_ghidra.cc:89
Scope::uniqueId
uint4 uniqueId
Unique id for the scope, for deduping scope names, assigning symbol ids.
Definition: database.hh:427
Funcdata::inlineFlow
bool inlineFlow(Funcdata *inlinefd, FlowInfo &flow, PcodeOp *callop)
In-line the p-code from another function into this function.
Definition: funcdata_op.cc:806
NameRecommend
A symbol name recommendation with its associated storage location.
Definition: varmap.hh:29
Architecture::aggressive_ext_trim
bool aggressive_ext_trim
Aggressively trim inputs that look like they are sign extended.
Definition: architecture.hh:127
database.hh
Symbol and Scope objects for the decompiler.
PrintLanguage::docAllGlobals
virtual void docAllGlobals(void)=0
Emit declarations of global variables.
EmitXml::highlight
static const char * highlight[]
Map from syntax_highlight enumeration to color attribute string.
Definition: prettyprint.hh:77
PrintC::emitCommentGroup
void emitCommentGroup(const PcodeOp *inst)
Emit comments associated with a given statement.
Definition: printc.cc:2774
FuncCallSpecs::buildOutputFromTrials
void buildOutputFromTrials(Funcdata &data, vector< Varnode * > &trialvn)
Set the final output Varnode of this CALL based on ParamActive analysis of trials.
Definition: fspec.cc:4792
OptionStructAlign
Alter the "structure alignment" data organization setting.
Definition: options.hh:111
LanedRegister::LanedIterator::mask
uint4 mask
Collection being iterated over.
Definition: transform.hh:94
Range::first
uintb first
Offset of first byte in this Range.
Definition: address.hh:164
FuncProto::setDestructor
void setDestructor(bool val)
Toggle whether this prototype is a destructor method.
Definition: fspec.hh:1262
RuleShiftSub::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4773
RawLoadImage::~RawLoadImage
virtual ~RawLoadImage(void)
RawLoadImage destructor.
Definition: loadimage.cc:46
Heritage::buildRefinement
static void buildRefinement(vector< int4 > &refine, const Address &addr, int4 size, const vector< Varnode * > &vnlist)
Build a refinement array given an address range and a list of Varnodes.
Definition: heritage.cc:1295
ArchitectureGhidra::buildPcodeInjectLibrary
virtual PcodeInjectLibrary * buildPcodeInjectLibrary(void)
Build the injection library.
Definition: ghidra_arch.cc:287
LoadImage::closeSymbols
virtual void closeSymbols(void) const
Stop reading symbols.
Definition: loadimage.hh:140
Datatype::clone
virtual Datatype * clone(void) const =0
Clone the data-type.
TypeOpPtradd::TypeOpPtradd
TypeOpPtradd(TypeFactory *t)
Constructor.
Definition: typeop.cc:1610
ValueSetSolver::nodeStack
vector< ValueSet * > nodeStack
Stack used to generate the topological ordering.
Definition: rangeutil.hh:294
FuncCallSpecs::transferLockedOutputParam
PcodeOp * transferLockedOutputParam(ProtoParameter *param)
Definition: fspec.cc:4134
EmulatePcodeOp::getVarnodeValue
virtual uintb getVarnodeValue(Varnode *vn) const =0
Given a specific Varnode, retrieve the current value for it from the machine state.
Rule2Comp2Mult
Eliminate INT_2COMP: -V => V * -1
Definition: ruleaction.hh:649
UniqueSpace::UniqueSpace
UniqueSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind, uint4 fl)
Constructor.
Definition: space.cc:436
TypeOpIntLessEqual::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:914
WidenerFull::determineIterationReset
virtual int4 determineIterationReset(const ValueSet &valueSet)
Upon entering a fresh partition, determine how the given ValueSet count should be reset.
Definition: rangeutil.cc:1819
FlowBlock::isDecisionOut
bool isDecisionOut(int4 i) const
Can this and the i-th output be merged into a BlockIf or BlockList.
Definition: block.hh:243
ScopeGhidra::end
virtual MapIterator end(void) const
Ending iterator to mapped SymbolEntrys.
Definition: database_ghidra.hh:95
JumpBasicOverride::buildLabels
virtual void buildLabels(Funcdata *fd, vector< Address > &addresstable, vector< uintb > &label, const JumpModel *orig) const
Recover case labels associated with the Address table.
Definition: jumptable.cc:1858
Funcdata::startTypeRecovery
bool startTypeRecovery(void)
Mark that data-type analysis has started.
Definition: funcdata.cc:154
Heritage::merged_node
@ merged_node
Node has already been merged.
Definition: heritage.hh:175
TypeOpIntZext::TypeOpIntZext
TypeOpIntZext(TypeFactory *t)
Constructor.
Definition: typeop.cc:924
RuleConditionalMove::BoolExpress::in1
Varnode * in1
Second input.
Definition: ruleaction.hh:1357
JumpTable::IndexPair::operator<
bool operator<(const IndexPair &op2) const
Compare by position then by index.
Definition: jumptable.hh:572
TransformOp::output
TransformVar * output
Varnode output.
Definition: transform.hh:77
TypeOpReturn
Information about the RETURN op-code.
Definition: typeop.hh:292
InjectCallotherGhidra::restoreXml
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.cc:94
TypeOpSubpiece::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:1576
LoadTable::num
int4 num
Number of entries in table;.
Definition: jumptable.hh:45
EquateSymbol::value
uintb value
Value of the constant being equated.
Definition: database.hh:271
JumpBasicOverride::foldInGuards
virtual bool foldInGuards(Funcdata *fd, JumpTable *jump)
Eliminate any guard code involved in computing the switch destination.
Definition: jumptable.hh:450
Architecture::archid
string archid
ID string uniquely describing this architecture.
Definition: architecture.hh:119
AddrSpaceManager::getDefaultDataSpace
AddrSpace * getDefaultDataSpace(void) const
Get the default address space where data is stored.
Definition: translate.hh:499
UserOpManage::useropmap
map< string, UserPcodeOp * > useropmap
A map from the name of the user defined operation to a description object.
Definition: userop.hh:252
RuleShiftSub::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:867
PcodeOp::setNumInputs
void setNumInputs(int4 num)
Make sure this op has num inputs.
Definition: op.cc:190
RuleAndCommute
Commute INT_AND with INT_LEFT and INT_RIGHT: (V << W) & d => (V & (W >> c)) << c
Definition: ruleaction.hh:318
OptionNoCastPrinting
Toggle whether cast syntax is emitted by the decompiler or stripped.
Definition: options.hh:141
ParamEntry::flags
uint4 flags
Boolean properties of the parameter.
Definition: fspec.hh:62
DynamicHash::gatherUnmarkedOp
void gatherUnmarkedOp(void)
Mark any new PcodeOps in the sub-graph.
Definition: dynamic.cc:179
ArchitectureCapability::thelist
static vector< ArchitectureCapability * > thelist
The list of registered extensions.
Definition: architecture.hh:73
Heritage::rename
void rename(void)
Perform the renaming algorithm for the current set of address ranges.
Definition: heritage.cc:2145
HighVariable::getInputVarnode
Varnode * getInputVarnode(void) const
Find (the) input member Varnode.
Definition: variable.cc:399
Sleigh::instructionLength
virtual int4 instructionLength(const Address &baseaddr) const
Get the length of a machine instruction.
Definition: sleigh.cc:592
EmitPrettyPrint::EmitPrettyPrint
EmitPrettyPrint(int4 mls)
Construct with an initial maximum line size.
Definition: prettyprint.cc:539
ExternRefSymbol::saveXml
virtual void saveXml(ostream &s) const
Save this Symbol to an XML stream.
Definition: database.cc:729
RuleAndPiece::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1683
ActionDatabase::cloneGroup
void cloneGroup(const string &oldname, const string &newname)
Clone a root Action.
Definition: action.cc:1036
JumpValues::truncate
virtual void truncate(int4 nm)=0
Truncate the number of values to the given number.
Varnode::constant
@ constant
The varnode is constant.
Definition: varnode.hh:72
ParamListMerged::clone
virtual ParamList * clone(void) const
Clone this parameter list model.
Definition: fspec.cc:1297
ActionBlockStructure::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: blockaction.cc:2150
ParamList::fillinMap
virtual void fillinMap(ParamActive *active) const =0
Given an unordered list of storage locations, calculate a function prototype.
Attributes::name
vector< string * > name
List of names for each formal XML attribute.
Definition: xml.hh:40
PrintLanguage::opFloatRound
virtual void opFloatRound(const PcodeOp *op)=0
Emit a FLOAT_ROUND operator.
ParameterSymbol::isTypeLocked
virtual bool isTypeLocked(void) const
Is the parameter data-type locked.
Definition: fspec.cc:2334
AddrSpace::clearFlags
void clearFlags(uint4 fl)
Clear a cached attribute.
Definition: space.hh:255
Scope::addSymbolInternal
virtual void addSymbolInternal(Symbol *sym)=0
Put a Symbol into the name map.
Heritage::renameRecurse
void renameRecurse(BlockBasic *bl, VariableStack &varstack)
The heart of the renaming algorithm.
Definition: heritage.cc:2036
RuleSubvarSext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7698
Database::deleteSubScopes
void deleteSubScopes(Scope *scope)
Delete all sub-scopes of the given Scope.
Definition: database.cc:2826
PrintC::pushConstant
virtual void pushConstant(uintb val, const Datatype *ct, const Varnode *vn, const PcodeOp *op)
Push a constant onto the RPN stack.
Definition: printc.cc:1401
HighVariable::type_finalized
@ type_finalized
Set if a final data-type is locked in and dirtying is disabled.
Definition: variable.hh:53
ActionRestartGroup::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: action.cc:512
ValueSetSolver::ValueSetEdge::rootPos
int4 rootPos
The iterator position for the simulated root node.
Definition: rangeutil.hh:281
rangemap::unzip
void unzip(linetype i, typename std::multiset< AddrRange >::iterator iter)
Insert the given partition boundary.
Definition: rangemap.hh:195
InjectContextGhidra
An injection context that can be serialized and sent to the Ghidra client.
Definition: inject_ghidra.hh:29
ConstantSpace::printRaw
virtual void printRaw(ostream &s, uintb offset) const
Definition: space.cc:370
MemoryPageOverlay::page
map< uintb, uint1 * > page
Overlayed pages.
Definition: memstate.hh:112
CastStrategyC::isZextCast
virtual bool isZextCast(Datatype *outtype, Datatype *intype) const
Is zero-extending an input data-type, producing an output data-type, considered a cast.
Definition: cast.cc:353
ActionGroup::printState
virtual void printState(ostream &s) const
Print status to stream.
Definition: action.cc:427
ProtoModel::injectUponEntry
int4 injectUponEntry
Id of injection to perform at beginning of function (-1 means not used)
Definition: fspec.hh:624
InjectedUserOp::injectid
uint4 injectid
The id of the injection object (to which this op maps)
Definition: userop.hh:84
Funcdata::setDoublePrecisRecovery
void setDoublePrecisRecovery(bool val)
Toggle whether double precision analysis is used.
Definition: funcdata.hh:148
TypeOpBranch::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:239
RulePullsubMulti::replaceDescendants
static void replaceDescendants(Varnode *origVn, Varnode *newVn, int4 maxByte, int4 minByte, Funcdata &data)
Definition: ruleaction.cc:768
ContextInternal::restoreFromSpec
virtual void restoreFromSpec(const Element *el, const AddrSpaceManager *manage)
Add initial context state from XML tags in compiler/processor specifications.
Definition: globalcontext.cc:539
ValueSet::vn
Varnode * vn
Varnode whose set this represents.
Definition: rangeutil.hh:135
VarnodeBank::searchvn
Varnode searchvn
Template varnode for searching trees.
Definition: varnode.hh:333
FlowInfo::VisitStat::size
int4 size
Number of bytes in the instruction.
Definition: flow.hh:77
Translate
The interface to a translation engine for a processor.
Definition: translate.hh:293
TokenSplit::type_t
@ type_t
A data-type identifier.
Definition: prettyprint.hh:312
BlockMap::findLevelBlock
FlowBlock * findLevelBlock(int4 index) const
Find the FlowBlock matching the given index.
Definition: block.hh:701
EmitNoXml::beginFuncProto
virtual int4 beginFuncProto(void)
Begin a function prototype declaration.
Definition: prettyprint.hh:237
ConditionalExecution::trial
bool trial(BlockBasic *ib)
Test for a modifiable configuration around the given block.
Definition: condexe.cc:771
ValueSetRead::range
CircleRange range
Range of values or offsets in this set.
Definition: rangeutil.hh:181
AddrSpace::restoreXmlAttributes
virtual uintb restoreXmlAttributes(const Element *el, uint4 &size) const
Recover an offset and size.
Definition: space.cc:148
PriorityQueue::extract
FlowBlock * extract(void)
Retrieve the highest priority block.
Definition: heritage.cc:121
ParameterBasic::getAddress
virtual Address getAddress(void) const
Get the storage address for this parameter.
Definition: fspec.hh:974
PartialSymbolEntry::fieldname
string fieldname
The name of the field.
Definition: printc.hh:49
Symbol::setIsolated
void setIsolated(bool val)
Set whether this Symbol should be speculatively merged.
Definition: database.cc:238
OptionExtraPop
Set the extrapop parameter used by the (default) prototype model.
Definition: options.hh:75
Equal1Form
Definition: double.hh:136
Address::isContiguous
bool isContiguous(int4 sz, const Address &loaddr, int4 losz) const
Does this form a contigous range with loaddr.
Definition: address.cc:167
TypeOpPtradd::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1617
RuleAndDistribute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:281
ParamListStandard::populateResolver
void populateResolver(void)
Build the ParamEntry resolver maps.
Definition: fspec.cc:836
EmulatePcodeOp::executeUnary
virtual void executeUnary(void)
Execute a unary arithmetic/logical operation.
Definition: emulateutil.cc:45
ParamEntryRange::position
int4 position
Position of the ParamEntry within the entire prototype list.
Definition: fspec.hh:107
ParamList::p_standard_out
@ p_standard_out
Standard output (return value) model.
Definition: fspec.hh:343
TypeOpIntSright::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1225
PrintLanguage::opIntLess
virtual void opIntLess(const PcodeOp *op)=0
Emit a INT_LESS operator.
EmulateMemory::executeSegmentOp
virtual void executeSegmentOp(void)
Behavior for a SEGMENTOP.
Definition: emulate.cc:308
Scope::addDynamicSymbol
Symbol * addDynamicSymbol(const string &nm, Datatype *ct, const Address &caddr, uint8 hash)
Create a dynamically mapped Symbol attached to a specific data-flow.
Definition: database.cc:1630
TYPE_STRUCT
@ TYPE_STRUCT
Structure data-type, made up of component datatypes.
Definition: type.hh:45
ActionGroup::print
virtual int4 print(ostream &s, int4 num, int4 depth) const
Print a description of this Action to stream.
Definition: action.cc:411
Funcdata::clearDeadVarnodes
void clearDeadVarnodes(void)
Delete any dead Varnodes.
Definition: funcdata_varnode.cc:696
ParamListStandard
A standard model for parameters as an ordered list of storage resources.
Definition: fspec.hh:491
FloatFormat::opFloat2Float
uintb opFloat2Float(uintb a, const FloatFormat &outformat) const
Convert between floating-point precisions.
Definition: float.cc:505
Heritage::Heritage
Heritage(Funcdata *data)
Constructor.
Definition: heritage.cc:135
RuleSubCancel::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:857
ScoreProtoModel::doScore
void doScore(void)
Compute the fitness score.
Definition: fspec.cc:2081
PrintLanguage::Atom::offset
int4 offset
The offset (within the parent structure) for a field token.
Definition: printlanguage.hh:204
PrintLanguage::ReversePolish::op
const PcodeOp * op
The PcodeOp associated with the operator token.
Definition: printlanguage.hh:170
FunctionSymbol
A Symbol representing an executable function.
Definition: database.hh:251
ContextInternal::getDefaultValue
virtual const uintm * getDefaultValue(void) const
Retrieve the memory region holding all default context values.
Definition: globalcontext.hh:285
HighVariable
A high-level variable modeled as a list of low-level variables, each written once.
Definition: variable.hh:38
Database::restoreXml
void restoreXml(const Element *el)
Recover the whole database from XML.
Definition: database.cc:3076
RuleConditionalMove::BoolExpress::constructBool
Varnode * constructBool(PcodeOp *insertop, Funcdata &data)
Construct the expression after the merge.
Definition: ruleaction.cc:7854
EmulateSnippet::executeNew
virtual void executeNew(void)
Standard behavior for (low-level) NEW op.
Definition: emulateutil.cc:276
TypeSpacebase
Special Datatype object used to describe pointers that index into the symbol table.
Definition: type.hh:356
TypeOpIntSext::TypeOpIntSext
TypeOpIntSext(TypeFactory *t)
Constructor.
Definition: typeop.cc:950
RuleSlessToLess::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2539
InjectPayloadGhidra::source
string source
Source description to associate with the payload.
Definition: inject_ghidra.hh:40
RuleAndCommute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1569
TokenSplit::spac_t
@ spac_t
White space.
Definition: prettyprint.hh:321
Varnode::saveXml
void saveXml(ostream &s) const
Save a description of this as an XML tag.
Definition: varnode.cc:820
Varnode::auto_live
@ auto_live
Is this varnode automatically considered live, never removed as dead-code.
Definition: varnode.hh:108
ScopeGhidra::getCategorySize
virtual int4 getCategorySize(int4 cat) const
Get the number of Symbols in the given category.
Definition: database_ghidra.hh:112
SleighArchitecture::errorstream
ostream * errorstream
Error stream associated with this SleighArchitecture.
Definition: sleigh_arch.hh:99
EmitPrettyPrint::needbreak
bool needbreak
true if break needed before next token
Definition: prettyprint.hh:710
OpBehaviorIntLeft::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:381
op.hh
The PcodeOp and PcodeOpBank classes.
TokenSplit::tagLabel
void tagLabel(const char *ptr, EmitXml::syntax_highlight h, const AddrSpace *s, uintb o)
Create a code label identifier token.
Definition: prettyprint.hh:503
Override::multistagejump
vector< Address > multistagejump
Addresses of indirect jumps that need multistage recovery.
Definition: override.hh:55
TokenSplit::rtyp_e
@ rtyp_e
End of a return type declaration.
Definition: prettyprint.hh:302
CollapseStructure::onlyReachableFromRoot
void onlyReachableFromRoot(FlowBlock *root, vector< FlowBlock * > &body)
Mark FlowBlocks only reachable from a given root.
Definition: blockaction.cc:1045
cpool_ghidra.hh
Utility for implementing a constant pool backed by a Ghidra client.
RuleOrPredicate::MultiPredicate::zeroSlot
int4 zeroSlot
Input slot containing path that sets zero.
Definition: condexe.hh:215
typegrp_ghidra.hh
Interface for requesting data-type information from a Ghidra client.
BlockWhileDo::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:591
ArchitectureGhidra::buildLoader
virtual void buildLoader(DocumentStorage &store)
Build the LoadImage object and load the executable image.
Definition: ghidra_arch.cc:281
CircleRange::operator==
bool operator==(const CircleRange &op2) const
Equals operator.
Definition: rangeutil.hh:329
EmulatePcodeCache::instruction_start
bool instruction_start
true if next pcode op is start of instruction
Definition: emulate.hh:303
PcodeEmitCache::uniq
uintm uniq
Starting offset for defining temporaries in unique space.
Definition: emulate.hh:282
ConstantPool::createRecord
virtual CPoolRecord * createRecord(const vector< uintb > &refs)=0
Allocate a new CPoolRecord object, given a reference to it.
Funcdata::opUnlink
void opUnlink(PcodeOp *op)
Unset inputs/output and remove given PcodeOP from its basic block.
Definition: funcdata_op.cc:177
RuleCondNegate::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5132
SymbolEntry::EntryInitData::offset
int4 offset
Starting offset of the portion of the Symbol being covered.
Definition: database.hh:72
MemoryPageOverlay::underlie
MemoryBank * underlie
Underlying memory object.
Definition: memstate.hh:111
LanedRegister::sizeBitMask
uint4 sizeBitMask
A 1-bit for every permissible lane size.
Definition: transform.hh:108
BlockGraph::newBlockIfGoto
BlockIf * newBlockIfGoto(FlowBlock *cond)
Build a new BlockIfGoto.
Definition: block.cc:1692
RulePushPtr::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6073
Scope::removeRange
virtual void removeRange(AddrSpace *spc, uintb first, uintb last)
Remove a memory range from the ownership of this Scope.
Definition: database.cc:1046
SubvariableFlow::aggressive
bool aggressive
Do we "know" initial seed point must be a sub variable.
Definition: subflow.hh:83
RuleRightShiftAnd::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:184
JumpBasic::markFoldableGuards
void markFoldableGuards()
Mark the guard CBRANCHs that are truly part of the model.
Definition: jumptable.cc:1202
InjectPayloadGhidra::printTemplate
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_ghidra.cc:72
DynamicHash::calcHash
void calcHash(const Varnode *root, uint4 method)
Calculate the hash for given Varnode and method.
Definition: dynamic.cc:210
Override::NONE
@ NONE
No override.
Definition: override.hh:44
Emulate::fallthruOp
virtual void fallthruOp(void)=0
Standard p-code fall-thru semantics.
DynamicHash::transtable
static uint4 transtable[]
Translation of op-codes to hash values.
Definition: dynamic.hh:94
MapState::spaceid
AddrSpace * spaceid
The address space being analyzed.
Definition: varmap.hh:146
MemoryBank::constructValue
static uintb constructValue(const uint1 *ptr, int4 size, bool bigendian)
Decode bytes to value.
Definition: memstate.cc:25
ContextInternal::FreeArray
A context blob, holding context values across some range of code addresses.
Definition: globalcontext.hh:263
TokenSplit::printclass
printclass
An enumeration denoting the general class of a token.
Definition: prettyprint.hh:281
RegisterProgram
Command to register a new Program (executable) with the decompiler.
Definition: ghidra_process.hh:102
Comment::comment_type
comment_type
Possible properties associated with a comment.
Definition: comment.hh:46
AddrSpace::saveBasicAttributes
void saveBasicAttributes(ostream &s) const
Write the XML attributes of this space.
Definition: space.cc:87
BreakCallBack::emulate
Emulate * emulate
The emulator currently associated with this breakpoint.
Definition: emulate.hh:79
Varnode::getUsePoint
Address getUsePoint(const Funcdata &fd) const
Get Address when this Varnode first comes into scope.
Definition: varnode.cc:589
RuleOrPredicate::MultiPredicate::discoverPathIsTrue
void discoverPathIsTrue(void)
Does the condBlock true outgoing edge flow to the block that sets zero.
Definition: condexe.cc:950
RulePiece2Sext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:283
TokenSplit::fnam_t
@ fnam_t
A function identifier.
Definition: prettyprint.hh:311
GuardRecord::range
CircleRange range
Range of values causing the CBRANCH to take the path to the switch.
Definition: jumptable.hh:134
Symbol::symbolId
uint8 symbolId
Unique id, 0=unassigned.
Definition: database.hh:168
TypeOpFloatFloor::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:660
OptionCurrentAction
Toggle a sub-group of actions within a root Action.
Definition: options.hh:201
SpacebaseSpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: translate.cc:105
PrintLanguage::pushMismatchSymbol
virtual void pushMismatchSymbol(const Symbol *sym, int4 off, int4 sz, const Varnode *vn, const PcodeOp *op)=0
Push an identifier for a variable that mismatches with its Symbol.
PrintC::opPtradd
virtual void opPtradd(const PcodeOp *op)
Emit a PTRADD operator.
Definition: printc.cc:649
PcodeOp::fallthru_true
@ fallthru_true
Set if fallthru happens on true condition.
Definition: op.hh:78
CollapseStructure::ruleBlockDoWhile
bool ruleBlockDoWhile(FlowBlock *bl)
Attempt to apply the BlockDoWhile structure.
Definition: blockaction.cc:1535
RangeList::insertRange
void insertRange(AddrSpace *spc, uintb first, uintb last)
Insert a range of addresses.
Definition: address.cc:317
TypeOpBoolXor::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:527
OpBehavior::getOpcode
OpCode getOpcode(void) const
Get the opcode for this pcode operation.
Definition: opbehavior.hh:103
ConditionMarker::multislot
int4 multislot
Input slot of MULTIEQUAL on critical path, -1 if no MULTIEQUAL.
Definition: condexe.hh:48
Architecture::parseDynamicRule
void parseDynamicRule(const Element *el)
Apply details of a dynamic Rule object.
Definition: architecture.cc:691
TypeOp::registerInstructions
static void registerInstructions(vector< TypeOp * > &inst, TypeFactory *tlst, const Translate *trans)
Build a map from op-code value to the TypeOp information objects.
Definition: typeop.cc:23
EmulateSnippet::tempValues
map< uintb, uintb > tempValues
Values stored in temporary registers.
Definition: emulateutil.hh:115
Architecture::buildSpecFile
virtual void buildSpecFile(DocumentStorage &store)=0
Load any relevant specification files.
EmitXml::s
ostream * s
Stream being emitted to.
Definition: prettyprint.hh:79
PrintC::adjustTypeOperators
virtual void adjustTypeOperators(void)
Set basic data-type information for p-code operators.
Definition: printc.cc:1934
FloatFormat::setSign
uintb setSign(uintb x, bool sign) const
Set the sign bit of an encoded value.
Definition: float.cc:171
ProtoStoreInternal::clearAllInputs
virtual void clearAllInputs(void)
Clear all input parameters (and any backing symbols)
Definition: fspec.cc:2646
BreakCallBack::BreakCallBack
BreakCallBack(void)
Generic breakpoint constructor.
Definition: emulate.hh:90
RuleAndPiece::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:331
SubfloatFlow::processNextWork
bool processNextWork(void)
Push the trace one hop from the placeholder at the top of the worklist.
Definition: subflow.cc:1938
Heritage::splitByRefinement
void splitByRefinement(Varnode *vn, const Address &addr, const vector< int4 > &refine, vector< Varnode * > &split)
Split up a Varnode by the given refinement.
Definition: heritage.cc:1324
ParamListMerged::foldIn
void foldIn(const ParamListStandard &op2)
Add another model to the union.
Definition: fspec.cc:1256
EmulateMemory::executeNew
virtual void executeNew(void)
Standard behavior for (low-level) NEW op.
Definition: emulate.cc:320
HighVariable::updateCover
void updateCover(void) const
(Re)derive the cover of this from the member Varnodes
Definition: variable.cc:82
LoadGuard::minimumOffset
uintb minimumOffset
Minimum offset of the LOAD.
Definition: heritage.hh:110
JumpBasic::foldInOneGuard
virtual bool foldInOneGuard(Funcdata *fd, GuardRecord &guard, JumpTable *jump)
Eliminate the given guard to this switch.
Definition: jumptable.cc:1249
JumpModelTrivial
A trivial jump-table model, where the BRANCHIND input Varnode is the switch variable.
Definition: jumptable.hh:322
JumpValuesRange::startop
PcodeOp * startop
First PcodeOp in the jump-table calculation.
Definition: jumptable.hh:181
FlowInfo::injectUserOp
void injectUserOp(PcodeOp *op)
Perform injection for a given user-defined p-code op.
Definition: flow.cc:1195
Architecture::max_implied_ref
int4 max_implied_ref
Maximum number of references to an implied var.
Definition: architecture.hh:123
TypeOpFloatSqrt
Information about the FLOAT_SQRT op-code.
Definition: typeop.hh:622
TypeOpBoolXor
Information about the BOOL_XOR op-code.
Definition: typeop.hh:524
CircleRange
A class for manipulating integer value ranges.
Definition: rangeutil.hh:48
ContextGhidra::getVariable
virtual const ContextBitRange & getVariable(const string &nm) const
Retrieve the context variable description object by name.
Definition: ghidra_context.hh:36
ContextGhidra::getRegionToChangePoint
virtual void getRegionToChangePoint(vector< uintm * > &res, const Address &addr, int4 num, uintm mask)
Grab the context blob(s) starting at the given address up to the first point of change.
Definition: ghidra_context.hh:40
ParamTrial::unref
@ unref
There is no direct reference to this parameter trial.
Definition: fspec.hh:164
PcodeOpEdge::op
PcodeOp * op
Lone descendant reading the term.
Definition: coreaction.hh:1039
RuleCarryElim::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3653
MemoryBank::wordsize
int4 wordsize
Number of bytes in an aligned word access.
Definition: memstate.hh:39
ActionInferTypes::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: coreaction.hh:938
JumpBasicOverride
A basic jump-table model incorporating manual override information.
Definition: jumptable.hh:425
ParamActive::needsfinalcheck
bool needsfinalcheck
Should a final pass be made on trials (to take into account control-flow changes)
Definition: fspec.hh:230
RuleTestSign::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3250
OpBehaviorFloatMult
CPUI_FLOAT_MULT behavior.
Definition: opbehavior.hh:404
Scope::setDisplayFormat
virtual void setDisplayFormat(Symbol *sym, uint4 attr)=0
Set the display format for a Symbol.
InjectContext::nextaddr
Address nextaddr
Address of following instruction.
Definition: pcodeinject.hh:60
SleighArchitecture::scanForSleighDirectories
static void scanForSleighDirectories(const string &rootpath)
Scan directories for SLEIGH specification files.
Definition: sleigh_arch.cc:422
SubfloatFlow::terminatorCount
int4 terminatorCount
Number of terminating nodes reachable via the root.
Definition: subflow.hh:152
EmulateMemory::executeUnary
virtual void executeUnary(void)
Execute a unary arithmetic/logical operation.
Definition: emulate.cc:216
HighEdge::b
HighVariable * b
Second HighVariable of the pair.
Definition: merge.hh:32
Funcdata::beginOp
list< PcodeOp * >::const_iterator beginOp(OpCode opc) const
Start of PcodeOp objects with the given op-code.
Definition: funcdata.hh:449
PropagationState::inslot
int4 inslot
Slot holding Varnode for descendant PcodeOp.
Definition: coreaction.hh:1030
PropagationState::step
void step(void)
Advance to the next propagation edge.
Definition: coreaction.cc:4391
PrintC::function_call
static OpToken function_call
The function call operator.
Definition: printc.hh:70
JumpTable::trivialSwitchOver
void trivialSwitchOver(void)
Switch this table over to a trivial model.
Definition: jumptable.cc:2420
partmap::maptype
std::map< _linetype, _valuetype > maptype
Defining the map from split points to value objects.
Definition: partmap.hh:50
TypeOpIntNegate::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:418
PcodeOp::getOpFromConst
static PcodeOp * getOpFromConst(const Address &addr)
Retrieve the PcodeOp encoded as the address addr.
Definition: op.hh:227
TypeOpFloatFloat2Float::TypeOpFloatFloat2Float
TypeOpFloatFloat2Float(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1447
TypeCode::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:347
PcodeOp::ptrflow
@ ptrflow
Op consumes or produces a ptr.
Definition: op.hh:99
BlockMultiGoto::defaultswitch
bool defaultswitch
True if one of the unstructured edges is the formal switch default edge.
Definition: block.hh:470
EmitXml::tagVariable
virtual void tagVariable(const char *ptr, syntax_highlight hl, const Varnode *vn, const PcodeOp *op)
Emit a variable token.
Definition: prettyprint.cc:157
CapabilityPoint::CapabilityPoint
CapabilityPoint(void)
Construct extension capability exactly once.
Definition: capability.cc:31
PrintC::opFloatFloor
virtual void opFloatFloor(const PcodeOp *op)
Emit a FLOAT_FLOOR operator.
Definition: printc.hh:280
LabSymbol::buildType
void buildType(void)
Build placeholder data-type.
Definition: database.cc:666
ScopeGhidra::restoreXml
virtual void restoreXml(const Element *el)
Restore this Scope from a <scope> XML tag.
Definition: database_ghidra.hh:110
PrintC::emitStatement
void emitStatement(const PcodeOp *inst)
Emit a statement in the body of a function.
Definition: printc.cc:1894
RuleSLess2Zero
Simplify INT_SLESS applied to 0 or -1.
Definition: ruleaction.hh:964
OpBehaviorIntSless::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:181
SymbolEntry::EntrySubsort::operator<
bool operator<(const EntrySubsort &op2)
Compare this with another sub-sort.
Definition: database.hh:105
RuleAndCompare::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1750
Action::print
virtual int4 print(ostream &s, int4 num, int4 depth) const
Print a description of this Action to stream.
Definition: action.cc:130
Funcdata::newCodeRef
Varnode * newCodeRef(const Address &m)
Create a code address annotation Varnode.
Definition: funcdata_varnode.cc:211
AddrSpaceManager::findAddJoin
JoinRecord * findAddJoin(const vector< VarnodeData > &pieces, uint4 logicalsize)
Get (or create) JoinRecord for pieces.
Definition: translate.cc:604
DynamicRecommend
A name recommendation for a particular dynamic storage location.
Definition: varmap.hh:49
ActionDatabase::currentact
Action * currentact
This is the current root Action.
Definition: action.hh:295
MemoryHashOverlay
A memory bank that implements reads and writes using a hash table.
Definition: memstate.hh:128
JumpBasicOverride::recoverModel
virtual bool recoverModel(Funcdata *fd, PcodeOp *indop, uint4 matchsize, uint4 maxtablesize)
Attempt to recover details of the model, given a specific BRANCHIND.
Definition: jumptable.cc:1824
PcodeInjectLibraryGhidra::manualCallFixup
virtual int4 manualCallFixup(const string &name, const string &snippet)
Manually add a call-fixup payload given a compilable snippet of p-code source.
Definition: inject_ghidra.cc:210
ActionReturnRecovery::buildReturnOutput
static void buildReturnOutput(ParamActive *active, PcodeOp *retop, Funcdata &data)
Rewrite a CPUI_RETURN op to reflect a recovered output parameter.
Definition: coreaction.cc:1749
ScopeGhidra::retypeSymbol
virtual void retypeSymbol(Symbol *sym, Datatype *ct)
Change the data-type of a Symbol within this Scope.
Definition: database_ghidra.hh:107
TypeVoid::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:214
FuncProto::updateInputTypes
void updateInputTypes(const vector< Varnode * > &triallist, ParamActive *activeinput)
Update input parameters based on Varnode trials.
Definition: fspec.cc:3184
LoadImageXml::getReadonly
virtual void getReadonly(RangeList &list) const
Return list of readonly address ranges.
Definition: loadimage_xml.cc:246
TraceDAG
Algorithm for selecting unstructured edges based an Directed Acyclic Graphs (DAG)
Definition: blockaction.hh:94
OptionReadOnly
Toggle whether read-only memory locations have their value propagated.
Definition: options.hh:81
FuncProto::hasThisPointer
bool hasThisPointer(void) const
Is this a prototype for a class method, taking a this pointer.
Definition: fspec.hh:1241
LoadGuard::step
int4 step
Step of any access into this range (0=unknown)
Definition: heritage.hh:112
BfdArchitectureCapability::operator=
BfdArchitectureCapability & operator=(const BfdArchitectureCapability &op2)
Not implemented.
TraceDAG::BadEdgeScore::siblingedge
int4 siblingedge
Number of active BlockTraces with same BranchPoint and exit as this.
Definition: blockaction.hh:149
OpBehaviorPopcount::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:731
AddrSpace::manage
AddrSpaceManager * manage
Manager for processor using this space.
Definition: space.hh:95
TypeCode::TypeCode
TypeCode(const TypeCode &op)
Construct from another TypeCode.
Definition: type.cc:937
PrintLanguage::negatetoken
@ negatetoken
Print the token representing the negation of current token.
Definition: printlanguage.hh:151
PrintC::genericTypeName
virtual string genericTypeName(const Datatype *ct)
Generate a generic name for an unnamed data-type.
Definition: printc.cc:2888
ArchitectureGhidra::warnings
string warnings
Warnings accumulated by the decompiler.
Definition: ghidra_arch.hh:63
PrintCCapability::operator=
PrintCCapability & operator=(const PrintCCapability &op)
Not implemented.
OpBehavior::isunary
bool isunary
true= use unary interfaces, false = use binary
Definition: opbehavior.hh:44
RangeList::getFirstRange
const Range * getFirstRange(void) const
Get the first Range.
Definition: address.cc:474
RuleStoreVarnode
Convert STORE operations using a constant offset to COPY.
Definition: ruleaction.hh:723
LanguageDescription::restoreXml
void restoreXml(const Element *el)
Read the XML tag from stream.
Definition: sleigh_arch.cc:37
ScopeInternal::begin
virtual MapIterator begin(void) const
Beginning iterator to mapped SymbolEntrys.
Definition: database.cc:1776
PropagationState::slot
int4 slot
Current edge relative to current PcodeOp.
Definition: coreaction.hh:1031
OpBehaviorIntSright::recoverInputBinary
virtual uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering an input value.
Definition: opbehavior.cc:435
TypeOpIndirect::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:683
CPUI_INT_CARRY
@ CPUI_INT_CARRY
Test for unsigned carry.
Definition: opcodes.hh:62
ActionInferTypes::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:4627
ScopeGhidra::addDynamicMapInternal
virtual SymbolEntry * addDynamicMapInternal(Symbol *sym, uint4 exfl, uint8 hash, int4 off, int4 sz, const RangeList &uselim)
Create a new SymbolEntry for a Symbol given a dynamic hash.
Definition: database_ghidra.hh:54
EmitPrettyPrint::closeParen
virtual void closeParen(char c, int4 id)
Emit a close parenthesis.
Definition: prettyprint.cc:1082
TypeOpIntRight::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1175
OpBehaviorFloatCeil::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:687
ContextGhidra::createSet
virtual TrackedSet & createSet(const Address &addr1, const Address &addr2)
Create a tracked register set that is valid over the given range.
Definition: ghidra_context.hh:69
PrintLanguage::ReversePolish::id2
int4 id2
The id of the token group this surrounds (for surround operator tokens)
Definition: printlanguage.hh:172
XmlError
An exception thrown by the XML parser.
Definition: xml.hh:288
JumpBasic::switchvn
Varnode * switchvn
Unnormalized switch Varnode.
Definition: jumptable.hh:351
FlowBlock::flipInPlaceExecute
virtual void flipInPlaceExecute(void)
Perform the flip to normalize conditional branch executed by this block.
Definition: block.hh:753
PrintC::pushEnumConstant
void pushEnumConstant(uintb val, const TypeEnum *ct, const Varnode *vn, const PcodeOp *op)
Push an enumerated value to the RPN stack.
Definition: printc.cc:1325
Scope::endDynamic
virtual list< SymbolEntry >::const_iterator endDynamic(void) const =0
Ending iterator to dynamic SymbolEntrys.
BlockMap::createBlock
FlowBlock * createBlock(const string &name)
Create a FlowBlock of the named type.
Definition: block.cc:3241
BlockWhileDo
A loop structure where the condition is checked at the top.
Definition: block.hh:583
PrintC::nullToken
string nullToken
Token to use for 'null'.
Definition: printc.hh:121
EmitNoXml::tagOp
virtual void tagOp(const char *ptr, syntax_highlight hl, const PcodeOp *op)
Emit an operation token.
Definition: prettyprint.hh:242
Varnode::lociter
VarnodeLocSet::iterator lociter
Iterator into VarnodeBank sorted by location.
Definition: varnode.hh:135
Funcdata::saveVarnodeXml
static void saveVarnodeXml(ostream &s, VarnodeLocSet::const_iterator iter, VarnodeLocSet::const_iterator enditer)
Save XML descriptions for a set of Varnodes to stream.
Definition: funcdata.cc:593
PrintC::push_integer
virtual void push_integer(uintb val, int4 sz, bool sign, const Varnode *vn, const PcodeOp *op)
Push a constant with an integer data-type to the RPN stack.
Definition: printc.cc:994
Cover::addDefPoint
void addDefPoint(const Varnode *vn)
Reset to the single point where the given Varnode is defined.
Definition: cover.cc:440
ActionSegmentize
Make sure pointers into segmented spaces have the correct form.
Definition: coreaction.hh:121
PrintLanguage::opFloatFloor
virtual void opFloatFloor(const PcodeOp *op)=0
Emit a FLOAT_FLOOR operator.
Architecture::parseReadOnly
void parseReadOnly(const Element *el)
Apply read-only region configuration.
Definition: architecture.cc:833
VarnodeBank::create_index
uint4 create_index
Number of varnodes created.
Definition: varnode.hh:330
ProtoStoreSymbol::getNumInputs
virtual int4 getNumInputs(void) const
Get the number of input parameters for this prototype.
Definition: fspec.cc:2529
TokenSplit::tagFuncName
void tagFuncName(const char *ptr, EmitXml::syntax_highlight h, const Funcdata *f, const PcodeOp *o)
Create a function identifier token.
Definition: prettyprint.hh:463
TypeStruct::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:882
RuleDivOpt::moveSignBitExtraction
static void moveSignBitExtraction(Varnode *firstVn, Varnode *replaceVn, Funcdata &data)
Replace sign-bit extractions from the first given Varnode with the second Varnode.
Definition: ruleaction.cc:6903
EmitPrettyPrint::beginStatement
virtual int4 beginStatement(const PcodeOp *op)
Begin a source code statement.
Definition: prettyprint.cc:961
SymbolEntry::extraflags
uint4 extraflags
Varnode flags specific to this storage location.
Definition: database.hh:54
EmitXml::beginDocument
virtual int4 beginDocument(void)
Begin a whole document of output.
Definition: prettyprint.cc:31
ParamListRegister::clone
virtual ParamList * clone(void) const
Clone this parameter list model.
Definition: fspec.cc:1245
DynamicRecommend::symbolId
uint8 symbolId
Id associated with the original Symbol.
Definition: varmap.hh:53
JumpModelTrivial::buildAddresses
virtual void buildAddresses(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable, vector< LoadTable > *loadpoints) const
Construct the explicit list of target addresses (the Address Table) from this model.
Definition: jumptable.cc:388
coreaction.hh
Core decompilation actions which are indepedent of any particular architecture.
InjectPayload::inputlist
vector< InjectParameter > inputlist
List of input parameters to this payload.
Definition: pcodeinject.hh:92
Funcdata::replaceVolatile
bool replaceVolatile(Varnode *vn)
Replace accesses of the given Varnode with volatile operations.
Definition: funcdata_varnode.cc:587
LoopBody::exitedges
list< FloatingEdge > exitedges
Edges that exit to the formal exit block.
Definition: blockaction.hh:50
FlowInfo::bblocks
BlockGraph & bblocks
Container for the control-flow graph.
Definition: flow.hh:82
ActionInferTypes::propagateSpacebaseRef
static void propagateSpacebaseRef(Funcdata &data, Varnode *spcvn)
Search for pointers and propagate its data-type to known aliases.
Definition: coreaction.cc:4519
PcodeOpTree
map< SeqNum, PcodeOp * > PcodeOpTree
A map from sequence number (SeqNum) to PcodeOp.
Definition: op.hh:236
SubvariableFlow::returnsTraversed
bool returnsTraversed
Have we tried to flow logical value across CPUI_RETURNs.
Definition: subflow.hh:82
Varnode::destroyDescend
void destroyDescend(void)
Clear all descendant (reading) PcodeOps.
Definition: varnode.cc:317
CircleRange::circleUnion
int4 circleUnion(const CircleRange &op2)
Union two ranges.
Definition: rangeutil.cc:358
PrintC::opFloatEqual
virtual void opFloatEqual(const PcodeOp *op)
Emit a FLOAT_EQUAL operator.
Definition: printc.hh:264
SeqNum::uniq
uintm uniq
Number to guarantee uniqueness.
Definition: address.hh:113
TypeOpCpoolref::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:1781
FuncProto::has_thisptr
@ has_thisptr
Function is a method with a 'this' pointer as an argument.
Definition: fspec.hh:1161
fspec.hh
Definitions for specifying functions prototypes.
PrintLanguage::pushEquate
virtual bool pushEquate(uintb val, int4 sz, const EquateSymbol *sym, const Varnode *vn, const PcodeOp *op)=0
Push a constant marked up by and EquateSymbol onto the RPN stack.
RuleOrConsume::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:395
ArchOption::onOrOff
static bool onOrOff(const string &p)
Parse an "on" or "off" string.
Definition: options.cc:25
EmulatePcodeCache::instruction_length
int4 instruction_length
Length of current instruction in bytes.
Definition: emulate.hh:305
LanguageDescription::variant
string variant
Name of processor variant or "default".
Definition: sleigh_arch.hh:53
PrintLanguage::Atom::type
tagtype type
The type of Atom.
Definition: printlanguage.hh:196
PcodeOp::noreturn
@ noreturn
placeholder for previous call that doesn't exit
Definition: op.hh:93
Range
A contiguous range of bytes in some address space.
Definition: address.hh:161
globalcontext.hh
Utilities for getting address-based context to the disassembler and decompiler.
EmitPrettyPrint::tagFuncName
virtual void tagFuncName(const char *ptr, syntax_highlight hl, const Funcdata *fd, const PcodeOp *op)
Emit a function identifier.
Definition: prettyprint.cc:1017
LoadImageSection
A record describing a section bytes in the executable.
Definition: loadimage.hh:44
RuleAndDistribute
Distribute INT_AND through INT_OR if result is simpler.
Definition: ruleaction.hh:278
Action::checkActionBreak
bool checkActionBreak(void)
Check action breakpoint.
Definition: action.cc:115
PrintLanguage::opPtradd
virtual void opPtradd(const PcodeOp *op)=0
Emit a PTRADD operator.
MemoryPageOverlay::find
virtual uintb find(uintb addr) const
Overridden aligned word find.
Definition: memstate.cc:448
Architecture::parseVolatile
void parseVolatile(const Element *el)
Apply volatile region configuration.
Definition: architecture.cc:849
CPUI_INT_SCARRY
@ CPUI_INT_SCARRY
Test for signed carry.
Definition: opcodes.hh:63
CollapseStructure::ruleBlockWhileDo
bool ruleBlockWhileDo(FlowBlock *bl)
Attempt to apply the BlockWhileDo structure.
Definition: blockaction.cc:1498
ScopeGhidra::makeNameUnique
virtual string makeNameUnique(const string &nm) const
Produce a version of the given symbol name that won't collide with other names in this Scope.
Definition: database_ghidra.hh:108
PrintLanguage::opLoad
virtual void opLoad(const PcodeOp *op)=0
Emit a LOAD operator.
ContextDatabase::getRegionForSet
virtual void getRegionForSet(vector< uintm * > &res, const Address &addr1, const Address &addr2, int4 num, uintm mask)=0
Grab the context blob(s) for the given address range, marking bits that will be set.
CommentDatabase::deleteComment
virtual void deleteComment(Comment *com)=0
Remove the given Comment object from the container.
TypeOpSegment::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1748
PathMeld::meld
void meld(vector< PcodeOp * > &path, vector< int4 > &slot)
Meld a new path into this container.
Definition: jumptable.cc:926
OptionIndentIncrement
Set the number of characters to indent per nested scope.
Definition: options.hh:159
BlockSwitch::BlockSwitch
BlockSwitch(FlowBlock *ind)
Construct given the multi-exit root block.
Definition: block.cc:3014
AddrSpaceManager::getStackSpace
AddrSpace * getStackSpace(void) const
Get the stack space for this processor.
Definition: translate.hh:469
BlockGraph::calcForwardDominator
void calcForwardDominator(const vector< FlowBlock * > &rootlist)
Calculate forward dominators.
Definition: block.cc:1847
Architecture::getSegmentOp
SegmentOp * getSegmentOp(AddrSpace *spc) const
Retrieve the segment op for the given space if any.
Definition: architecture.cc:312
ContextDatabase::setContextChangePoint
void setContextChangePoint(const Address &addr, int4 num, uintm mask, uintm value)
Set a specific context value starting at the given address.
Definition: globalcontext.cc:167
RuleIndirectCollapse::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2896
PrintLanguage::opPopcountOp
virtual void opPopcountOp(const PcodeOp *op)=0
Emit a POPCOUNT operator.
AddressResolver::resolve
virtual Address resolve(uintb val, int4 sz, const Address &point, uintb &fullEncoding)=0
Virtual destructor
LoadImage::openSymbols
virtual void openSymbols(void) const
Prepare to read symbols.
Definition: loadimage.hh:133
EmulateFunction::fallthruOp
virtual void fallthruOp(void)
Standard p-code fall-thru semantics.
Definition: jumptable.cc:164
EmitPrettyPrint::beginFunction
virtual int4 beginFunction(const Funcdata *fd)
Begin a whole declaration and body of a function.
Definition: prettyprint.cc:865
TypeBase::TypeBase
TypeBase(const TypeBase &op)
Construct TypeBase copying properties from another data-type.
Definition: type.hh:163
StackSolver::propagate
void propagate(int4 varnum, int4 val)
Propagate solution for one variable to other variables.
Definition: coreaction.cc:64
PrintC::opFloatNotEqual
virtual void opFloatNotEqual(const PcodeOp *op)
Emit a FLOAT_NOTEQUAL operator.
Definition: printc.hh:265
FlowInfo::injectPcode
void injectPcode(void)
Perform substitution on any op that requires injection.
Definition: flow.cc:1290
SetOptions::doc
Document * doc
The XML option document.
Definition: ghidra_process.hh:223
TypeOp::tlst
TypeFactory * tlst
Pointer to data-type factory.
Definition: typeop.hh:44
rangemap::zip
void zip(linetype i, typename std::multiset< AddrRange >::iterator iter)
Remove the given partition boundary.
Definition: rangemap.hh:176
Funcdata::processing_started
@ processing_started
Set if processing has started.
Definition: funcdata.hh:50
RuleLessNotEqual
Simplify INT_LESSEQUAL && INT_NOTEQUAL: V <= W && V != W => V < W
Definition: ruleaction.hh:428
JumpTable::recoverModel
void recoverModel(Funcdata *fd)
Attempt recovery of the jump-table model.
Definition: jumptable.cc:2085
RuleOrConsume
Simply OR with unconsumed input: `V = A | B => V = B if nzm(A) & consume(V) == 0.
Definition: ruleaction.hh:131
FlowBlock::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:574
RuleSub2Add::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3685
SpacebaseSpace::baseOrig
VarnodeData baseOrig
Original base register before any truncation.
Definition: translate.hh:176
OpBehaviorIntDiv
CPUI_INT_DIV behavior.
Definition: opbehavior.hh:292
OpCode
OpCode
The op-code defining a specific p-code operation (PcodeOp)
Definition: opcodes.hh:35
FlowBlock::copymap
FlowBlock * copymap
Back reference to a BlockCopy of this.
Definition: block.hh:110
PathMeld::RootedOp
A PcodeOp in the path set associated with the last Varnode in the intersection.
Definition: jumptable.hh:68
RuleXorCollapse
Eliminate INT_XOR in comparisons: (V ^ W) == 0 => V == W
Definition: ruleaction.hh:679
GhidraCommand::sendResult
virtual void sendResult(void)
Send results of the command (if any) back to the Ghidra client.
Definition: ghidra_process.cc:94
TypeOpIntDiv::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:488
DatatypeSet
set< Datatype *, DatatypeCompare > DatatypeSet
A set of data-types sorted by function.
Definition: type.hh:150
Funcdata::nodeSplitCloneOp
PcodeOp * nodeSplitCloneOp(PcodeOp *op)
Duplicate the given PcodeOp as part of splitting a block.
Definition: funcdata_block.cc:761
AncestorRealistic::markedVn
vector< const Varnode * > markedVn
Holds visited Varnodes to properly trim cycles.
Definition: funcdata.hh:606
FuncCallSpecs::paramshift
int4 paramshift
Number of input parameters to ignore before prototype.
Definition: fspec.hh:1444
ContextCache::database
ContextDatabase * database
The encapsulated context database.
Definition: globalcontext.hh:310
EmulateSnippet::executeMultiequal
virtual void executeMultiequal(void)
Standard behavior for a MULTIEQUAL (phi-node)
Definition: emulateutil.cc:252
TransformVar::vn
Varnode * vn
Original big Varnode of which this is a component.
Definition: transform.hh:45
ActionDatabase::actionmap
map< string, Action * > actionmap
Map from name to root Action.
Definition: action.hh:298
ProtoModel::defaultLocalRange
void defaultLocalRange(void)
Set the default stack range used for local variables.
Definition: fspec.cc:1677
LabSymbol
A Symbol that labels code internal to a function.
Definition: database.hh:281
EmulateFunction::collectLoadPoints
void collectLoadPoints(vector< LoadTable > &res) const
Recover any LOAD table descriptions.
Definition: jumptable.cc:223
OpBehaviorIntSdiv::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:468
Funcdata::pushMultiequals
void pushMultiequals(BlockBasic *bb)
Push MULTIEQUAL Varnodes of the given block into the output block.
Definition: funcdata_block.cc:82
TypeOpFloatNeg::TypeOpFloatNeg
TypeOpFloatNeg(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1419
OpBehaviorIntSborrow
CPUI_INT_SBORROW behavior.
Definition: opbehavior.hh:219
ContextGhidra::restoreFromSpec
virtual void restoreFromSpec(const Element *el, const AddrSpaceManager *manage)
Add initial context state from XML tags in compiler/processor specifications.
Definition: ghidra_context.hh:55
Funcdata::pushBranch
void pushBranch(BlockBasic *bb, int4 slot, BlockBasic *bbnew)
Move a control-flow edge from one block to another.
Definition: funcdata_block.cc:398
CastStrategyC::isSubpieceCastEndian
virtual bool isSubpieceCastEndian(Datatype *outtype, Datatype *intype, uint4 offset, bool isbigend) const
Is the given data-type truncation considered a cast, given endianess concerns.
Definition: cast.cc:334
Scope::clearCategory
virtual void clearCategory(int4 cat)=0
Clear all symbols of the given category from this scope.
ActionNameVars
Choose names for all high-level variables (HighVariables)
Definition: coreaction.hh:458
Rule::printStatistics
virtual void printStatistics(ostream &s) const
Print statistics for this Rule.
Definition: action.cc:680
StackSolver::eqs
vector< StackEqn > eqs
Known equations based on operations that explicitly change the stack-pointer.
Definition: coreaction.cc:31
signbit_negative
bool signbit_negative(uintb val, int4 size)
Return true if the sign-bit is set.
Definition: address.cc:579
Varnode::mergegroup
int2 mergegroup
Which group of forced merges does this Varnode belong to.
Definition: varnode.hh:126
ValueSetSolver::generateRelativeConstraint
void generateRelativeConstraint(PcodeOp *compOp, PcodeOp *cbranch)
Try to find a relative constraint.
Definition: rangeutil.cc:2337
SubvariableFlow::SubvariableFlow
SubvariableFlow(Funcdata *f, Varnode *root, uintb mask, bool aggr, bool sext, bool big)
Constructor.
Definition: subflow.cc:1264
PrintJava::opStore
virtual void opStore(const PcodeOp *op)
Emit a STORE operator.
Definition: printjava.cc:208
ActionPreferComplement::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: blockaction.cc:2121
LoopBody::find
static LoopBody * find(FlowBlock *looptop, const vector< LoopBody * > &looporder)
Find a LoopBody.
Definition: blockaction.cc:1014
LaneDivide::processNextWork
bool processNextWork(void)
Process the next Varnode on the work list.
Definition: subflow.cc:2452
FuncProto::possibleOutputParam
bool possibleOutputParam(const Address &addr, int4 size) const
Decide whether a given storage location could be a return value.
Definition: fspec.cc:3471
PrintC::opFloatDiv
virtual void opFloatDiv(const PcodeOp *op)
Emit a FLOAT_DIV operator.
Definition: printc.hh:270
PrintC::opIntSrem
virtual void opIntSrem(const PcodeOp *op)
Emit a INT_SREM operator.
Definition: printc.hh:259
RuleSignDiv2
Convert INT_SRIGHT form into INT_SDIV: (V + -1*(V s>> 31)) s>> 1 => V s/ 2
Definition: ruleaction.hh:1176
JumpTable::getIndexByBlock
int4 getIndexByBlock(const FlowBlock *bl, int4 i) const
Get the index of the i-th address table entry that corresponds to the given basic-block.
Definition: jumptable.cc:2311
RulePtrsubCharConstant::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6380
ValueSetSolver::ValueSetEdge::rootEdges
const vector< ValueSet * > * rootEdges
The list of nodes attached to the simulated root node (or NULL)
Definition: rangeutil.hh:280
TokenSplit::indentbump
int4 indentbump
Amount to indent if a line breaks.
Definition: prettyprint.hh:341
ConstantPoolGhidra::ConstantPoolGhidra
ConstantPoolGhidra(ArchitectureGhidra *g)
Constructor.
Definition: cpool_ghidra.cc:18
EmitXml
Base class (and interface) for pretty printing and XML markup of tokens.
Definition: prettyprint.hh:76
ConditionMarker::binon
bool binon
True if a binary operator is used in condition.
Definition: condexe.hh:47
ActionStackPtrFlow::adjustLoad
static bool adjustLoad(Funcdata &data, PcodeOp *loadop, PcodeOp *storeop)
Adjust the LOAD where the stack-pointer alias has been recovered.
Definition: coreaction.cc:350
LoopBody::findBase
void findBase(vector< FlowBlock * > &body)
Mark the body FlowBlocks of this loop.
Definition: blockaction.cc:112
PrintLanguage::opIntMult
virtual void opIntMult(const PcodeOp *op)=0
Emit a INT_MULT operator.
RegisterProgram::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:148
ScopeLocal::remapSymbol
SymbolEntry * remapSymbol(Symbol *sym, const Address &addr, const Address &usepoint)
Change the primary mapping for the given Symbol to be a specific storage address and use point.
Definition: varmap.cc:1184
Emulate::executeBranch
virtual void executeBranch(void)=0
Standard behavior for a BRANCH.
SegmentedResolver
A resolver for segmented architectures.
Definition: architecture.hh:282
RuleModOpt::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7145
PcodeOp::isCseMatch
bool isCseMatch(const PcodeOp *op) const
Return true if this and op represent common subexpressions.
Definition: op.cc:154
MemoryBank::getValue
uintb getValue(uintb offset, int4 size) const
Retrieve the value encoded in a (small) range of bytes.
Definition: memstate.cc:250
ScopeLocal::restructureHigh
void restructureHigh(void)
Layout mapped symbols based on HighVariable information.
Definition: varmap.cc:1016
TypeOpPiece::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1558
FuncProto::setInline
void setInline(bool val)
Toggle the in-line setting for functions with this prototype.
Definition: fspec.hh:1216
ProtoStoreInternal::clone
virtual ProtoStore * clone(void) const
Clone the entire collection of parameter descriptions.
Definition: fspec.cc:2693
emulate.hh
Classes for emulating p-code.
TypeOpIntSlessEqual::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:878
ParameterSymbol::isNameLocked
virtual bool isNameLocked(void) const
Is the parameter name locked.
Definition: fspec.cc:2340
TypeOpFloatSqrt::TypeOpFloatSqrt
TypeOpFloatSqrt(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1433
ArchitectureGhidra::sendCcode
bool sendCcode
True if C code should be sent with function output.
Definition: ghidra_arch.hh:69
Varnode::printRawNoMarkup
int4 printRawNoMarkup(ostream &s) const
Print a simple identifier for the Varnode.
Definition: varnode.cc:604
BlockIf
A basic "if" block.
Definition: block.hh:553
MemoryPageOverlay::getPage
virtual void getPage(uintb addr, uint1 *res, int4 skip, int4 size) const
Overridden getPage.
Definition: memstate.cc:474
Action::status_breakstarthit
@ status_breakstarthit
At start after breakpoint.
Definition: action.hh:64
DeregisterProgram::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:213
VarnodeBank::beginLoc
VarnodeLocSet::const_iterator beginLoc(AddrSpace *spaceid) const
Beginning of Varnodes in given address space sorted by location.
Definition: varnode.cc:1161
ArchitectureGhidra::buildTypegrp
virtual void buildTypegrp(DocumentStorage &store)
Build the data-type factory/container.
Definition: ghidra_arch.cc:310
CPUI_FLOAT_ABS
@ CPUI_FLOAT_ABS
Floating-point absolute value (abs)
Definition: opcodes.hh:98
JumpBasicOverride::findLikelyNorm
Varnode * findLikelyNorm(void)
Find a potential normalized switch variable.
Definition: jumptable.cc:1778
Symbol::getResolutionDepth
int4 getResolutionDepth(const Scope *useScope) const
Get the number of scope names to print to resolve symbol in given context.
Definition: database.cc:304
MemoryPageOverlay
Memory bank that overlays some other memory bank, using a "copy on write" behavior.
Definition: memstate.hh:110
OpBehaviorFloatSqrt::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:644
heritage.hh
Utilities for building Static Single Assignment (SSA) form
ParamEntryRange::InitData::position
int4 position
Position (within the full list) being assigned to the ParamEntryRange.
Definition: fspec.hh:113
Merge::mergeIndirect
void mergeIndirect(PcodeOp *indop)
Force the merge of all input and output Varnodes to a given INDIRECT op.
Definition: merge.cc:767
Symbol::saveXmlHeader
void saveXmlHeader(ostream &s) const
Save basic Symbol properties as XML attributes.
Definition: database.cc:332
Symbol::getMapEntry
SymbolEntry * getMapEntry(const Address &addr) const
Get first mapping of the symbol that contains the given Address.
Definition: database.cc:263
ActionShadowVar
Check for one CPUI_MULTIEQUAL input set defining more than one Varnode.
Definition: coreaction.hh:170
CastStrategyC::checkIntPromotionForExtension
virtual bool checkIntPromotionForExtension(const PcodeOp *op) const
Check if integer promotion forces a cast for the input to the given extension.
Definition: cast.cc:47
AddrSpace::isHeritaged
bool isHeritaged(void) const
Return true if dataflow has been traced.
Definition: space.hh:385
AddrSpace::hasNearPointers
bool hasNearPointers(void) const
Return true if near (truncated) pointers into this space are possible.
Definition: space.hh:439
RulePushMulti::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1117
ActionInputPrototype::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:855
ParamListStandardOut::fillinMap
virtual void fillinMap(ParamActive *active) const
Given an unordered list of storage locations, calculate a function prototype.
Definition: fspec.cc:1116
FunctionSymbol::buildType
void buildType(void)
Build the data-type associated with this Symbol.
Definition: database.cc:520
EmitXml::spaces
virtual void spaces(int4 num, int4 bump=0)
Emit a sequence of space characters as part of source code.
Definition: prettyprint.cc:333
JumpTable::IndexPair::blockPosition
int4 blockPosition
Out-edge index for the basic-block.
Definition: jumptable.hh:502
ConditionalExecution::prea_inslot
int4 prea_inslot
iblock->In(prea_inslot) = pre a path
Definition: condexe.hh:136
TypeStruct::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:319
BlockMultiGoto::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:483
MapState::addGuard
void addGuard(const LoadGuard &guard, OpCode opc, TypeFactory *typeFactory)
Add LoadGuard record as a hint to the collection.
Definition: varmap.cc:805
RuleModOpt::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7152
JumpValues::getStartVarnode
virtual Varnode * getStartVarnode(void) const =0
Get the Varnode associated with the current value.
Action::issueWarning
void issueWarning(Architecture *glb)
Warn that this Action has applied.
Definition: action.cc:39
ArchitectureGhidra::corespecxml
string corespecxml
A specification of the core data-types.
Definition: ghidra_arch.hh:67
Funcdata::deadRemovalAllowedSeen
bool deadRemovalAllowedSeen(AddrSpace *spc)
Check if dead Varnodes have been removed for a specific address space.
Definition: funcdata.hh:231
JumpValuesRange::initializeForReading
virtual bool initializeForReading(void) const
Initialize this for iterating over the set of possible values.
Definition: jumptable.cc:280
TypeOpUnary::metain
type_metatype metain
The metatype of the input.
Definition: typeop.hh:174
LaneDivide::traceBackward
bool traceBackward(TransformVar *rvn, int4 numLanes, int4 skipLanes)
Pull the logical lanes back through the defining PcodeOp of the given variable.
Definition: subflow.cc:2391
PcodeInjectLibrary::getCallFixupName
string getCallFixupName(int4 injectid) const
Get the call-fixup name associated with an id.
Definition: pcodeinject.cc:281
EmulatePcodeCache::inst
vector< OpBehavior * > inst
Map from OpCode to OpBehavior.
Definition: emulate.hh:300
JumpModelTrivial::sanityCheck
virtual bool sanityCheck(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable)
Perform a sanity check on recovered addresses.
Definition: jumptable.hh:334
VarnodeBank::findCoveredInput
Varnode * findCoveredInput(int4 s, const Address &loc) const
Find an input Varnode contained within this range.
Definition: varnode.cc:1109
PrintLanguage::opMultiequal
virtual void opMultiequal(const PcodeOp *op)=0
Emit a MULTIEQUAL operator.
ConditionalJoin
Discover and eliminate split conditions.
Definition: blockaction.hh:232
ConditionalJoin::b_in2
int4 b_in2
In edge of exitb coming from block2.
Definition: blockaction.hh:248
ParamEntry::resolveJoin
void resolveJoin(void)
If the ParamEntry is initialized with a join address, cache the join record.
Definition: fspec.cc:19
CPUI_INSERT
@ CPUI_INSERT
Insert a bit-range.
Definition: opcodes.hh:123
TypeOpUnary::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:284
Architecture::inferPtrSpaces
vector< AddrSpace * > inferPtrSpaces
Set of address spaces in which a pointer constant is inferable.
Definition: architecture.hh:130
VarnodeBank::VarnodeBank
VarnodeBank(AddrSpaceManager *m, AddrSpace *uspace, uintm ubase)
Construct the container.
Definition: varnode.cc:842
Override::forcegoto
map< Address, Address > forcegoto
Force goto on jump at targetpc to destpc.
Definition: override.hh:51
RuleIdentityEl
Collapse operations using identity element: V + 0 => V
Definition: ruleaction.hh:589
Heritage::heritagePass
int4 heritagePass(const Address &addr) const
Get the pass number when the given address was heritaged.
Definition: heritage.hh:274
PcodeInjectLibrary::allocateInject
virtual int4 allocateInject(const string &sourceName, const string &name, int4 type)=0
Allocate a new InjectPayload object.
OpBehaviorFloatEqual
CPUI_FLOAT_EQUAL behavior.
Definition: opbehavior.hh:348
RuleLoadVarnode::correctSpacebase
static AddrSpace * correctSpacebase(Architecture *glb, Varnode *vn, AddrSpace *spc)
Return associated space if given Varnode is an active spacebase.
Definition: ruleaction.cc:3834
PrintJava::pushTypeStart
virtual void pushTypeStart(const Datatype *ct, bool noident)
Definition: printjava.cc:54
Merge::markInternalCopies
void markInternalCopies(void)
Mark redundant/internal COPY PcodeOps.
Definition: merge.cc:1294
CollapseStructure::selectGoto
FlowBlock * selectGoto(void)
Select an edge to mark as unstructured.
Definition: blockaction.cc:1240
TypeOp::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:178
Heritage::maxdepth
int4 maxdepth
Maximum depth of the dominator tree.
Definition: heritage.hh:208
Symbol::ID_BASE
static uint8 ID_BASE
Base of internal ID's.
Definition: database.hh:225
ActionDynamicSymbols::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:1000
OpBehaviorIntRight::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:400
ConditionalExecution::returnop
vector< PcodeOp * > returnop
RETURN ops that have flow coming out of the iblock.
Definition: condexe.hh:145
RuleConcatZero::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4568
PrintC::multequal
static OpToken multequal
The in-place multiplication operator.
Definition: printc.hh:100
Comment::uniq
int4 uniq
Sub-identifier for uniqueness.
Definition: comment.hh:42
PrintLanguage::opIntSless
virtual void opIntSless(const PcodeOp *op)=0
Emit a INT_SLESS operator.
Scope::findAddr
virtual SymbolEntry * findAddr(const Address &addr, const Address &usepoint) const =0
Find a Symbol at a given address and usepoint.
LoadImageFunc::address
Address address
Start of function.
Definition: loadimage.hh:37
GhidraCommand::doit
int4 doit(void)
Configure and execute the command, then send back results.
Definition: ghidra_process.cc:111
LaneDescription::laneSize
vector< int4 > laneSize
Size of lanes in bytes.
Definition: transform.hh:128
PcodeOpBank::markAlive
void markAlive(PcodeOp *op)
Mark the given PcodeOp as alive.
Definition: op.cc:752
RegisterProgram::archid
int4 archid
Resulting id of the program to send back.
Definition: ghidra_process.hh:110
TraceDAG::BranchPoint::distance
int4 distance(BranchPoint *op2)
Calculate distance between two BranchPoints.
Definition: blockaction.cc:517
RuleTrivialArith
Simplify trivial arithmetic expressions.
Definition: ruleaction.hh:438
TermOrder::root
PcodeOp * root
The final PcodeOp in the expression.
Definition: coreaction.hh:1057
Range::Range
Range(AddrSpace *s, uintb f, uintb l)
Construct a Range from offsets.
Definition: address.hh:173
ConditionalJoin::block2
BlockBasic * block2
Side 2 of the (putative) split.
Definition: blockaction.hh:242
RuleIndirectCollapse::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2902
TrackedContext::val
uintb val
The value of the register.
Definition: globalcontext.hh:70
PrintLanguage::emitBlockSwitch
virtual void emitBlockSwitch(const BlockSwitch *bl)=0
Emit a switch structure.
ConditionMarker::varnodeSame
static bool varnodeSame(Varnode *a, Varnode *b)
Do the given Varnodes hold the same value, possibly as constants.
Definition: condexe.cc:178
TypeSpacebase::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore data-type from XML.
Definition: type.cc:1192
OpBehavior::isUnary
bool isUnary(void) const
Check if operator is unary.
Definition: opbehavior.hh:116
TypeOpPiece::TypeOpPiece
TypeOpPiece(TypeFactory *t)
Constructor.
Definition: typeop.cc:1542
LaneDivide::LaneDivide
LaneDivide(Funcdata *f, Varnode *root, const LaneDescription &desc, bool allowDowncast)
Constructor.
Definition: subflow.cc:2469
FlowBlock::setOutEdgeFlag
void setOutEdgeFlag(int4 i, uint4 lab)
Apply an out edge label.
Definition: block.cc:228
LanguageDescription::slafile
string slafile
Name of .sla file for processor.
Definition: sleigh_arch.hh:55
PrintC::opBoolAnd
virtual void opBoolAnd(const PcodeOp *op)
Emit a BOOL_AND operator.
Definition: printc.hh:262
AncestorRealistic::multiDepth
int4 multiDepth
Number of MULTIEQUAL ops along current traversal path.
Definition: funcdata.hh:607
CommentDatabaseGhidra::cachefilled
bool cachefilled
Set to true if comments for the current function have been fetched.
Definition: comment_ghidra.hh:33
FlowInfo::error_unimplemented
@ error_unimplemented
Throw an exception for flow into unimplemented instructions.
Definition: flow.hh:61
PrintLanguageCapability::buildLanguage
virtual PrintLanguage * buildLanguage(Architecture *glb)=0
Build the main PrintLanguage object corresponding to this capability.
Varnode::descend
list< PcodeOp * > descend
List of every op using this varnode as input.
Definition: varnode.hh:137
SymbolEntry::EntrySubsort::useindex
int4 useindex
Index of the sub-sorting address space.
Definition: database.hh:85
RuleTermOrder
Order the inputs to commutative operations.
Definition: ruleaction.hh:212
ActionStackPtrFlow::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:93
PcodeOp::missing
@ missing
ops at this address were not generated
Definition: op.hh:94
EmulateSnippet::setExecuteAddress
virtual void setExecuteAddress(const Address &addr)
Set the address of the next instruction to emulate.
Definition: emulateutil.hh:147
PrintC::plusequal
static OpToken plusequal
The in-place addition operator.
Definition: printc.hh:103
RulePtrArith::checkTerm
static bool checkTerm(Varnode *vn, AddTreeState *state)
Accumulate details of given term and continue tree traversal.
Definition: ruleaction.cc:5656
LoadImageSection::code
@ code
code only
Definition: loadimage.hh:49
ExecutablePcodeGhidra
A p-code script that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:68
FuncProto::getLikelyTrash
const VarnodeData & getLikelyTrash(int4 i) const
Get the i-th likely-trash location.
Definition: fspec.cc:3385
EmulatePcodeOp::getLoadImageValue
virtual uintb getLoadImageValue(AddrSpace *spc, uintb offset, int4 sz) const
Pull a value from the load-image given a specific address.
Definition: emulateutil.cc:28
TypeOpIntSext
Information about the INT_SEXT op-code.
Definition: typeop.hh:358
MemoryState::getValue
uintb getValue(AddrSpace *spc, uintb off, int4 size) const
Retrieve a memory value from the memory state.
Definition: memstate.cc:666
Funcdata::opSwapInput
void opSwapInput(PcodeOp *op, int4 slot1, int4 slot2)
Swap two input operands in the given PcodeOp.
Definition: funcdata_op.cc:129
Heritage::generateStoreGuard
void generateStoreGuard(StackNode &node, PcodeOp *op, AddrSpace *spc)
Generate a guard record given an indexed STORE to a stack space.
Definition: heritage.cc:774
ScopeInternal::resolveExternalRefFunction
virtual Funcdata * resolveExternalRefFunction(ExternRefSymbol *sym) const
Convert an external reference to the referenced function.
Definition: database.cc:2225
TermOrder::terms
vector< PcodeOpEdge > terms
Collected terms.
Definition: coreaction.hh:1058
ActionReturnSplit::isSplittable
static bool isSplittable(BlockBasic *b)
Determine if a RETURN block can be split.
Definition: blockaction.cc:2222
ActionPool::printState
virtual void printState(ostream &s) const
Print status to stream.
Definition: action.cc:760
TypeOpIntSlessEqual::TypeOpIntSlessEqual
TypeOpIntSlessEqual(TypeFactory *t)
Constructor.
Definition: typeop.cc:870
Funcdata::warningHeader
void warningHeader(const string &txt) const
Add a warning comment as part of the function header.
Definition: funcdata.cc:111
MemoryHashOverlay::underlie
MemoryBank * underlie
Underlying memory bank.
Definition: memstate.hh:129
PrintLanguage::opIntAdd
virtual void opIntAdd(const PcodeOp *op)=0
Emit a INT_ADD operator.
ScopeLocal::restoreXml
virtual void restoreXml(const Element *el)
Restore this Scope from a <scope> XML tag.
Definition: varmap.cc:336
EmitXml::endReturnType
virtual void endReturnType(int4 id)
End a return type declaration.
Definition: prettyprint.cc:100
BreakCallBack
A breakpoint object.
Definition: emulate.hh:77
Address::printRaw
void printRaw(ostream &s) const
Write a raw version of the address to a stream.
Definition: address.hh:276
ScopeGhidraNamespace
A global namespace Scope.
Definition: database_ghidra.hh:126
PcodeOp::boolean_flip
@ boolean_flip
Set if condition must be false to take branch.
Definition: op.hh:77
ConditionalExecution::posta_block
BlockBasic * posta_block
First block in posta path.
Definition: condexe.hh:141
Funcdata::endDef
VarnodeDefSet::const_iterator endDef(uint4 fl) const
End of Varnodes with a given definition property.
Definition: funcdata.hh:345
ScopeMapper::last
Address last
The last address of the range.
Definition: database.hh:812
ActionInputPrototype::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3793
Scope::printEntries
virtual void printEntries(ostream &s) const =0
Dump a description of all SymbolEntry objects to a stream.
TraceDAG::BlockTrace::f_terminal
@ f_terminal
All paths from this point exit (without merging back to parent)
Definition: blockaction.hh:124
FlowInfo::artificialHalt
PcodeOp * artificialHalt(const Address &addr, uint4 flag)
Create an artificial halt p-code op.
Definition: flow.cc:578
LocationMap::findPass
int4 findPass(Address addr) const
Look up if/how given address was heritaged.
Definition: heritage.cc:83
ActionConditionalExe::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: condexe.cc:856
CPUI_INDIRECT
@ CPUI_INDIRECT
Copy with an indirect effect.
Definition: opcodes.hh:113
TypeOpIntAnd::TypeOpIntAnd
TypeOpIntAnd(TypeFactory *t)
Constructor.
Definition: typeop.cc:1091
RuleOrPredicate::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: condexe.cc:995
Funcdata::findPrimaryBranch
static PcodeOp * findPrimaryBranch(PcodeOpTree::const_iterator iter, PcodeOpTree::const_iterator enditer, bool findbranch, bool findcall, bool findreturn)
Find the primary branch operation for an instruction.
Definition: funcdata_op.cc:877
RuleSubvarShift
Perform SubvariableFlow analysis triggered by INT_RIGHT.
Definition: ruleaction.hh:1292
TypeOpPopcount
Information about the POPCOUNT op-code.
Definition: typeop.hh:798
RuleOrCollapse
Collapse unnecessary INT_OR.
Definition: ruleaction.hh:141
Architecture::readLoaderSymbols
void readLoaderSymbols(void)
Read any symbols from loader into database.
Definition: architecture.cc:280
MemoryImage::getPage
virtual void getPage(uintb addr, uint1 *res, int4 skip, int4 size) const
Overridded getPage method.
Definition: memstate.cc:384
RuleSignDiv2::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1179
TypeOpBinary::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:268
PrintLanguage::curscope
Scope * curscope
The current symbol scope.
Definition: printlanguage.hh:234
TypeOpCpoolref::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:1767
JoinSpace::restoreXml
virtual void restoreXml(const Element *el)
Recover the details of this space from XML.
Definition: space.cc:640
Override::indirectover
map< Address, Address > indirectover
Override indirect at call-point into direct to addr.
Definition: override.hh:53
ScopeInternal::makeNameUnique
virtual string makeNameUnique(const string &nm) const
Produce a version of the given symbol name that won't collide with other names in this Scope.
Definition: database.cc:2408
rangemap::record
std::list< _recordtype > record
Storage for the actual record objects.
Definition: rangemap.hh:129
Heritage::getStoreGuard
const LoadGuard * getStoreGuard(PcodeOp *op) const
Get LoadGuard record associated with given PcodeOp.
Definition: heritage.cc:2327
PrintLanguage::opFloatCeil
virtual void opFloatCeil(const PcodeOp *op)=0
Emit a FLOAT_CEIL operator.
ContextInternal::FreeArray::array
uintm * array
The "array of words" holding context variable values.
Definition: globalcontext.hh:264
ContextCache::ContextCache
ContextCache(ContextDatabase *db)
Construct given a context database.
Definition: globalcontext.cc:570
TokenSplit
A token/command object in the pretty printing stream.
Definition: prettyprint.hh:278
TypeChar::clone
virtual Datatype * clone(void) const
Clone the data-type.
Definition: type.hh:182
ContextDatabase::setVariable
void setVariable(const string &nm, const Address &addr, uintm value)
Set a context value at the given address.
Definition: globalcontext.cc:131
Merge::compareHighByBlock
static bool compareHighByBlock(const HighVariable *a, const HighVariable *b)
Compare HighVariables by the blocks they cover.
Definition: merge.hh:148
Funcdata::newVarnodeCallSpecs
Varnode * newVarnodeCallSpecs(FuncCallSpecs *fc)
Create a call specification annotation Varnode.
Definition: funcdata_varnode.cc:194
TypeFactory::getTypeChar
TypeChar * getTypeChar(const string &n)
Create a default "char" type.
Definition: type.cc:1641
ParamEntry::extracheck_high
@ extracheck_high
Perform extra checks during parameter recovery on most sig portion of the double.
Definition: fspec.hh:58
TypeOpIntSub::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:998
AncestorRealistic::mark
void mark(Varnode *vn)
Mark given Varnode is visited by the traversal.
Definition: funcdata.hh:613
CommentDatabaseGhidra::CommentDatabaseGhidra
CommentDatabaseGhidra(ArchitectureGhidra *g)
Constructor.
Definition: comment_ghidra.cc:18
PrintLanguageCapability
Base class for high-level language capabilities.
Definition: printlanguage.hh:39
FloatFormat::opSqrt
uintb opSqrt(uintb a) const
Square root (sqrt)
Definition: float.cc:482
ActionRestructureVarnode::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:817
RuleSelectCse::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:236
Varnode::getLocalType
Datatype * getLocalType(void) const
Calculate type of Varnode based on local information.
Definition: varnode.cc:730
OpFollow::slot
int4 slot
Slot to follow.
Definition: userop.hh:172
PcodeOp::output
Varnode * output
The one possible output Varnode of this op.
Definition: op.hh:121
BlockCondition::negateCondition
virtual bool negateCondition(bool toporbottom)
Flip the condition computed by this.
Definition: block.cc:2789
PrintLanguage::opIntXor
virtual void opIntXor(const PcodeOp *op)=0
Emit a INT_XOR operator.
RawLoadImage::vma
uintb vma
Address of first byte in the file.
Definition: loadimage.hh:97
FuncCallSpecs::FuncCallSpecs
FuncCallSpecs(PcodeOp *call_op)
Construct based on CALL or CALLIND.
Definition: fspec.cc:3992
ProtoStoreInternal::outparam
ProtoParameter * outparam
Description of the return value.
Definition: fspec.hh:1109
ParamListRegister::getType
virtual uint4 getType(void) const
Get the type of parameter list.
Definition: fspec.hh:565
ConditionalExecution::buildHeritageArray
void buildHeritageArray(void)
Calculate boolean array of all address spaces that have had a heritage pass run.
Definition: condexe.cc:365
PrintLanguage::falsebranch
@ falsebranch
Print the false branch (for flat)
Definition: printlanguage.hh:149
BlockMap
Helper class for resolving cross-references while deserializing BlockGraph objects.
Definition: block.hh:686
StackEqn::var2
int4 var2
Variable with -1 coefficient.
Definition: coreaction.cc:24
SymbolEntry::isAddrTied
bool isAddrTied(void) const
Is this storage address tied.
Definition: database.hh:243
CPUI_INT_AND
@ CPUI_INT_AND
Logical/bitwise and (&)
Definition: opcodes.hh:68
EmulateSnippet::executeSegmentOp
virtual void executeSegmentOp(void)
Behavior for a SEGMENTOP.
Definition: emulateutil.cc:264
PrintC::opStore
virtual void opStore(const PcodeOp *op)
Emit a STORE operator.
Definition: printc.cc:358
PrintC::comma
static OpToken comma
The comma operator (for parameter lists)
Definition: printc.hh:98
ParamEntryRange::InitData
Helper class for initializing ParamEntryRange in a range map.
Definition: fspec.hh:111
RuleCarryElim
Transform INT_CARRY using a constant: carry(V,c) => -c <= V
Definition: ruleaction.hh:659
Cover::contain
bool contain(const PcodeOp *op, int4 max) const
Does this contain the given PcodeOp.
Definition: cover.cc:363
ValueSetRead::compute
void compute(void)
Compute this value set.
Definition: rangeutil.cc:1790
ScopeGhidra::addRange
virtual void addRange(AddrSpace *spc, uintb first, uintb last)
Add a memory range to the ownership of this Scope.
Definition: database_ghidra.cc:243
ContextGhidra::getDefaultValue
virtual const uintm * getDefaultValue(void) const
Retrieve the memory region holding all default context values.
Definition: ghidra_context.hh:42
PrintLanguage::setCommentDelimeter
void setCommentDelimeter(const string &start, const string &stop, bool usecommentfill)
Establish comment delimiters for the language.
Definition: printlanguage.cc:96
EmitXml::endBlock
virtual void endBlock(int4 id)
End a control-flow element.
Definition: prettyprint.cc:68
PcodeOp::notPrinted
bool notPrinted(void) const
Return true if this op is not directly represented in C output.
Definition: op.hh:171
ScopeLocal::saveXml
virtual void saveXml(ostream &s) const
Write out this as a <scope> XML tag.
Definition: varmap.cc:325
CastStrategy::isExtensionCastImplied
virtual bool isExtensionCastImplied(const PcodeOp *op, const PcodeOp *readOp) const =0
Is the given ZEXT/SEXT cast implied by the expression its in?
TypeOpCallind::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:274
Heritage::reprocessFreeStores
void reprocessFreeStores(AddrSpace *spc, vector< PcodeOp * > &freeStores)
Revisit STOREs with free pointers now that a heritage pass has completed.
Definition: heritage.cc:940
ConstantPoolInternal::CheapSorter::operator<
bool operator<(const CheapSorter &op2) const
Lexicographic comparison.
Definition: cpool.hh:177
TransformManager::newPreexistingVarnode
TransformVar * newPreexistingVarnode(Varnode *vn)
Make placeholder for preexisting Varnode.
Definition: transform.cc:366
VarnodeDefSet
set< Varnode *, VarnodeCompareDefLoc > VarnodeDefSet
A set of Varnodes sorted by definition (then location)
Definition: varnode.hh:47
SegmentOp::injectId
int4 injectId
Id of InjectPayload that emulates this operation.
Definition: userop.hh:201
SubfloatFlow::traceForward
bool traceForward(TransformVar *rvn)
Try to trace logical variable through descendant Varnodes.
Definition: subflow.cc:1768
ActionConditionalConst::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:559
PrintLanguage::opIntNotEqual
virtual void opIntNotEqual(const PcodeOp *op)=0
Emit a INT_NOTEQUAL operator.
ScopeInternal::clearAttribute
virtual void clearAttribute(Symbol *sym, uint4 attr)
Clear boolean Varnode properties on a Symbol.
Definition: database.cc:2073
PcodeOp::warning
@ warning
Warning has been generated for this op.
Definition: op.hh:109
comment_ghidra.hh
Obtain comments by talking to a Ghidra client.
AddrSpace::isOverlay
bool isOverlay(void) const
Return true if this is an overlay space.
Definition: space.hh:421
RawLoadImage::spaceid
AddrSpace * spaceid
Address space that the file bytes are mapped to.
Definition: loadimage.hh:100
HighVariable::flagsdirty
@ flagsdirty
Boolean properties for the HighVariable are dirty.
Definition: variable.hh:46
JumpModel::foldInGuards
virtual bool foldInGuards(Funcdata *fd, JumpTable *jump)=0
Eliminate any guard code involved in computing the switch destination.
Rule2Comp2Mult::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:3638
CPoolRecord::type
Datatype * type
Data-type associated with the object.
Definition: cpool.hh:68
findContiguousWhole
Varnode * findContiguousWhole(Funcdata &data, Varnode *vn1, Varnode *vn2)
Retrieve the whole Varnode given pieces.
Definition: varnode.cc:1606
ActionRestructureVarnode::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2081
FlowBlock::dedup
void dedup(void)
Eliminate duplicate edges.
Definition: block.cc:495
PrintC::new_op
static OpToken new_op
The new operator.
Definition: printc.hh:99
TraceDAG::BadEdgeScore::compareFinal
bool compareFinal(const BadEdgeScore &op2) const
Compare BadEdgeScore for unstructured suitability.
Definition: blockaction.cc:610
Funcdata::funcp
FuncProto funcp
Prototype of this function.
Definition: funcdata.hh:70
PrintLanguage::opPtrsub
virtual void opPtrsub(const PcodeOp *op)=0
Emit a PTRSUB operator.
PrintLanguage::revpol
vector< ReversePolish > revpol
The Reverse Polish Notation (RPN) token stack.
Definition: printlanguage.hh:235
ParamEntry::assumedExtension
OpCode assumedExtension(const Address &addr, int4 sz, VarnodeData &res) const
Calculate the type of extension to expect for the given logical value.
Definition: fspec.cc:190
TypeOpIntSright::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1192
BlockGraph::removeEdge
void removeEdge(FlowBlock *begin, FlowBlock *end)
Remove an edge between component FlowBlocks.
Definition: block.cc:1369
PartialSymbolEntry::hilite
EmitXml::syntax_highlight hilite
Highlight information for the field token.
Definition: printc.hh:50
Funcdata::restart_pending
@ restart_pending
Analysis must be restarted (because of new override info)
Definition: funcdata.hh:56
PrintJava::instanceof
static OpToken instanceof
The instanceof keyword.
Definition: printjava.hh:56
ProtoStoreSymbol::setOutput
virtual ProtoParameter * setOutput(const ParameterPieces &piece)
Establish the data-type and storage of the return value.
Definition: fspec.cc:2546
CastStrategy::checkIntPromotionForCompare
virtual bool checkIntPromotionForCompare(const PcodeOp *op, int4 slot) const =0
Check if integer promotion forces a cast for the given comparison op and slot.
AddrSpace::hasPhysical
bool hasPhysical(void) const
Return true if data is physically stored in this.
Definition: space.hh:401
type.hh
Classes for describing and printing data-types.
RuleCollectTerms::doDistribute
static int4 doDistribute(Funcdata &data, PcodeOp *op)
Distribute coefficient within one term.
Definition: ruleaction.cc:104
PrintC::emitBlockIf
virtual void emitBlockIf(const BlockIf *bl)
Emit an if/else style construct.
Definition: printc.cc:2485
ActionMergeAdjacent::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:365
TokenSplit::prot_e
@ prot_e
End of a function prototype.
Definition: prettyprint.hh:308
InjectPayloadGhidra::inject
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_ghidra.cc:47
BlockSwitch::CaseOrder::compare
static bool compare(const CaseOrder &a, const CaseOrder &b)
Compare two cases.
Definition: block.hh:785
ProtoStoreSymbol::clearAllInputs
virtual void clearAllInputs(void)
Clear all input parameters (and any backing symbols)
Definition: fspec.cc:2523
TransformOp::op_preexisting
@ op_preexisting
Op already exists (but will be transformed)
Definition: transform.hh:68
OptionInline::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:250
PrintC::pushPartialSymbol
virtual void pushPartialSymbol(const Symbol *sym, int4 off, int4 sz, const Varnode *vn, const PcodeOp *op, Datatype *outtype)
Push a variable that represents only part of a symbol onto the RPN stack.
Definition: printc.cc:1615
PrintLanguage::ReversePolish::paren
bool paren
True if parentheses are required.
Definition: printlanguage.hh:169
PcodeOpBank::beginAlive
list< PcodeOp * >::const_iterator beginAlive(void) const
Start of all PcodeOps marked as alive.
Definition: op.hh:291
PcodeInjectLibrary::scriptNames
vector< string > scriptNames
Map from injectid to script name.
Definition: pcodeinject.hh:174
AddrSpaceManager::insertSpace
void insertSpace(AddrSpace *spc)
Add a new address space to the model.
Definition: translate.cc:297
EmulateFunction::executeBranchind
virtual void executeBranchind(void)
Standard behavior for a BRANCHIND.
Definition: jumptable.cc:96
ActionParamDouble::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:697
ProtoStore::setOutput
virtual ProtoParameter * setOutput(const ParameterPieces &piece)=0
Establish the data-type and storage of the return value.
PathMeld::commonVn
vector< Varnode * > commonVn
Varnodes in common with all paths.
Definition: jumptable.hh:73
GhidraTranslate::oneInstruction
virtual int4 oneInstruction(PcodeEmit &emit, const Address &baseaddr) const
Transform a single machine instruction into pcode.
Definition: ghidra_translate.cc:100
ActionMergeType::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:398
FuncCallSpecs::entryaddress
Address entryaddress
First executing address of function.
Definition: fspec.hh:1439
ParamListStandard::fillinMap
virtual void fillinMap(ParamActive *active) const
Given an unordered list of storage locations, calculate a function prototype.
Definition: fspec.cc:864
Scope::name
string name
Name of this scope.
Definition: database.hh:425
BlockCopy::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:426
EmitXml::no_color
@ no_color
Un-highlighted.
Definition: prettyprint.hh:96
FuncProto::setModel
void setModel(ProtoModel *m)
Set the prototype model for this.
Definition: fspec.cc:2960
ActionLaneDivide::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:579
FlowBlock::removeOutEdge
void removeOutEdge(int4 slot)
Remove an outgoing edge.
Definition: block.cc:132
Sleigh::initialize
virtual void initialize(DocumentStorage &store)
Initialize the translator given XML configuration documents.
Definition: sleigh.cc:450
RuleAddUnsigned::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6226
PathMeld::markPaths
void markPaths(bool val, int4 startVarnode)
Mark PcodeOps paths from the given start.
Definition: jumptable.cc:958
Scope::addDynamicMapInternal
virtual SymbolEntry * addDynamicMapInternal(Symbol *sym, uint4 exfl, uint8 hash, int4 off, int4 sz, const RangeList &uselim)=0
Create a new SymbolEntry for a Symbol given a dynamic hash.
Funcdata::findVarnodeWritten
Varnode * findVarnodeWritten(int4 s, const Address &loc, const Address &pc, uintm uniq=~((uintm) 0)) const
Find a defined Varnode via its storage address and its definition address.
Definition: funcdata.hh:294
RuleCollectTerms
Collect terms in a sum: V * c + V * d => V * (c + d)
Definition: ruleaction.hh:59
TypeOpBoolAnd
Information about the BOOL_AND op-code.
Definition: typeop.hh:531
SleighArchitecture::languageindex
int4 languageindex
Index (within LanguageDescription array) of the active language.
Definition: sleigh_arch.hh:93
SubfloatFlow::preserveAddress
virtual bool preserveAddress(Varnode *vn, int4 bitSize, int4 lsbOffset) const
Should the address of the given Varnode be preserved when constructing a piece.
Definition: subflow.cc:1962
TransformVar::preexisting
@ preexisting
Varnode preexisted in the original data-flow.
Definition: transform.hh:33
Funcdata::descendantsOutside
static bool descendantsOutside(Varnode *vn)
Check if given Varnode has any descendants in a dead block.
Definition: funcdata_block.cc:228
CPUI_CAST
@ CPUI_CAST
Cast from one data-type to another.
Definition: opcodes.hh:117
DisassemblyCache
Definition: sleigh.hh:69
TreeHandler::skippedEntity
virtual void skippedEntity(const string &name)
Callback for an XML entity skipped by the parser.
Definition: xml.hh:238
LanguageDescription::description
string description
Human readable description of this language.
Definition: sleigh_arch.hh:58
Heritage::normalizeWriteSize
Varnode * normalizeWriteSize(Varnode *vn, const Address &addr, int4 size)
Normalize the size of a written Varnode, prior to heritage.
Definition: heritage.cc:264
BlockGraph::newBlockIf
BlockIf * newBlockIf(FlowBlock *cond, FlowBlock *tc)
Build a new BlockIf.
Definition: block.cc:1715
EmitXml::beginVarDecl
virtual int4 beginVarDecl(const Symbol *sym)
Begin a variable declaration.
Definition: prettyprint.cc:107
FlowBlock::getFrontLeaf
const FlowBlock * getFrontLeaf(void) const
Get the first leaf FlowBlock.
Definition: block.cc:316
ArchitectureGhidra::buildContext
virtual void buildContext(DocumentStorage &store)
Build the Context database.
Definition: ghidra_arch.cc:355
printlanguage.hh
Classes for printing tokens in a high-level language.
Varnode::operator<
bool operator<(const Varnode &op2) const
Comparison operator on Varnode.
Definition: varnode.cc:478
TypeFactory::glb
Architecture * glb
The Architecture object that owns this TypeFactory.
Definition: type.hh:400
OptionNoReturn
Mark/unmark a specific function with the noreturn property.
Definition: options.hh:105
xml.hh
Lightweight (and incomplete) XML parser for marshaling data to and from the decompiler.
JumpModelTrivial::recoverModel
virtual bool recoverModel(Funcdata *fd, PcodeOp *indop, uint4 matchsize, uint4 maxtablesize)
Attempt to recover details of the model, given a specific BRANCHIND.
Definition: jumptable.cc:381
Action::enableRule
bool enableRule(const string &specify)
Enable a specific Rule within this.
Definition: action.cc:234
Scope::stackFunction
static const Scope * stackFunction(const Scope *scope1, const Scope *scope2, const Address &addr, Funcdata **addrmatch)
Definition: database.cc:941
ActionMarkExplicit::OpStackElement::slot
int4 slot
The slot of the first input Varnode to traverse in this subexpression.
Definition: coreaction.hh:419
AddrSpace::isBigEndian
bool isBigEndian(void) const
Return true if values in this space are big endian.
Definition: space.hh:408
ActionGroup::getSubAction
virtual Action * getSubAction(const string &specify)
Retrieve a specific sub-action by name.
Definition: action.cc:439
ScopeInternal::removeSymbol
virtual void removeSymbol(Symbol *symbol)
Remove the given Symbol from this Scope.
Definition: database.cc:2006
EmitPrettyPrint::tagLine
virtual void tagLine(void)
Force a line break.
Definition: prettyprint.cc:905
Heritage::getInfo
HeritageInfo * getInfo(AddrSpace *spc)
Get the heritage status for the given address space.
Definition: heritage.hh:220
TypeFactory::sizeOfInt
int4 sizeOfInt
Size of the core "int" datatype.
Definition: type.hh:381
EmitPrettyPrint::checkend
void checkend(void)
Enforce whitespace for an end token.
Definition: prettyprint.cc:821
OtherSpace::OtherSpace
OtherSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind)
Constructor.
Definition: space.cc:399
RulePositiveDiv
Signed division of positive values is unsigned division.
Definition: ruleaction.hh:1128
LoadGuard::set
void set(PcodeOp *o, AddrSpace *s, uintb off)
Set a new unanalyzed LOAD guard that initially guards everything.
Definition: heritage.hh:122
Translate::getRegister
virtual const VarnodeData & getRegister(const string &nm) const =0
Get a register as VarnodeData given its name.
SleighBase
Common core of classes that read or write SLEIGH specification files natively.
Definition: sleighbase.hh:29
DecompileAt::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:261
ActionNameVars::OpRecommend::ct
Datatype * ct
The data-type associated with a name.
Definition: coreaction.hh:461
LoadImageXml
Implementation of the LoadImage interface using underlying data stored in an XML format.
Definition: loadimage_xml.hh:28
TermPatternOp::getNumVariableTerms
virtual int4 getNumVariableTerms(void) const =0
Get the number of input Varnodes expected.
ActionDominantCopy
Replace COPYs from the same source with a single dominant COPY.
Definition: coreaction.hh:964
ActionStart
Gather raw p-code for a function.
Definition: coreaction.hh:32
ActionGroup::resetStats
virtual void resetStats(void)
Reset all the counts to zero.
Definition: action.cc:401
TypeOpCopy::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:336
Database::resolvemap
ScopeResolve resolvemap
The Address to namespace map.
Definition: database.hh:841
CPUI_PTRSUB
@ CPUI_PTRSUB
Drill down to a sub-field (->)
Definition: opcodes.hh:119
BlockEdge::restoreXml
void restoreXml(const Element *el, BlockMap &resolver)
Restore this edge from an XML stream.
Definition: block.cc:34
TypeVoid::TypeVoid
TypeVoid(void)
Constructor.
Definition: type.hh:213
TransformManager::getPiece
TransformVar * getPiece(Varnode *vn, int4 bitSize, int4 lsbOffset)
Get (or create) placeholder piece.
Definition: transform.cc:583
CPoolRecord::primitive
@ primitive
Constant value of data-type type, cpool operator can be eliminated.
Definition: cpool.hh:48
BlockSwitch::CaseOrder::isdefault
bool isdefault
True if this is formal default case for the switch.
Definition: block.hh:642
PrintC::pushPtrCodeConstant
bool pushPtrCodeConstant(uintb val, const TypePointer *ct, const Varnode *vn, const PcodeOp *op)
Attempt to push a function name representing a constant pointer onto the RPN stack.
Definition: printc.cc:1386
JumpTable::isReachable
static bool isReachable(PcodeOp *op)
Check if the given PcodeOp still seems reachable in its function.
Definition: jumptable.cc:2180
OpBehaviorIntLeft::recoverInputBinary
virtual uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering an input value.
Definition: opbehavior.cc:388
JumpTable::collectloads
bool collectloads
Set to true if information about in-memory model data is/should be collected.
Definition: jumptable.hh:525
EmitPrettyPrint::scan
void scan(void)
Process a new token.
Definition: prettyprint.cc:729
CollapseStructure
Build a code structure from a control-flow graph (BlockGraph).
Definition: blockaction.hh:190
BlockGraph::addEdge
void addEdge(FlowBlock *begin, FlowBlock *end)
Add a directed edge between component FlowBlocks.
Definition: block.cc:1339
ArchOption
Base class for options classes that affect the configuration of the Architecture object.
Definition: options.hh:32
FlowBlock::f_cross_edge
@ f_cross_edge
An edge that crosses subtrees in the spanning tree.
Definition: block.hh:102
Funcdata::startProcessing
void startProcessing(void)
Start processing for this function.
Definition: funcdata.cc:126
JumpValues::initializeForReading
virtual bool initializeForReading(void) const =0
Initialize this for iterating over the set of possible values.
ScoreProtoModel::entry
vector< PEntry > entry
Map of parameter entries corresponding to trials.
Definition: fspec.hh:857
Architecture::parseLaneSizes
void parseLaneSizes(const Element *el)
Apply lane size configuration.
Definition: architecture.cc:899
PrintC::ptr_expr
static OpToken ptr_expr
Pointer adornment for a type declaration.
Definition: printc.hh:112
ContextInternal::getContextSize
virtual int4 getContextSize(void) const
Retrieve the number of words (uintm) in a context blob.
Definition: globalcontext.hh:289
Architecture::initializeSegments
void initializeSegments()
Set up segment resolvers.
Definition: architecture.cc:634
JumpTable::checkForMultistage
bool checkForMultistage(Funcdata *fd)
Check if this jump-table requires an additional recovery stage.
Definition: jumptable.cc:2681
TypeOpIntRight
Information about the INT_RIGHT op-code.
Definition: typeop.hh:456
ActionDynamicMapping
Attach dynamically mapped symbols to Varnodes in time for data-type propagation.
Definition: coreaction.hh:986
LoopBody::findExit
void findExit(const vector< FlowBlock * > &body)
Choose the exit block for this loop.
Definition: blockaction.cc:175
ProtoStoreSymbol::getSymbolBacked
ParameterSymbol * getSymbolBacked(int4 i)
Fetch or allocate the parameter for the indicated slot.
Definition: fspec.cc:2448
FlowBlock::dominates
bool dominates(const FlowBlock *subBlock) const
Does this block dominate the given block.
Definition: block.cc:362
MapState::~MapState
~MapState(void)
Destructor.
Definition: varmap.cc:720
ProtoModel::getBiggestContainedInputParam
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
RuleDoubleArithShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1923
AddrSpace::getTrans
const Translate * getTrans(void) const
Get the processor translator.
Definition: space.hh:277
JumpBasic::foldInGuards
virtual bool foldInGuards(Funcdata *fd, JumpTable *jump)
Eliminate any guard code involved in computing the switch destination.
Definition: jumptable.cc:1430
EffectRecord::unaffected
@ unaffected
The sub-function does not change the value at all.
Definition: fspec.hh:308
UnimplError::UnimplError
UnimplError(const string &s, int4 l)
Constructor.
Definition: translate.hh:41
ParamEntryRange::linetype
uintb linetype
The linear element for a rangemap.
Definition: fspec.hh:129
ProtoModel::checkInputSplit
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
Emulate::currentBehave
OpBehavior * currentBehave
Behavior of the next op to execute.
Definition: emulate.hh:171
Partition::stopNode
ValueSet * stopNode
Ending node of component.
Definition: rangeutil.hh:162
PrintLanguage::commentstart
string commentstart
Delimiter characters for the start of a comment.
Definition: printlanguage.hh:239
TokenSplit::tagOp
void tagOp(const char *ptr, EmitXml::syntax_highlight h, const PcodeOp *o)
Create an operator token.
Definition: prettyprint.hh:453
ProtoModel::assumedInputExtension
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
TypeOpCallind::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:617
ActionMergeRequired::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:353
PrintLanguage::opIntNegate
virtual void opIntNegate(const PcodeOp *op)=0
Emit a INT_NEGATE operator.
RuleNegateNegate::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7761
Funcdata::beginLoc
VarnodeLocSet::const_iterator beginLoc(int4 s, const Address &addr, const Address &pc, uintm uniq=~((uintm) 0)) const
Start of Varnodes matching storage and definition address.
Definition: funcdata.hh:328
BlockVarnode
Helper class associating a Varnode with the block where it is defined.
Definition: merge.hh:44
PrintLanguage::flat
@ flat
Do not print block structure.
Definition: printlanguage.hh:148
AddTreeState
Structure for sorting out pointer expression trees.
Definition: ruleaction.hh:31
RuleIgnoreNan
Treat FLOAT_NAN as always evaluating to false.
Definition: ruleaction.hh:1388
TypeOpFloatSub::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:604
AddrSpace::byteToAddressInt
static int4 byteToAddressInt(int4 val, uint4 ws)
Scale int4 from byte units to addressable units.
Definition: space.hh:514
Override::insertForceGoto
void insertForceGoto(const Address &targetpc, const Address &destpc)
Force a specific branch instruction to be an unstructured goto.
Definition: override.cc:56
Symbol::checkSizeTypeLock
void checkSizeTypeLock(void)
Calculate if size_typelock property is on.
Definition: database.cc:219
PrintLanguage::opIndirect
virtual void opIndirect(const PcodeOp *op)=0
Emit a INDIRECT operator.
RuleSborrow
Simplify signed comparisons using INT_SBORROW.
Definition: ruleaction.hh:548
OpBehaviorFloatMult::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:405
ActionRestartGroup::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: action.cc:529
PathMeld::opMeld
vector< RootedOp > opMeld
All the ops for the melded paths.
Definition: jumptable.hh:74
PrintLanguageCapability::thelist
static vector< PrintLanguageCapability * > thelist
The static array of registered high-level languages.
Definition: printlanguage.hh:40
OpBehaviorIntOr::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:374
FlowBlock::f_continue_goto
@ f_continue_goto
Block ends with a continue;.
Definition: block.hh:78
EmulateFunction::setVarnodeValue
virtual void setVarnodeValue(Varnode *vn, uintb val)
Given a specific Varnode, set the given value for it in the current machine state.
Definition: jumptable.cc:158
FuncProto::updateOutputTypes
void updateOutputTypes(const vector< Varnode * > &triallist)
Update the return value based on Varnode trials.
Definition: fspec.cc:3250
TokenSplit::delimtype
printclass delimtype
The general class of the token.
Definition: prettyprint.hh:327
RuleDivTermAdd::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6531
ProtoParameter::clone
virtual ProtoParameter * clone(void) const =0
Clone the parameter.
Emulate::executeCbranch
virtual bool executeCbranch(void)=0
Check if the conditional of a CBRANCH is true.
InjectParameter::name
string name
Name of the parameter (for use in parsing p-code source)
Definition: pcodeinject.hh:35
TrackedContext::saveXml
void saveXml(ostream &s) const
Save this to an XML stream.
Definition: globalcontext.cc:35
SpacebaseSpace::getSpacebaseFull
virtual const VarnodeData & getSpacebaseFull(int4 i) const
Return original spacebase register before truncation.
Definition: translate.cc:97
OptionConventionPrinting
Toggle whether the calling convention is printed when emitting function prototypes.
Definition: options.hh:135
FlowBlock::f_tree_edge
@ f_tree_edge
An edge in the spanning tree.
Definition: block.hh:100
ParamListMerged::fillinMap
virtual void fillinMap(ParamActive *active) const
Given an unordered list of storage locations, calculate a function prototype.
Definition: fspec.hh:588
RangeHint
Partial data-type information mapped to a specific range of bytes.
Definition: varmap.hh:69
VarnodeBank::clear
void clear(void)
Clear out all Varnodes and reset counters.
Definition: varnode.cc:854
Varnode::spacebase_placeholder
@ spacebase_placeholder
Definition: varnode.hh:86
PcodeOp::flags
uint4 flags
Collection of boolean attributes on this op.
Definition: op.hh:114
ValueSetSolver::establishTopologicalOrder
void establishTopologicalOrder(void)
Find the optimal order for iterating through the ValueSets.
Definition: rangeutil.cc:2028
bfd_arch.hh
Specific implementation of Architecture using GNU BFD libraries.
TokenSplit::begin_indent
@ begin_indent
Start of a new nesting level.
Definition: prettyprint.hh:286
spacetype
spacetype
Fundemental address space types.
Definition: space.hh:28
Varnode::written
@ written
This varnode has a defining op (def is nonzero)
Definition: varnode.hh:75
ContextGhidra::getContextSize
virtual int getContextSize(void) const
Retrieve the number of words (uintm) in a context blob.
Definition: ghidra_context.hh:58
PrintLanguage::opFloatSub
virtual void opFloatSub(const PcodeOp *op)=0
Emit a FLOAT_SUB operator.
FuncProto::setInputLock
void setInputLock(bool val)
Toggle the data-type lock on input parameters.
Definition: fspec.cc:3070
HighVariable::finalizeDatatype
void finalizeDatatype(Datatype *tp)
Set a final datatype for this variable.
Definition: variable.cc:292
TypeOpFloatLess::TypeOpFloatLess
TypeOpFloatLess(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1370
PcodeOpRaw::out
VarnodeData * out
Output varnode triple.
Definition: pcoderaw.hh:97
RangeHint::merge
bool merge(RangeHint *b, AddrSpace *space, TypeFactory *typeFactory)
Try to form the union of this with another RangeHint.
Definition: varmap.cc:160
Architecture::~Architecture
virtual ~Architecture(void)
Destructor.
Definition: architecture.cc:124
AddrSpaceManager::joinspace
AddrSpace * joinspace
Space for unifying split variables.
Definition: translate.hh:228
ProtoStoreInternal::clearOutput
virtual void clearOutput(void)
Clear the return value to TYPE_VOID.
Definition: fspec.cc:2679
ParamActive::joinTrial
void joinTrial(int4 slot, const Address &addr, int4 sz)
Join adjacent parameter trials.
Definition: fspec.cc:1504
RangeHint::open
@ open
An array with a (possibly unknown) number of elements.
Definition: varmap.hh:76
ParamActive::recoversubcall
bool recoversubcall
True if this is being used to recover prototypes of a sub-function call.
Definition: fspec.hh:231
PrintC::opIntSlessEqual
virtual void opIntSlessEqual(const PcodeOp *op)
Emit a INT_SLESSEQUAL operator.
Definition: printc.hh:237
RulePtrFlow::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1273
TypeOpIntRight::TypeOpIntRight
TypeOpIntRight(TypeFactory *t)
Constructor.
Definition: typeop.cc:1144
RuleSubvarZext
Perform SubvariableFlow analysis triggered by INT_ZEXT.
Definition: ruleaction.hh:1303
Override::insertProtoOverride
void insertProtoOverride(const Address &callpoint, FuncProto *p)
Override the assumed function prototype at a specific call site.
Definition: override.cc:111
LocationMap
Map object for keeping track of which address ranges have been heritaged.
Definition: heritage.hh:42
TraceDAG::checkOpen
bool checkOpen(BlockTrace *trace)
Check if we can push the given BlockTrace into its next node.
Definition: blockaction.cc:803
RuleOrPredicate::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: condexe.cc:1032
CoverBlock::merge
void merge(const CoverBlock &op2)
Merge another CoverBlock into this.
Definition: cover.cc:145
PcodeOpBank::deadandgone
list< PcodeOp * > deadandgone
List of retired PcodeOps.
Definition: op.hh:252
CommentSorter
A class for sorting comments into and within basic blocks.
Definition: comment.hh:188
ParamList::p_merged
@ p_merged
A merged model (multiple models merged together)
Definition: fspec.hh:345
Varnode::updateCover
void updateCover(void) const
Internal function for update coverage information.
Definition: varnode.cc:206
VarnodeBank::loc_tree
VarnodeLocSet loc_tree
Varnodes sorted by location then def.
Definition: varnode.hh:331
RuleBooleanNegate::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2688
CommentSorter::Subsort::pos
uint4 pos
A final count to guarantee a unique sorting.
Definition: comment.hh:199
VarnodeBank::setDef
Varnode * setDef(Varnode *vn, PcodeOp *op)
Change Varnode to be defined by the given PcodeOp.
Definition: varnode.cc:1004
Symbol::force_bin
@ force_bin
Force binary printing of constant symbol.
Definition: database.hh:180
Widener::determineIterationReset
virtual int4 determineIterationReset(const ValueSet &valueSet)=0
Upon entering a fresh partition, determine how the given ValueSet count should be reset.
PrintC::docFunction
virtual void docFunction(const Funcdata *fd)
Emit the declaration (and body) of a function.
Definition: printc.cc:2250
StackSolver::duplicate
void duplicate(void)
Duplicate each equation, multiplying by -1.
Definition: coreaction.cc:93
PrintC::opInsertOp
virtual void opInsertOp(const PcodeOp *op)
Emit an INSERT operator.
Definition: printc.cc:971
RuleSignDiv2::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7000
RuleZextCommute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4427
XmlArchitecture::buildLoader
virtual void buildLoader(DocumentStorage &store)
Build the LoadImage object and load the executable image.
Definition: xml_arch.cc:56
RulePtrFlow
Mark Varnode and PcodeOp objects that are carrying or operating on pointers.
Definition: ruleaction.hh:1264
FuncCallSpecs::abortSpacebaseRelative
void abortSpacebaseRelative(Funcdata &data)
Abort the attempt to recover the relative stack offset for this function.
Definition: fspec.cc:3982
TypeOpCbranch::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:498
SubvariableFlow::PatchRecord::extension_patch
@ extension_patch
Convert op into something that copies/extends logical value, adding zero bits.
Definition: subflow.hh:70
PrintC::hasCharTerminator
static bool hasCharTerminator(uint1 *buffer, int4 size, int4 charsize)
Check if the byte buffer has a (unicode) string terminator.
Definition: printc.cc:1219
EmitXml::endDocument
virtual void endDocument(int4 id)
End a whole document of output.
Definition: prettyprint.cc:38
OpBehavior::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:111
ActionMarkImplied::DescTreeElement::vn
Varnode * vn
The Varnode at this particular point in the path.
Definition: coreaction.hh:440
BlockEdge::reverse_index
int4 reverse_index
Index for edge coming other way.
Definition: block.hh:47
GuardRecord::bitsPreserved
int4 bitsPreserved
Number of bits copied (all other bits are zero)
Definition: jumptable.hh:137
CPUI_INT_REM
@ CPUI_INT_REM
Remainder/modulo, unsigned (%)
Definition: opcodes.hh:76
ValueSetRead::typeCode
int4 typeCode
0=pure constant 1=stack relative
Definition: rangeutil.hh:178
TypeOpIntMult::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1242
RuleLogic2Bool::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:521
RulePositiveDiv::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6508
LoadImageXml::getNextSymbol
virtual bool getNextSymbol(LoadImageFunc &record) const
Get the next symbol record.
Definition: loadimage_xml.cc:236
ParamListStandardOut::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage, vector< EffectRecord > &effectlist, bool normalstack)
Restore the model from an XML stream.
Definition: fspec.cc:1208
EmulatePcodeCache::getExecuteAddress
virtual Address getExecuteAddress(void) const
Get current execution address.
Definition: emulate.hh:364
LanedRegister::wholeSize
int4 wholeSize
Size of the whole register.
Definition: transform.hh:107
CastStrategyC::intPromotionType
virtual int4 intPromotionType(const Varnode *vn) const
Calculate the integer promotion code of a given Varnode.
Definition: cast.cc:98
action.hh
Action, Rule, and other associates classes supporting transformations on function data-flow.
ContextDatabase::restoreFromSpec
virtual void restoreFromSpec(const Element *el, const AddrSpaceManager *manage)=0
Add initial context state from XML tags in compiler/processor specifications.
AddrSpaceManager::setReverseJustified
void setReverseJustified(AddrSpace *spc)
Set reverse justified property on this space.
Definition: translate.cc:283
PcodeInjectLibrary::callMechTarget
vector< string > callMechTarget
Map from injectid to call-mech name.
Definition: pcodeinject.hh:173
Varnode::setFlags
void setFlags(uint4 fl) const
Internal method for setting boolean attributes.
Definition: varnode.cc:325
ConditionMarker::multion
bool multion
True if MULTIEQUAL used in condition.
Definition: condexe.hh:46
PrintC::opIntSdiv
virtual void opIntSdiv(const PcodeOp *op)
Emit a INT_SDIV operator.
Definition: printc.hh:257
Database::deleteScope
void deleteScope(Scope *scope)
Delete the given Scope and all its sub-scopes.
Definition: database.cc:2807
ParamList::getBiggestContainedParam
virtual bool getBiggestContainedParam(const Address &loc, int4 size, VarnodeData &res) const =0
Pass-back the biggest parameter contained within the given range.
TransformOp::input
vector< TransformVar * > input
Varnode inputs.
Definition: transform.hh:78
PrintLanguage::modifiers
modifiers
Possible context sensitive modifiers to how tokens get emitted.
Definition: printlanguage.hh:137
ScopeInternal::setCategory
virtual void setCategory(Symbol *sym, int4 cat, int4 ind)
Set the category and index for the given Symbol.
Definition: database.cc:2682
AddrSpaceManager::getNextSpaceInOrder
AddrSpace * getNextSpaceInOrder(AddrSpace *spc) const
Get the next contiguous address space.
Definition: translate.cc:581
PrintC::opBoolNegate
virtual void opBoolNegate(const PcodeOp *op)
Definition: printc.cc:622
ActionDeadCode::pushConsumed
static void pushConsumed(uintb val, Varnode *vn, vector< Varnode * > &worklist)
Definition: coreaction.cc:3076
FlowBlock::replaceEdgesThru
void replaceEdgesThru(int4 in, int4 out)
Remove this from flow between two blocks.
Definition: block.cc:186
partmap::database
maptype database
Map from linear split points to the value objects.
Definition: partmap.hh:54
PcodeOp::isFlowBreak
bool isFlowBreak(void) const
Return true if this op breaks fall-thru flow.
Definition: op.hh:178
ProtoModel::isConstruct
bool isConstruct
True if this model is a constructor for a particular object.
Definition: fspec.hh:630
Database::clearResolve
void clearResolve(Scope *scope)
Clear the ownership ranges associated with the given Scope.
Definition: database.cc:2726
ValueSetRead::addEquation
void addEquation(int4 slt, int4 type, const CircleRange &constraint)
Insert an equation restricting this value set.
Definition: rangeutil.cc:1779
FlowBlock::immed_dom
FlowBlock * immed_dom
Immediate dominating block.
Definition: block.hh:109
Funcdata::opInsertEnd
void opInsertEnd(PcodeOp *op, BlockBasic *bl)
Insert given PcodeOp at the end of a basic block.
Definition: funcdata_op.cc:405
ContextBitRange::ContextBitRange
ContextBitRange(int4 sbit, int4 ebit)
Construct a context value given an absolute bit range.
Definition: globalcontext.cc:23
Rule::Rule
Rule(const string &g, uint4 fl, const string &nm)
Construct given group, properties name.
Definition: action.cc:605
EmitPrettyPrint::scanqueue
circularqueue< int4 > scanqueue
References to current open and whitespace tokens.
Definition: prettyprint.hh:713
BlockIf::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:565
TypeField::type
Datatype * type
type of subfield
Definition: type.hh:127
ParamTrial::used
@ used
Trial is definitely used (final verdict)
Definition: fspec.hh:161
OptionDatabase::glb
Architecture * glb
The Architecture affected by the contained ArchOption.
Definition: options.hh:64
EmitXml::print
virtual void print(const char *str, syntax_highlight hl=no_color)
Emit other (more unusual) syntax as part of source code generation.
Definition: prettyprint.cc:291
Varnode::incidental_copy
@ incidental_copy
Do copies of this varnode happen as a side-effect.
Definition: varnode.hh:107
PrintC::opCallother
virtual void opCallother(const PcodeOp *op)
Emit a CALLOTHER operator.
Definition: printc.cc:507
TypeOpBoolAnd::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:534
Funcdata::endOp
PcodeOpTree::const_iterator endOp(const Address &addr) const
End of all (alive) PcodeOp objects attached to a specific Address.
Definition: funcdata.hh:476
TypeOpFloatNan::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:576
FuncCallSpecs::forceSet
void forceSet(Funcdata &data, const FuncProto &fp)
Force a more restrictive prototype on this call site.
Definition: fspec.cc:4516
Funcdata::deleteCallSpecs
void deleteCallSpecs(PcodeOp *op)
Remove the specification for a particular call.
Definition: funcdata.cc:469
FuncProto::effectBegin
vector< EffectRecord >::const_iterator effectBegin(void) const
Get iterator to front of EffectRecord list.
Definition: fspec.cc:3358
CastStrategy::UNSIGNED_EXTENSION
@ UNSIGNED_EXTENSION
The value is promoted using unsigned extension.
Definition: cast.hh:49
TypeOp::~TypeOp
virtual ~TypeOp(void)
Destructor.
Definition: typeop.cc:161
CommentDatabaseGhidra::deleteComment
virtual void deleteComment(Comment *com)
Remove the given Comment object from the container.
Definition: comment_ghidra.hh:44
RuleBoolNegate::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5169
RawBinaryArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const
Determine is this extension can handle this XML document.
Definition: raw_arch.cc:45
Element::addAttribute
void addAttribute(const string &nm, const string &vl)
Add a new name/value attribute pair to this element.
Definition: xml.hh:181
RuleShiftPiece::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3429
CommentSorter::stop
map< Subsort, Comment * >::const_iterator stop
Last comment in current set being walked.
Definition: comment.hh:233
PrintLanguage::emitBlockBasic
virtual void emitBlockBasic(const BlockBasic *bb)=0
Emit statements in a basic block.
BlockBasic::hasOnlyMarkers
bool hasOnlyMarkers(void) const
Does this block contain only MULTIEQUAL and INDIRECT ops.
Definition: block.cc:2471
Architecture::parseGlobal
void parseGlobal(const Element *el)
Apply global space configuration.
Definition: architecture.cc:786
RuleSLess2Zero::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:968
RuleSubRight::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6294
DocumentStorage::tagmap
map< string, const Element * > tagmap
The map from name to registered XML elements.
Definition: xml.hh:251
TransformManager::~TransformManager
virtual ~TransformManager(void)
Destructor.
Definition: transform.cc:325
Architecture::pcodeinjectlib
PcodeInjectLibrary * pcodeinjectlib
Pcode injection manager.
Definition: architecture.hh:145
FlowInfo::FlowInfo
FlowInfo(Funcdata &d, PcodeOpBank &o, BlockGraph &b, vector< FuncCallSpecs * > &q)
Constructor.
Definition: flow.cc:24
ScopeLocal::recoverNameRecommendationsForSymbols
void recoverNameRecommendationsForSymbols(void)
Run through name recommendations, checking if any match unnamed symbols.
Definition: varmap.cc:1230
ParameterPieces::flags
uint4 flags
additional attributes of the parameter
Definition: fspec.hh:297
Rule::basegroup
string basegroup
Group to which this Rule belongs.
Definition: action.hh:206
ActionDeadCode::markConsumedParameters
static void markConsumedParameters(FuncCallSpecs *fc, vector< Varnode * > &worklist)
Determine how the given sub-function parameters are consumed.
Definition: coreaction.cc:3353
RuleLessNotEqual::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2294
ActionMarkImplied::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:450
TypeVoid::TypeVoid
TypeVoid(const TypeVoid &op)
Construct from another TypeVoid.
Definition: type.hh:211
AliasChecker::alias
vector< uintb > alias
List of aliased addresses (as offsets)
Definition: varmap.hh:120
circularqueue::~circularqueue
~circularqueue(void)
Destructor.
Definition: prettyprint.hh:640
BlockBasic::restoreXmlBody
virtual void restoreXmlBody(List::const_iterator &iter, List::const_iterator enditer, BlockMap &resolver)
Restore details about this FlowBlock from an XML stream.
Definition: block.cc:2545
TypeSpacebase::TypeSpacebase
TypeSpacebase(AddrSpace *id, const Address &frame, Architecture *g)
Construct given an address space, scope, and architecture.
Definition: type.hh:368
ConstantPoolGhidra::getRecord
virtual const CPoolRecord * getRecord(const vector< uintb > &refs) const
Retrieve a constant pool record (CPoolRecord) given a reference to it.
Definition: cpool_ghidra.cc:30
RangeHint::contain
bool contain(const RangeHint *b) const
Return true if this or the given range contains the other.
Definition: varmap.cc:56
FloatFormat::getEncoding
uintb getEncoding(double host) const
Convert host's double into this encoding.
Definition: float.cc:277
TypeOpPtradd
Information about the PTRADD op-code.
Definition: typeop.hh:718
RuleIndirectCollapse::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:531
Address::containedBy
bool containedBy(int4 sz, const Address &op2, int4 sz2) const
Determine if op2 range contains this range.
Definition: address.cc:104
ParamTrial::checked
@ checked
Trial has been checked.
Definition: fspec.hh:160
ExecutablePcodeGhidra::inject
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_ghidra.cc:111
Funcdata::warning
void warning(const string &txt, const Address &ad) const
Add a warning comment in the function body.
Definition: funcdata.cc:95
OptionDatabase::restoreXml
void restoreXml(const Element *el)
Execute a series of option commands passed by XML.
Definition: options.cc:142
AddrSpaceManager::name2Space
map< string, AddrSpace * > name2Space
Map from name -> space.
Definition: translate.hh:221
FlowInfo::reinterpreted
void reinterpreted(const Address &addr)
Generate warning message or exception for a reinterpreted address.
Definition: flow.cc:592
Funcdata::double_precis_on
@ double_precis_on
Set if we are performing double precision recovery.
Definition: funcdata.hh:59
PrintLanguage::bestfit
@ bestfit
Decide on most aesthetic form.
Definition: printlanguage.hh:140
FlowInfo::checkContainedCall
void checkContainedCall(void)
Check if any of the calls this function makes are to already traced data-flow.
Definition: flow.cc:1335
PcodeOp::saveXml
void saveXml(ostream &s) const
Definition: op.cc:289
Funcdata::saveXmlJumpTable
void saveXmlJumpTable(ostream &s) const
Emit an XML description of jump-tables to stream.
Definition: funcdata.cc:573
FloatFormat::convertEncoding
uintb convertEncoding(uintb encoding, const FloatFormat *formin) const
Convert between two different formats.
Definition: float.cc:311
UserOpManage::parseVolatile
void parseVolatile(const Element *el, Architecture *glb)
Parse a <volatile> XML tag.
Definition: userop.cc:435
ConstantPoolInternal::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)
Restore constant pool records from an XML stream.
Definition: cpool.cc:232
RuleTransformCpool
Transform CPOOLREF operations by looking up the value in the constant pool.
Definition: ruleaction.hh:629
Comment
A comment attached to a specific function and code address.
Definition: comment.hh:37
SubfloatFlow::doTrace
bool doTrace(void)
Trace logical value as far as possible.
Definition: subflow.cc:1973
PrintLanguage::docFunction
virtual void docFunction(const Funcdata *fd)=0
Emit the declaration (and body) of a function.
ParamTrial::offset
int4 offset
"justified" offset into entry
Definition: fspec.hh:176
OpBehaviorIntSborrow::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:330
FloatFormat::getNaNEncoding
uintb getNaNEncoding(bool sgn) const
Get an encoded NaN value.
Definition: float.cc:218
VolatileWriteOp
An operation that writes to volatile memory.
Definition: userop.hh:126
PrintLanguage::vartoken
@ vartoken
Emit atom as variable.
Definition: printlanguage.hh:157
Varnode::mapentry
SymbolEntry * mapentry
cached SymbolEntry associated with Varnode
Definition: varnode.hh:133
AncestorRealistic::State::flags
uint4 flags
Boolean properties of the node.
Definition: funcdata.hh:578
ActionPrototypeTypes
Lay down locked input and output data-type information.
Definition: coreaction.hh:607
LoopBody::uniquecount
int4 uniquecount
Total number of unique head and tail nodes.
Definition: blockaction.hh:48
PrintC::opCopy
virtual void opCopy(const PcodeOp *op)
Emit a COPY operator.
Definition: printc.cc:339
RuleBooleanNegate
Simplify comparisons with boolean values: V == false => !V, V == true => V
Definition: ruleaction.hh:498
ArchitectureGhidra::printMessage
virtual void printMessage(const string &message) const
Print an error message to console.
Definition: ghidra_arch.cc:696
AddrSpaceManager::getSpaceByName
AddrSpace * getSpaceByName(const string &nm) const
Get address space by name.
Definition: translate.cc:524
CPUI_FLOAT_FLOAT2FLOAT
@ CPUI_FLOAT_FLOAT2FLOAT
Convert between different floating-point sizes.
Definition: opcodes.hh:102
UserPcodeOp::glb
Architecture * glb
Architecture owning the user defined op.
Definition: userop.hh:40
RuleSubvarSext::reset
virtual void reset(Funcdata &data)
Reset this Rule.
Definition: ruleaction.cc:7717
ScopeGhidra::addSymbolInternal
virtual void addSymbolInternal(Symbol *sym)
Put a Symbol into the name map.
Definition: database_ghidra.hh:51
PrintC::bitwise_or
static OpToken bitwise_or
The logical or operator.
Definition: printc.hh:93
GuardRecord::readOp
PcodeOp * readOp
The immediate PcodeOp causing the restriction.
Definition: jumptable.hh:132
JumpBasic::getStride
static int4 getStride(Varnode *vn)
Get the step/stride associated with the Varnode.
Definition: jumptable.cc:441
LanedRegister::LanedIterator::normalize
void normalize(void)
Normalize the iterator, after increment or initialization.
Definition: transform.cc:267
ParamList::getSpacebase
virtual AddrSpace * getSpacebase(void) const =0
Get the address space associated with any stack based parameters in this list.
JumpAssistOp::defaultaddr
int4 defaultaddr
Id of p-code script performing calculation of default address (must be present)
Definition: userop.hh:232
Sleigh::registerContext
virtual void registerContext(const string &name, int4 sbit, int4 ebit)
Add a new context variable to the model for this processor.
Definition: sleigh.cc:672
ScopeInternal::ScopeInternal
ScopeInternal(const string &nm, Architecture *g)
Construct the Scope.
Definition: database.cc:1834
HeritageInfo::deadcodedelay
int4 deadcodedelay
How many passes to delay deadcode removal of this space.
Definition: heritage.hh:89
ParamEntryRange::SubsortPosition::position
int4 position
The position value.
Definition: fspec.hh:121
Partition::startNode
ValueSet * startNode
Starting node of component.
Definition: rangeutil.hh:161
RuleEqual2Constant
Simplify INT_EQUAL applied to arithmetic expressions.
Definition: ruleaction.hh:985
PrintC
The c-language token emitter.
Definition: printc.hh:63
PrintLanguage::setFlat
void setFlat(bool val)
Set whether nesting code structure should be emitted.
Definition: printlanguage.cc:761
Heritage::concatPieces
Varnode * concatPieces(const vector< Varnode * > &vnlist, PcodeOp *insertop, Varnode *finalvn)
Concatenate a list of Varnodes together at the given location.
Definition: heritage.cc:355
RuleRightShiftAnd
Simplify INT_RIGHT and INT_SRIGHT ops where an INT_AND mask becomes unnecessary.
Definition: ruleaction.hh:181
HighVariable::nameRepresentative
Varnode * nameRepresentative
The storage location used to generate a Symbol name.
Definition: variable.hh:64
Heritage::fd
Funcdata * fd
The function this is controlling SSA construction.
Definition: heritage.hh:201
SeqNum::saveXml
void saveXml(ostream &s) const
Save a SeqNum to a stream as an XML tag.
Definition: address.cc:47
AddrSpace::getContain
virtual AddrSpace * getContain(void) const
Return this space's containing space (if any)
Definition: space.hh:478
HighVariable::typedirty
@ typedirty
The data-type for the HighVariable is dirty.
Definition: variable.hh:48
BlockSwitch::CaseOrder
A class for annotating and sorting the individual cases of the switch.
Definition: block.hh:633
MemoryState::setMemoryBank
void setMemoryBank(MemoryBank *bank)
Map a memory bank into the state.
Definition: memstate.cc:618
ProtoStoreSymbol::clone
virtual ProtoStore * clone(void) const
Clone the entire collection of parameter descriptions.
Definition: fspec.cc:2570
ActionNameVars::OpRecommend::namerec
string namerec
A possible name for a variable.
Definition: coreaction.hh:462
RulePullsubMulti::buildSubpiece
static Varnode * buildSubpiece(Varnode *basevn, uint4 outsize, uint4 shift, Funcdata &data)
Build a SUBPIECE of given base Varnode.
Definition: ruleaction.cc:825
EmitPrettyPrint::advanceleft
void advanceleft(void)
Emit tokens that have been fully committed.
Definition: prettyprint.cc:698
EmulateMemory::memstate
MemoryState * memstate
The memory state of the emulator.
Definition: emulate.hh:245
SymbolCompareName::operator()
bool operator()(const Symbol *sym1, const Symbol *sym2) const
Compare two Symbol pointers.
Definition: database.hh:317
TraceDAG::BadEdgeScore
Record for scoring a BlockTrace for suitability as an unstructured branch.
Definition: blockaction.hh:144
PcodeOpRaw::getBehavior
OpBehavior * getBehavior(void) const
Retrieve the behavior for this op.
Definition: pcoderaw.hh:126
ActionReturnRecovery
Determine data-flow holding the return value of the function.
Definition: coreaction.hh:760
PrintLanguage::ReversePolish::id
int4 id
The id of the token group which this belongs to.
Definition: printlanguage.hh:171
Varnode::readonly
@ readonly
Varnode is stored at a readonly location.
Definition: varnode.hh:90
OptionInPlaceOps::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:354
JumpBasic2::initializeStart
void initializeStart(const PathMeld &pathMeld)
Pass in the prior PathMeld calculation.
Definition: jumptable.cc:1523
TypeOpBinary::metaout
type_metatype metaout
The metatype of the output.
Definition: typeop.hh:156
OpBehaviorPiece
CPUI_PIECE behavior.
Definition: opbehavior.hh:492
Merge::mergeAddrTied
void mergeAddrTied(void)
Force the merge of address tried Varnodes.
Definition: merge.cc:523
CircleRange::getMaxInfo
int4 getMaxInfo(void) const
Get maximum information content of range.
Definition: rangeutil.cc:278
LoadImageXml::addrtosymbol
map< Address, string > addrtosymbol
Symbols sorted by address.
Definition: loadimage_xml.hh:34
PcodeOpRaw
A low-level representation of a single pcode operation.
Definition: pcoderaw.hh:94
LoadImageXml::open
void open(const AddrSpaceManager *m)
Read XML tags into the containers.
Definition: loadimage_xml.cc:67
GuardRecord::baseVn
Varnode * baseVn
Value being (quasi)copied to the Varnode.
Definition: jumptable.hh:136
SymbolEntry::EntrySubsort
Class for sub-sorting different SymbolEntry objects at the same address.
Definition: database.hh:83
TransformOp::op
PcodeOp * op
Original op which this is splitting (or null)
Definition: transform.hh:73
ParameterSymbol::isSizeTypeLocked
virtual bool isSizeTypeLocked(void) const
Is the size of the parameter locked.
Definition: fspec.cc:2346
PrintC::opIntOr
virtual void opIntOr(const PcodeOp *op)
Emit a INT_OR operator.
Definition: printc.hh:251
LanguageDescription::deprecated
bool deprecated
Set to true if the specification is considered deprecated.
Definition: sleigh_arch.hh:59
Datatype::enumtype
@ enumtype
An enumeration type (as well as an integer)
Definition: type.hh:73
EmitXml::type_color
@ type_color
Data-type identifiers.
Definition: prettyprint.hh:90
SubfloatFlow::traceBackward
bool traceBackward(TransformVar *rvn)
Trace a logical value backward through defining op one level.
Definition: subflow.cc:1853
ConstantSpace
Special AddrSpace for representing constants during analysis.
Definition: space.hh:177
CastStrategyJava::isZextCast
virtual bool isZextCast(Datatype *outtype, Datatype *intype) const
Is zero-extending an input data-type, producing an output data-type, considered a cast.
Definition: cast.cc:421
ActionGroup::printStatistics
virtual void printStatistics(ostream &s) const
Dump statistics to stream.
Definition: action.cc:593
FlowBlock::outofthis
vector< BlockEdge > outofthis
Blocks into which this block (can) fall.
Definition: block.hh:115
EmulateSnippet::executeCall
virtual void executeCall(void)
Standard behavior for a p-code CALL.
Definition: emulateutil.cc:234
ConstantPoolInternal::CheapSorter::restoreXml
void restoreXml(const Element *el)
Deserialize the reference from an XML element.
Definition: cpool.cc:187
ActionDatabase::registerAction
void registerAction(const string &nm, Action *act)
Register a root Action.
Definition: action.cc:1080
TokenSplit::print
void print(const char *str, EmitXml::syntax_highlight h)
Create a token for other (more unusual) syntax in source code.
Definition: prettyprint.hh:512
MemoryImage::MemoryImage
MemoryImage(AddrSpace *spc, int4 ws, int4 ps, LoadImage *ld)
Constructor for a loadimage memorybank.
Definition: memstate.cc:405
ParameterSymbol::getSize
virtual int4 getSize(void) const
Get the number of bytes occupied by this parameter.
Definition: fspec.cc:2328
TypeOpIntSless::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:860
ValueSetSolver::component
void component(ValueSet *vertex, Partition &part)
Generate a partition component given its head.
Definition: rangeutil.cc:1960
TransformVar::normal_temp
@ normal_temp
A new temporary (unique space) Varnode.
Definition: transform.hh:34
DynamicHash::buildOpDown
void buildOpDown(const PcodeOp *op)
Move the output Varnode for the given PcodeOp into staging.
Definition: dynamic.cc:159
AssemblyEmit::dump
virtual void dump(const Address &addr, const string &mnem, const string &body)=0
The main disassembly emitting method.
JumpModel::buildLabels
virtual void buildLabels(Funcdata *fd, vector< Address > &addresstable, vector< uintb > &label, const JumpModel *orig) const =0
Recover case labels associated with the Address table.
RuleTermOrder::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:215
FlowInfo::addrlist
vector< Address > addrlist
Addresses to which there is flow.
Definition: flow.hh:86
EmulateSnippet::buildEmitter
PcodeEmit * buildEmitter(const vector< OpBehavior * > &inst, uintb uniqReserve)
Provide the caller with an emitter for building the p-code snippet.
Definition: emulateutil.cc:310
Scope::saveXmlRecursive
void saveXmlRecursive(ostream &s, bool onlyGlobal) const
Save all contained scopes as an XML stream.
Definition: database.cc:1273
Merge::blockIntersection
bool blockIntersection(HighVariable *a, HighVariable *b, int4 blk)
Test if two HighVariables intersect on a given BlockBasic.
Definition: merge.cc:1515
TypeOp
Associate data-type and behavior information with a specific p-code op-code.
Definition: typeop.hh:37
RuleSwitchSingle::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5076
PrintC::divide
static OpToken divide
The division operator.
Definition: printc.hh:79
UserOpManage::registerOp
void registerOp(UserPcodeOp *op)
Insert a new UserPcodeOp description object in the map(s)
Definition: userop.cc:361
PrintLanguage::emitBlockInfLoop
virtual void emitBlockInfLoop(const BlockInfLoop *bl)=0
Emit an infinite loop structure.
PrintLanguage::docTypeDefinitions
virtual void docTypeDefinitions(const TypeFactory *typegrp)=0
Emit definitions of data-types.
ActionFuncLinkOutOnly
Prepare for data-flow analysis of function parameters, when recovery isn't required.
Definition: coreaction.hh:677
ParamListStandard::thisbeforeret
bool thisbeforeret
Does a this parameter come before a hidden return parameter.
Definition: fspec.hh:496
FuncProto::setPieces
void setPieces(const PrototypePieces &pieces)
Set this prototype based on raw pieces.
Definition: fspec.cc:2984
ActionReturnRecovery::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:764
ValueSet::count
int4 count
Depth first numbering / widening count.
Definition: rangeutil.hh:131
CircleRange::pushForwardUnary
bool pushForwardUnary(OpCode opc, const CircleRange &in1, int4 inSize, int4 outSize)
Push-forward thru given unary operator.
Definition: rangeutil.cc:1083
PrintC::opCast
virtual void opCast(const PcodeOp *op)
Emit a CAST operator.
Definition: printc.hh:286
PrintLanguage::PrintLanguage
PrintLanguage(Architecture *g, const string &nm)
Constructor.
Definition: printlanguage.cc:57
MemoryHashOverlay::value
vector< uintb > value
The hashtable values.
Definition: memstate.hh:133
ProtoStoreInternal::getOutput
virtual ProtoParameter * getOutput(void)
Get the return-value description.
Definition: fspec.cc:2687
ContextGhidra::getTrackedSet
virtual const TrackedSet & getTrackedSet(const Address &addr) const
Get the set of tracked register values associated with the given address.
Definition: ghidra_context.cc:18
Funcdata::buildDynamicSymbol
void buildDynamicSymbol(Varnode *vn)
Build a dynamic Symbol associated with the given Varnode.
Definition: funcdata_varnode.cc:1097
Override::CALL_RETURN
@ CALL_RETURN
Replace primary BRANCH or RETURN with suitable CALL/RETURN operation.
Definition: override.hh:47
Funcdata::newOp
PcodeOp * newOp(int4 inputs, const Address &pc)
Definition: funcdata_op.cc:295
Funcdata::clear
void clear(void)
Clear out old disassembly.
Definition: funcdata.cc:64
RuleNegateNegate::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:7755
TraceDAG::BadEdgeScore::terminal
int4 terminal
1 if BlockTrace destination has no exit, 0 otherwise
Definition: blockaction.hh:148
PrintLanguage::pushConstant
virtual void pushConstant(uintb val, const Datatype *ct, const Varnode *vn, const PcodeOp *op)=0
Push a constant onto the RPN stack.
CircleRange::intersect
int4 intersect(const CircleRange &op2)
Intersect this with another range.
Definition: rangeutil.cc:547
BlockBasic::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:388
RuleConditionalMove::BoolExpress::optype
int4 optype
0=constant 1=unary 2=binary
Definition: ruleaction.hh:1352
PrintLanguage::printUnicode
virtual void printUnicode(ostream &s, int4 onechar) const =0
Print a single unicode character as a character constant for the high-level language.
RuleSubvarCompZero::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1284
AncestorRealistic::pop_failkill
@ pop_failkill
Backtracking, from path with a bad ancestor, specifically killedbycall.
Definition: funcdata.hh:602
ActionDeadCode::neverConsumed
static bool neverConsumed(Varnode *vn, Funcdata &data)
Deal with unconsumed Varnodes.
Definition: coreaction.cc:3322
RawBinaryArchitecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: raw_arch.cc:96
TypeOpLoad::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:397
ExecutablePcode::inputList
vector< uintb > inputList
Temporary ids of input varnodes.
Definition: pcodeinject.hh:139
Merge::inflate
void inflate(Varnode *a, HighVariable *high)
Inflate the Cover of a given Varnode with a HighVariable.
Definition: merge.cc:1546
Scope::removeSymbol
virtual void removeSymbol(Symbol *symbol)=0
Remove the given Symbol from this Scope.
FlowInfo::error_toomanyinstructions
@ error_toomanyinstructions
Throw an exception if too many instructions are encountered.
Definition: flow.hh:63
FlowBlock::block_flags
block_flags
Boolean properties of blocks.
Definition: block.hh:75
ScopeInternal::findContainer
virtual SymbolEntry * findContainer(const Address &addr, int4 size, const Address &usepoint) const
Find the smallest Symbol containing the given memory range.
Definition: database.cc:2113
MapState::addRange
void addRange(uintb st, Datatype *ct, uint4 fl, RangeHint::RangeType rt, int4 hi)
Add a hint to the collection.
Definition: varmap.cc:735
TypeOpFloatDiv::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:590
ParamEntry::smallsize_inttype
@ smallsize_inttype
Assume values that are below the max size are sign OR zero extended based on integer type.
Definition: fspec.hh:56
TreeHandler::startDocument
virtual void startDocument(void)
Start processing a new XML document.
Definition: xml.hh:225
MapState::initialize
bool initialize(void)
Initialize the hint collection for iteration.
Definition: varmap.cc:864
TypeOpFloatAdd
Information about the FLOAT_ADD op-code.
Definition: typeop.hh:580
PathMeld::append
void append(const PathMeld &op2)
Append a new set of paths to this set of paths.
Definition: jumptable.cc:904
Comment::decodeCommentType
static string decodeCommentType(uint4 val)
Convert comment property to string.
Definition: comment.cc:94
RuleBitUndistribute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:491
ConditionalJoin::clear
void clear(void)
Clear for a new test.
Definition: blockaction.cc:2092
EmulatePcodeOp::executeSegmentOp
virtual void executeSegmentOp(void)
Behavior for a SEGMENTOP.
Definition: emulateutil.cc:120
FuncCallSpecs::clone
FuncCallSpecs * clone(PcodeOp *newop) const
Clone this given the mirrored p-code CALL.
Definition: fspec.cc:4031
AddrSpace::calcScaleMask
void calcScaleMask(void)
Calculate scale and mask.
Definition: space.cc:21
printc.hh
Classes to support the c-language back-end of the decompiler.
PrintLanguage::NodePending::vnmod
uint4 vnmod
Printing modifications to enforce on the expression.
Definition: printlanguage.hh:182
CPUI_INT_SLESSEQUAL
@ CPUI_INT_SLESSEQUAL
Integer comparison, signed less-than-or-equal (<=)
Definition: opcodes.hh:54
FlowBlock::getJumptable
JumpTable * getJumptable(void) const
Get the JumpTable associated this block.
Definition: block.cc:597
MapState::gatherSymbols
void gatherSymbols(const EntryMap *rangemap)
Add Symbol information as hints to the collection.
Definition: varmap.cc:846
Scope::saveXml
virtual void saveXml(ostream &s) const =0
Write out this as a <scope> XML tag.
Range::getLastAddrOpen
Address getLastAddrOpen(const AddrSpaceManager *manage) const
Get address of first byte after this.
Definition: address.cc:237
AddrSpaceManager::getFspecSpace
AddrSpace * getFspecSpace(void) const
Get the internal callspec space.
Definition: translate.hh:451
Datatype::printRaw
virtual void printRaw(ostream &s) const
Print a description of the type to stream.
Definition: type.cc:69
LoadImage::getNextSymbol
virtual bool getNextSymbol(LoadImageFunc &record) const
Get the next symbol record.
Definition: loadimage.hh:151
SubvariableFlow::pullcount
int4 pullcount
Number of instructions pulling out the logical value.
Definition: subflow.hh:91
Funcdata::~Funcdata
~Funcdata(void)
Destructor.
Definition: funcdata.cc:162
ScopeInternal::addMapInternal
virtual SymbolEntry * addMapInternal(Symbol *sym, uint4 exfl, const Address &addr, int4 off, int4 sz, const RangeList &uselim)
Create a new SymbolEntry for a Symbol given a memory range.
Definition: database.cc:1730
OpBehaviorFloatTrunc::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:461
TransformOp::op_replacement
@ op_replacement
Op replaces an existing op.
Definition: transform.hh:67
Rule2Comp2Sub::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1075
AddrSpaceManager::addSpacebasePointer
void addSpacebasePointer(SpacebaseSpace *basespace, const VarnodeData &ptrdata, int4 truncSize, bool stackGrowth)
Set the base register of a spacebase space.
Definition: translate.cc:404
Architecture::buildInstructions
virtual void buildInstructions(DocumentStorage &store)
Register the p-code operations.
Definition: architecture.cc:595
PrintLanguage::NodePending::op
const PcodeOp * op
The single operator consuming value from the implied Varnode.
Definition: printlanguage.hh:181
ExecutablePcode::outputList
vector< uintb > outputList
Temporary ids of output varnodes.
Definition: pcodeinject.hh:140
PcodeOp::getNZMaskLocal
uintb getNZMaskLocal(bool cliploop) const
Calculate known zero bits for output to this op.
Definition: op.cc:408
AncestorRealistic
Helper class for determining if Varnodes can trace their value from a legitimate source.
Definition: funcdata.hh:566
PcodeEmitCache::PcodeEmitCache
PcodeEmitCache(vector< PcodeOpRaw * > &ocache, vector< VarnodeData * > &vcache, const vector< OpBehavior * > &in, uintb uniqReserve)
Constructor.
Definition: emulate.cc:102
get_booleanflip
OpCode get_booleanflip(OpCode opc, bool &reorder)
Get the complementary OpCode.
Definition: opcodes.cc:92
dynamic.hh
Utilities for making references to dynamic variables: defined as locations and constants that can onl...
Funcdata::baddata_present
@ baddata_present
Set if function flowed into bad data.
Definition: funcdata.hh:58
FlowInfo::ignore_unimplemented
@ ignore_unimplemented
Treat unimplemented instructions as a NOP (no operation)
Definition: flow.hh:59
BlockCopy::negateCondition
virtual bool negateCondition(bool toporbottom)
Flip the condition computed by this.
Definition: block.hh:429
HighVariable::flags
uint4 flags
Boolean properties inherited from Varnode members.
Definition: variable.hh:62
RuleSLess2Zero::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:5351
PrintLanguage::setLineCommentIndent
void setLineCommentIndent(int4 val)
Set the number of characters to indent comment lines.
Definition: printlanguage.cc:82
ActionHeritage
Build Static Single Assignment (SSA) representation for function.
Definition: coreaction.hh:276
TypeOp::opflags
uint4 opflags
Cached pcode-op properties for this op-code.
Definition: typeop.hh:46
ActionDeadCode
Dead code removal. Eliminate dead p-code ops.
Definition: coreaction.hh:540
HighVariable::updateFlags
void updateFlags(void) const
(Re)derive boolean properties of this from the member Varnodes
Definition: variable.cc:97
RawBinaryArchitecture::adjustvma
long adjustvma
What address byte 0 of the raw file gets treated as.
Definition: raw_arch.hh:36
EmulateSnippet::executeBranchind
virtual void executeBranchind(void)
Standard behavior for a BRANCHIND.
Definition: emulateutil.cc:228
CPoolRecord::has_thisptr
@ has_thisptr
Referenced method has a this pointer.
Definition: cpool.hh:58
ActionDatabase::getAction
Action * getAction(const string &nm) const
Look up a root Action by name.
Definition: action.cc:1066
XmlArchitectureCapability::xmlArchitectureCapability
static XmlArchitectureCapability xmlArchitectureCapability
The singleton instance.
Definition: xml_arch.hh:23
JumpBasic::recoverModel
virtual bool recoverModel(Funcdata *fd, PcodeOp *indop, uint4 matchsize, uint4 maxtablesize)
Attempt to recover details of the model, given a specific BRANCHIND.
Definition: jumptable.cc:1298
TypeOpIntScarry::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:1026
PcodeOp::isBooleanFlip
bool isBooleanFlip(void) const
Return true if this op flips the true/false meaning of its control-flow branching.
Definition: op.hh:180
CircleRange::encodeRangeOverlaps
static char encodeRangeOverlaps(uintb op1left, uintb op1right, uintb op2left, uintb op2right)
Calculate overlap code.
Definition: rangeutil.hh:356
CPoolRecord::is_constructor
@ is_constructor
Referenced method is a constructor.
Definition: cpool.hh:59
BfdArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const
Determine is this extension can handle this XML document.
Definition: bfd_arch.cc:58
RuleShiftBitops
Shifting away all non-zero bits of one-side of a logical/arithmetic op.
Definition: ruleaction.hh:171
CollapseStructure::ruleBlockGoto
bool ruleBlockGoto(FlowBlock *bl)
Attempt to apply the BlockGoto structure.
Definition: blockaction.cc:1430
CPUI_INT_SBORROW
@ CPUI_INT_SBORROW
Test for signed borrow.
Definition: opcodes.hh:64
RulePullsubMulti::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:923
FlowBlock::f_irreducible
@ f_irreducible
Edge which must be removed to make graph reducible.
Definition: block.hh:99
RuleSubRight::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1086
RuleCollectTerms::getMultCoeff
static Varnode * getMultCoeff(Varnode *vn, uintb &coef)
Get the multiplicative coefficient.
Definition: ruleaction.cc:80
ContextDatabase::registerVariable
virtual void registerVariable(const string &nm, int4 sbit, int4 ebit)=0
Register a new named context variable (as a bit range) with the database.
Rule::rule_debug
@ rule_debug
Print debug info specific for this rule.
Definition: action.hh:197
OverlaySpace::saveXml
virtual void saveXml(ostream &s) const
Write the details of this space as XML.
Definition: space.cc:662
PcodeOp::collapseConstantSymbol
void collapseConstantSymbol(Varnode *newConst) const
Propagate constant symbol from inputs to given output.
Definition: op.cc:364
EmulatePcodeCache::current_address
Address current_address
Address of current instruction being executed.
Definition: emulate.hh:302
PcodeOpBank::create
PcodeOp * create(int4 inputs, const Address &pc)
Create a PcodeOp with at a given Address.
Definition: op.cc:676
Funcdata::endOpAll
PcodeOpTree::const_iterator endOpAll(void) const
End of all (alive) PcodeOp objects sorted by sequence number.
Definition: funcdata.hh:470
OpBehaviorInt2Comp::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:346
JumpValuesRange::getStartOp
virtual PcodeOp * getStartOp(void) const
Get the PcodeOp associated with the current value.
Definition: jumptable.cc:306
Sleigh::printAssembly
virtual int4 printAssembly(AssemblyEmit &emit, const Address &baseaddr) const
Disassemble a single machine instruction.
Definition: sleigh.cc:599
PrintLanguage::opIntSext
virtual void opIntSext(const PcodeOp *op, const PcodeOp *readOp)=0
Emit a INT_SEXT operator.
EmitPrettyPrint::flush
virtual void flush(void)
Flush any remaining character data.
Definition: prettyprint.cc:1171
HighVariable::HighVariable
HighVariable(Varnode *vn)
Construct a HighVariable with a single member Varnode.
Definition: variable.cc:22
ActionNonzeroMask
Calculate the non-zero mask property on all Varnode objects.
Definition: coreaction.hh:287
Address::getAddrSize
int4 getAddrSize(void) const
Get the number of bytes in the address.
Definition: address.hh:263
address.hh
Classes for specifying addresses and other low-level constants.
FuncCallSpecs::isinputactive
bool isinputactive
Are we actively trying to recover input parameters.
Definition: fspec.hh:1449
Emulate::getExecuteAddress
virtual Address getExecuteAddress(void) const =0
Get the address of the current instruction being executed.
EmitXml::beginReturnType
virtual int4 beginReturnType(const Varnode *vn)
Begin a return type declaration.
Definition: prettyprint.cc:89
FlowInfo::inlineClone
void inlineClone(const FlowInfo &inlineflow, const Address &retaddr)
Clone the given in-line flow into this flow using the hard model.
Definition: flow.cc:1047
ContextDatabase::getTrackedDefault
virtual TrackedSet & getTrackedDefault(void)=0
Get the set of default values for all tracked registers.
InjectPayload::readParameter
static void readParameter(const Element *el, string &name, uint4 &size)
Read in an <input> or <output> XML tag describing an injection parameter.
Definition: pcodeinject.cc:24
EmitXml::closeParen
virtual void closeParen(char c, int4 id)
Emit a close parenthesis.
Definition: prettyprint.cc:319
ParameterSymbol::setTypeLock
virtual void setTypeLock(bool val)
Toggle the lock on the data-type.
Definition: fspec.cc:2370
Scope::getScopePath
void getScopePath(vector< Scope * > &vec) const
Get the ordered list of parent scopes to this.
Definition: database.cc:1382
SubvariableFlow::traceBackwardSext
bool traceBackwardSext(ReplaceVarnode *rvn)
Trace logical data-flow backward assuming sign-extensions.
Definition: subflow.cc:881
MemoryImage::loader
LoadImage * loader
The underlying LoadImage.
Definition: memstate.hh:94
WidenerFull::checkFreeze
virtual bool checkFreeze(const ValueSet &valueSet)
Check if the given value set has been frozen for the remainder of the iteration process.
Definition: rangeutil.cc:1827
RuleSwitchSingle::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:917
Funcdata::nodeSplitBlockEdge
BlockBasic * nodeSplitBlockEdge(BlockBasic *b, int4 inedge)
Split given basic block b along an in edge.
Definition: funcdata_block.cc:741
AddrSpace::numSpacebase
virtual int4 numSpacebase(void) const
Number of base registers associated with this space.
Definition: space.hh:447
Architecture::parseSpacebase
void parseSpacebase(const Element *el)
Create an additional indexed space.
Definition: architecture.cc:998
Symbol::getBytesConsumed
virtual int4 getBytesConsumed(void) const
Get number of bytes consumed within the address->symbol map.
Definition: database.cc:514
VarnodeData
Data defining a specific memory location.
Definition: pcoderaw.hh:33
Action::rule_onceperfunc
@ rule_onceperfunc
Apply rule once per function.
Definition: action.hh:55
Varnode::flags
uint4 flags
The collection of boolean attributes for this Varnode.
Definition: varnode.hh:123
PcodeOpRaw::addInput
void addInput(VarnodeData *i)
Add an additional input varnode to this op.
Definition: pcoderaw.hh:191
CPUI_COPY
@ CPUI_COPY
Copy one operand to another.
Definition: opcodes.hh:36
Varnode::termOrder
int4 termOrder(const Varnode *op) const
Compare two Varnodes based on their term order.
Definition: varnode.cc:791
TypeSpacebase::TypeSpacebase
TypeSpacebase(const TypeSpacebase &op)
Construct from another TypeSpacebase.
Definition: type.hh:364
ContextGhidra::getVariable
virtual ContextBitRange & getVariable(const string &nm)
Retrieve the context variable description object by name.
Definition: ghidra_context.hh:34
TokenSplit::func_b
@ func_b
Start of a function body.
Definition: prettyprint.hh:297
Scope::findContainer
virtual SymbolEntry * findContainer(const Address &addr, int4 size, const Address &usepoint) const =0
Find the smallest Symbol containing the given memory range.
FuncProto::model
ProtoModel * model
Model of for this prototype.
Definition: fspec.hh:1164
Architecture::fillinReadOnlyFromLoader
void fillinReadOnlyFromLoader(void)
Load info about read-only sections.
Definition: architecture.cc:1215
EmitXml::flush
virtual void flush(void)
Flush any remaining character data.
Definition: prettyprint.hh:173
BlockGraph::newBlockBasic
BlockBasic * newBlockBasic(Funcdata *fd)
Build a new BlockBasic.
Definition: block.cc:1570
TypeOpPtradd::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1647
Address::operator<
bool operator<(const Address &op2) const
Compare two addresses via their natural ordering.
Definition: address.hh:346
PrintC::printUnicode
virtual void printUnicode(ostream &s, int4 onechar) const
Print a single unicode character as a character constant for the high-level language.
Definition: printc.cc:1123
ArchitectureGhidra
An implementation of the Architecture interface and connection to a Ghidra client.
Definition: ghidra_arch.hh:60
CollapseStructure::ruleBlockSwitch
bool ruleBlockSwitch(FlowBlock *bl)
Attempt to apply the BlockSwitch structure.
Definition: blockaction.cc:1629
UnspecializedPcodeOp::restoreXml
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.hh:74
RawLoadImage::filesize
uintb filesize
Total number of bytes in the loadimage/file.
Definition: loadimage.hh:99
UserPcodeOp::useropindex
int4 useropindex
Index passed in the CALLOTHER op.
Definition: userop.hh:39
FlowBlock::replaceOutEdge
void replaceOutEdge(int4 num, FlowBlock *b)
Make an outgoing edge flow to a given block.
Definition: block.cc:166
PrintLanguage::setXML
void setXML(bool val)
Set whether the low-level emitter, emits XML markup.
Definition: printlanguage.cc:752
Symbol::mapentry
vector< list< SymbolEntry >::iterator > mapentry
List of storage locations labeled with this Symbol.
Definition: database.hh:169
SleighBase::SLA_FORMAT_VERSION
static const int4 SLA_FORMAT_VERSION
Current version of the .sla file read/written by SleighBash.
Definition: sleighbase.hh:30
RuleBoolZext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:511
RuleConcatZero::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4562
Emulate::setExecuteAddress
virtual void setExecuteAddress(const Address &addr)=0
Set the address of the next instruction to emulate.
LoopBody::clearMarks
static void clearMarks(vector< FlowBlock * > &body)
Clear the body marks.
Definition: blockaction.cc:1032
CastStrategyC::castStandard
virtual Datatype * castStandard(Datatype *reqtype, Datatype *curtype, bool care_uint_int, bool care_ptr_uint) const
Does there need to be a visible cast between the given data-types.
Definition: cast.cc:220
TransformManager::createVarnodes
void createVarnodes(vector< TransformVar * > &inputList)
Create a Varnode for each placeholder.
Definition: transform.cc:668
WidenerNone
Class for freezing value sets at a specific iteration (to accelerate convergence)
Definition: rangeutil.hh:252
ScopeLocal::resetLocalWindow
void resetLocalWindow(void)
Reset the set of addresses that are considered mapped by the scope to the default.
Definition: varmap.cc:298
TypeOpPtradd::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:725
RuleBxor2NotEqual::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:312
TokenSplit::oinv_t
@ oinv_t
Start of an arbitrary (invisible) grouping.
Definition: prettyprint.hh:319
RulePullsubMulti::findSubpiece
static Varnode * findSubpiece(Varnode *basevn, uint4 outsize, uint4 shift)
Find a predefined SUBPIECE of a base Varnode.
Definition: ruleaction.cc:898
ScopeInternal::clear
virtual void clear(void)
Clear all symbols from this scope.
Definition: database.cc:1858
PcodeInjectLibrary::restoreDebug
virtual void restoreDebug(const Element *el)
A method for reading in p-code generated externally for use in debugging.
Definition: pcodeinject.hh:214
PrintLanguage::opIntEqual
virtual void opIntEqual(const PcodeOp *op)=0
Emit a INT_EQUAL operator.
JumpValues::next
virtual bool next(void) const =0
Advance the iterator, return true if there is another value.
TypeOpIntLessEqual
Information about the INT_LESSEQUAL op-code.
Definition: typeop.hh:341
ActionConstantPtr::localcount
int4 localcount
Number of passes made for this function.
Definition: coreaction.hh:182
Symbol::getFirstWholeMap
SymbolEntry * getFirstWholeMap(void) const
Get the first entire mapping of the symbol.
Definition: database.cc:251
SleighBase::unique_allocatemask
uint4 unique_allocatemask
Bits that are guaranteed to be zero in the unique allocation scheme.
Definition: sleighbase.hh:37
Emulate::executeCpoolRef
virtual void executeCpoolRef(void)=0
Standard behavior for a CPOOLREF (constant pool reference) op.
RulePushPtr
Push a Varnode with known pointer data-type to the bottom of its additive expression.
Definition: ruleaction.hh:1018
RuleOrPredicate::checkSingle
int4 checkSingle(Varnode *vn, MultiPredicate &branch, PcodeOp *op, Funcdata &data)
Check for the alternate form, tmp1 = (val2 == 0) ? val1 : 0;.
Definition: condexe.cc:1016
Funcdata::lanedMap
map< VarnodeData, const LanedRegister * > lanedMap
Current storage locations which may be laned registers.
Definition: funcdata.hh:84
FuncProto::getReturnBytesConsumed
int4 getReturnBytesConsumed(void) const
Get an estimate of the number of bytes consumed by callers of this prototype.
Definition: fspec.hh:1228
RulePushPtr::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1021
PrintC::bitwise_xor
static OpToken bitwise_xor
The logical xor operator.
Definition: printc.hh:92
CollapseStructure::clipExtraRoots
bool clipExtraRoots(void)
Mark edges between root components as unstructured gotos.
Definition: blockaction.cc:1101
Datatype::poweroftwo
@ poweroftwo
An enumeration type where all values are of 2^^n form.
Definition: type.hh:74
Funcdata::replaceLessequal
static bool replaceLessequal(Funcdata &data, PcodeOp *op)
Replace INT_LESSEQUAL and INT_SLESSEQUAL expressions.
Definition: funcdata_op.cc:978
ScopeGhidra::lockDefaultProperties
void lockDefaultProperties(void)
Lock in the default state of the boolean property map.
Definition: database_ghidra.hh:65
DecompileAt
Command to decompile a specific function.
Definition: ghidra_process.hh:152
Varnode::copyShadow
bool copyShadow(const Varnode *op2) const
Are this and op2 copied from the same source?
Definition: varnode.cc:768
PrintLanguageCapability::findCapability
static PrintLanguageCapability * findCapability(const string &name)
Find a language capability by name.
Definition: printlanguage.cc:44
RegisterProgram::cspec
string cspec
Compiler specification to configure with.
Definition: ghidra_process.hh:104
FlowInfo::injectlist
vector< PcodeOp * > injectlist
List of p-code ops that need injection.
Definition: flow.hh:88
PcodeEmitCache::createVarnode
VarnodeData * createVarnode(const VarnodeData *var)
Clone and cache a raw VarnodeData.
Definition: emulate.cc:112
CPoolRecord::token
string token
Name or token associated with the object.
Definition: cpool.hh:66
SeqNum::operator!=
bool operator!=(const SeqNum &op2) const
Compare two sequence numbers for inequality.
Definition: address.hh:141
TypeOp::addlflags
uint4 addlflags
Additional properties.
Definition: typeop.hh:47
RuleConcatZext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:787
TraceDAG::BlockTrace::flags
uint4 flags
Properties of the BlockTrace.
Definition: blockaction.hh:126
Funcdata::restoreXmlJumpTable
void restoreXmlJumpTable(const Element *el)
Restore jump-tables from an XML description.
Definition: funcdata.cc:558
Funcdata::syncVarnodesWithSymbol
bool syncVarnodesWithSymbol(VarnodeLocSet::const_iterator &iter, uint4 flags, Datatype *ct)
Update properties (and the data-type) for a set of Varnodes associated with one Symbol.
Definition: funcdata_varnode.cc:875
StackSolver::soln
vector< int4 > soln
Collected solutions (corresponding to array of variables)
Definition: coreaction.cc:36
ConditionMarker::sameOpComplement
bool sameOpComplement(PcodeOp *bin1op, PcodeOp *bin2op)
Test if two operations with same opcode produce complementary boolean values.
Definition: condexe.cc:226
PrintLanguage::opSegmentOp
virtual void opSegmentOp(const PcodeOp *op)=0
Emit a SEGMENTOP operator.
ScopeLocal::nameRecommend
list< NameRecommend > nameRecommend
Symbol name recommendations for specific addresses.
Definition: varmap.hh:185
EmitPrettyPrint
A generic source code pretty printer.
Definition: prettyprint.hh:700
FloatFormat::FloatFormat
FloatFormat(int4 sz)
Construct default IEEE 754 standard settings.
Definition: float.cc:50
ruleaction.hh
This is the basic set of transformation Rule objects.
RuleIntLessEqual
Convert LESSEQUAL to LESS: V <= c => V < (c+1)
Definition: ruleaction.hh:191
TransformManager::pieceMap
map< int4, TransformVar * > pieceMap
Map from large Varnodes to their new pieces.
Definition: transform.hh:152
AliasChecker::gather
void gather(const Funcdata *f, AddrSpace *spc, bool defer)
Gather Varnodes that point on the stack.
Definition: varmap.cc:534
PrintC::pushAnnotation
virtual void pushAnnotation(const Varnode *vn, const PcodeOp *op)
Push an address which is not in the normal data-flow.
Definition: printc.cc:1511
AddrSpace::wrapOffset
uintb wrapOffset(uintb off) const
Wrap -off- to the offset that fits into this space.
Definition: space.hh:361
BlockVarnode::vn
Varnode * vn
The Varnode itself.
Definition: merge.hh:46
EmitPrettyPrint::rightotal
int4 rightotal
Definition: prettyprint.hh:709
AddrSpace::overlay
@ overlay
This space is an overlay of another space.
Definition: space.hh:82
ActionHeritage::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:279
FlowInfo::checkForFlowModification
bool checkForFlowModification(FuncCallSpecs &fspecs)
Check for modifications to flow at a call site given the recovered FuncCallSpecs.
Definition: flow.cc:622
RuleXorCollapse::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:682
ActionDefaultParams::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:2127
JumpValuesRange::next
virtual bool next(void) const
Advance the iterator, return true if there is another value.
Definition: jumptable.cc:288
EmulateSnippet::getExecuteAddress
virtual Address getExecuteAddress(void) const
Get the address of the current instruction being executed.
Definition: emulateutil.hh:148
LoopBody::mergeIdenticalHeads
static void mergeIdenticalHeads(vector< LoopBody * > &looporder)
Merge loop bodies that share the same head.
Definition: blockaction.cc:439
AliasChecker::AddBase::base
Varnode * base
The Varnode holding the base pointer.
Definition: varmap.hh:112
ContextInternal::saveContext
void saveContext(ostream &s, const Address &addr, const uintm *vec) const
Write out a single context block as an XML tag.
Definition: globalcontext.cc:324
ConditionalExecution::adjustDirectMulti
void adjustDirectMulti(void)
Update inputs to any MULTIEQUAL in the direct block.
Definition: condexe.cc:528
AddrSpace::constant_space_index
@ constant_space_index
Reserved index for the constant space.
Definition: space.hh:90
LaneDivide::WorkNode::numLanes
int4 numLanes
Number of lanes in the particular Varnode.
Definition: subflow.hh:171
AddrSpaceManager::defaultdataspace
AddrSpace * defaultdataspace
Default space where data lives.
Definition: translate.hh:225
FuncProto::voidinputlock
@ voidinputlock
Set if this prototype takes no inputs and is locked.
Definition: fspec.hh:1150
TokenSplit::vard_e
@ vard_e
End of a variable declaration.
Definition: prettyprint.hh:304
ParamEntry::extracheck_low
@ extracheck_low
Perform extra checks during parameter recovery on least sig portion of the double.
Definition: fspec.hh:59
Action::clone
virtual Action * clone(const ActionGroupList &grouplist) const =0
Clone the Action.
ConstantSpace::restoreXml
virtual void restoreXml(const Element *el)
Definition: space.cc:386
OpBehaviorIntAdd
CPUI_INT_ADD behavior.
Definition: opbehavior.hh:189
ActionPrototypeWarnings
Add warnings for prototypes that aren't modeled properly.
Definition: coreaction.hh:1008
OpBehaviorFloatAdd::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:389
BlockVarnode::index
int4 index
Index of BlockBasic defining Varnode.
Definition: merge.hh:45
PrintLanguage::opBoolAnd
virtual void opBoolAnd(const PcodeOp *op)=0
Emit a BOOL_AND operator.
VarnodeBank::createUnique
Varnode * createUnique(int4 s, Datatype *ct)
Create a temporary varnode.
Definition: varnode.cc:889
cseElimination
PcodeOp * cseElimination(Funcdata &data, PcodeOp *op1, PcodeOp *op2)
Perform a Common Subexpression Elimination step.
Definition: funcdata_op.cc:1184
Funcdata::followFlow
void followFlow(const Address &baddr, const Address &eadddr, uint4 insn_max)
Generate raw p-code for the function.
Definition: funcdata_op.cc:708
Architecture::modifySpaces
virtual void modifySpaces(Translate *trans)=0
Modify address spaces as required by this Architecture.
Translate::floatformats
vector< FloatFormat > floatformats
Floating point formats utilized by the processor.
Definition: translate.hh:298
ConditionalJoin::exita
BlockBasic * exita
First (common) exit point.
Definition: blockaction.hh:243
BlockGraph::markLabelBumpUp
virtual void markLabelBumpUp(bool bump)
Let hierarchical blocks steal labels of their (first) components.
Definition: block.cc:1184
ActionMergeAdjacent
Try to merge an op's input Varnode to its output, if they are at the same storage location.
Definition: coreaction.hh:362
Architecture::saveXml
virtual void saveXml(ostream &s) const
Serialize this architecture to XML.
Definition: architecture.cc:403
Datatype::saveXmlBasic
void saveXmlBasic(ostream &s) const
Save basic data-type properties.
Definition: type.cc:239
NameRecommend::name
string name
The local symbol name recommendation.
Definition: varmap.hh:33
JumpTable::maxleftright
uint4 maxleftright
Maximum shifts to normalize.
Definition: jumptable.hh:522
ConditionMarker::basevn
Varnode * basevn
The boolean Varnode on which the root CBRANCH keys.
Definition: condexe.hh:35
CastStrategy::isSextCast
virtual bool isSextCast(Datatype *outtype, Datatype *intype) const =0
Is sign-extending an input data-type, producing an output data-type, considered a cast.
Heritage::guard
void guard(const Address &addr, int4 size, vector< Varnode * > &read, vector< Varnode * > &write, vector< Varnode * > &inputvars)
Normalize p-code ops so that phi-node placement and renaming works.
Definition: heritage.cc:984
ScoreProtoModel::addParameter
void addParameter(const Address &addr, int4 sz)
Register a trial to be scored.
Definition: fspec.cc:2060
Equal3Form
Definition: double.hh:163
AddrSpace::flags
uint4 flags
Attributes of the space.
Definition: space.hh:98
PcodeInjectLibraryGhidra::PcodeInjectLibraryGhidra
PcodeInjectLibraryGhidra(ArchitectureGhidra *ghi)
Constructor.
Definition: inject_ghidra.cc:196
TypeOpIntDiv::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1256
TokenSplit::symbol
const Symbol * symbol
Associated Symbol being displayed.
Definition: prettyprint.hh:338
LanguageDescription::id
string id
Unique id for this language.
Definition: sleigh_arch.hh:57
ArchitectureGhidra::getType
Document * getType(const string &name, uint8 id)
Retrieve a data-type description for the given name and id.
Definition: ghidra_arch.cc:538
RuleCondNegate::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:5138
AncestorRealistic::allowFailingPath
bool allowFailingPath
True if we allow and test for failing paths due to conditional execution.
Definition: funcdata.hh:608
RuleSubvarSubpiece
Perform SubVariableFlow analysis triggered by SUBPIECE.
Definition: ruleaction.hh:1242
PcodeOp::indirect_creation
@ indirect_creation
Output varnode is created by indirect effect.
Definition: op.hh:96
FloatFormat::opCeil
uintb opCeil(uintb a) const
Ceiling (ceil)
Definition: float.cc:529
ParamActive::whichTrial
int4 whichTrial(const Address &addr, int4 sz) const
Get the trial overlapping with the given memory range.
Definition: fspec.cc:1423
RuleAndOrLump::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:154
OptionMaxLineWidth::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:417
RuleMultNegOne
Cleanup: Convert INT_2COMP from INT_MULT: V * -1 => -V
Definition: ruleaction.hh:1050
LoadImageSection::size
uintb size
Number of bytes in section.
Definition: loadimage.hh:54
Element::getAttributeValue
const string & getAttributeValue(const string &nm) const
Get an attribute value by name.
RuleOrPredicate::MultiPredicate::cbranch
PcodeOp * cbranch
CBRANCH determining if zero is set.
Definition: condexe.hh:218
OptionCommentStyle::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:469
TypeOp::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)=0
Print (for debugging purposes) this specific PcodeOp to the stream.
ArchitectureGhidra::getBytes
void getBytes(uint1 *buf, int4 size, const Address &inaddr)
Retrieve bytes in the LoadImage at the given address.
Definition: ghidra_arch.cc:583
ActionDeindirect
Eliminate locally constant indirect calls.
Definition: coreaction.hh:198
Funcdata::jumptablerecovery_dont
@ jumptablerecovery_dont
Don't try to recover jump-tables, always truncate.
Definition: funcdata.hh:55
FlowInfo::VisitStat::seqnum
SeqNum seqnum
Sequence number of first PcodeOp in the instruction (or INVALID if no p-code)
Definition: flow.hh:76
Action::printState
virtual void printState(ostream &s) const
Print status to stream.
Definition: action.cc:146
FlowBlock::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.hh:766
PrintLanguage::opIntSborrow
virtual void opIntSborrow(const PcodeOp *op)=0
Emit a INT_SBORROW operator.
ConditionalExecution::testIBlock
bool testIBlock(void)
Test the most basic requirements on iblock.
Definition: condexe.cc:385
LoadImage::closeSectionInfo
virtual void closeSectionInfo(void) const
Stop reading section info.
Definition: loadimage.hh:165
LaneDivide::buildBinaryOp
void buildBinaryOp(OpCode opc, PcodeOp *op, TransformVar *in0Vars, TransformVar *in1Vars, TransformVar *outVars, int4 numLanes)
Build binary op placeholders with the same opcode across a set of lanes.
Definition: subflow.cc:2058
Database::glb
Architecture * glb
The Architecture to which this symbol table is attached.
Definition: database.hh:839
ScopeInternal::buildVariableName
virtual string buildVariableName(const Address &addr, const Address &pc, Datatype *ct, int4 &index, uint4 flags) const
Given an address and data-type, build a suitable generic symbol name.
Definition: database.cc:2289
ActionGroup::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: action.cc:374
EmitXml::beginFuncProto
virtual int4 beginFuncProto(void)
Begin a function prototype declaration.
Definition: prettyprint.cc:139
PcodeInjectLibrary::getCallOtherTarget
string getCallOtherTarget(int4 injectid) const
Get the callother-fixup name associated with an id.
Definition: pcodeinject.cc:291
ArchitectureCapability::name
string name
Identifier for this capability.
Definition: architecture.hh:75
PrintC::emitLabel
void emitLabel(const FlowBlock *bl)
Emit a formal label for a given control-flow block.
Definition: printc.cc:2707
SubvariableFlow::getReplacementAddress
Address getReplacementAddress(ReplaceVarnode *rvn) const
Calculcate address of replacement Varnode for given subgraph variable node.
Definition: subflow.cc:1193
ScopeGhidra::setAttribute
virtual void setAttribute(Symbol *sym, uint4 attr)
Set boolean Varnode properties on a Symbol.
Definition: database_ghidra.hh:75
OptionErrorReinterpreted
Toggle whether off-cut reinterpretation of an instruction is a fatal error.
Definition: options.hh:225
TypeOpCallother::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:741
JumpTable::restoreXml
void restoreXml(const Element *el)
Recover this jump-table from a <jumptable> XML tag.
Definition: jumptable.cc:2629
EmitNoXml::beginBlock
virtual int4 beginBlock(const FlowBlock *bl)
Begin a control-flow element.
Definition: prettyprint.hh:227
rangemap::insert
std::list< _recordtype >::iterator insert(const inittype &data, linetype a, linetype b)
Insert a new record into the container.
Definition: rangemap.hh:222
ArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const =0
Determine is this extension can handle this XML document.
Architecture::parseFuncPtrAlign
void parseFuncPtrAlign(const Element *el)
Apply function pointer alignment configuration.
Definition: architecture.cc:975
AddrSpace::trans
const Translate * trans
Processor translator (for register names etc) for this space.
Definition: space.hh:96
contiguous_test
bool contiguous_test(Varnode *vn1, Varnode *vn2)
Test if Varnodes are pieces of a whole.
Definition: varnode.cc:1575
Funcdata::findLinkedVarnodes
void findLinkedVarnodes(SymbolEntry *entry, vector< Varnode * > &res) const
Find Varnodes that map to the given SymbolEntry.
Definition: funcdata_varnode.cc:1071
TypeOpIntSrem::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:512
uintbmasks
uintb uintbmasks[]
Precalculated masks indexed by size.
Definition: address.cc:571
ParamActive::stackplaceholder
int4 stackplaceholder
Which call input slot holds the stack placeholder.
Definition: fspec.hh:226
PrintLanguage::getCodepoint
static int4 getCodepoint(const uint1 *buf, int4 charsize, bool bigend, int4 &skip)
Extract the next unicode codepoint from an array of character data.
Definition: printlanguage.cc:553
SplitFlow
Class for splitting up Varnodes that hold 2 logical variables.
Definition: subflow.hh:132
pcoderaw.hh
Raw descriptions of varnodes and p-code ops.
Scope::resolveScope
Scope * resolveScope(const string &name) const
Find a child Scope of this.
Definition: database.cc:1236
TokenSplit::spc
const AddrSpace * spc
Associated Address.
Definition: prettyprint.hh:337
VarnodeBank::beginDef
VarnodeDefSet::const_iterator beginDef(uint4 fl) const
Beginning of varnodes with set definition property.
Definition: varnode.cc:1392
RulePiece2Zext
Concatenation with 0 becomes an extension: V = concat(#0,W) => V = zext(W)
Definition: ruleaction.hh:81
LanguageDescription::getCompiler
const CompilerTag & getCompiler(const string &nm) const
Get compiler specification of the given name.
Definition: sleigh_arch.cc:75
PrintC::object_member
static OpToken object_member
The member operator.
Definition: printc.hh:67
Funcdata::newVarnode
Varnode * newVarnode(int4 s, const Address &m, Datatype *ct=(Datatype *) 0)
Create a new unattached Varnode object.
Definition: funcdata_varnode.cc:139
LaneDivide::doTrace
bool doTrace(void)
Trace lanes as far as possible from the root Varnode.
Definition: subflow.cc:2479
ActionPool::perop
vector< Rule * > perop[CPUI_MAX]
Rules associated with each OpCode.
Definition: action.hh:261
Attributes::bogus_uri
static string bogus_uri
A placeholder for the namespace URI that should be attached to the element.
Definition: xml.hh:37
AddrSpaceManager::~AddrSpaceManager
virtual ~AddrSpaceManager(void)
Destroy the manager.
Definition: translate.cc:426
ActionDeterminedBranch::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3049
DocumentStorage
A container for parsed XML documents.
Definition: xml.hh:249
ValueSet::printRaw
void printRaw(ostream &s) const
Write a text description of to the given stream.
Definition: rangeutil.cc:1742
ActionDominantCopy::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:967
Element::name
string name
The (local) name of the element.
Definition: xml.hh:151
JumpTable::maxaddsub
uint4 maxaddsub
Maximum ADDs or SUBs to normalize.
Definition: jumptable.hh:521
PriorityQueue::curdepth
int4 curdepth
The current highest priority index with active blocks.
Definition: heritage.hh:66
ScopeInternal::findCodeLabel
virtual LabSymbol * findCodeLabel(const Address &addr) const
Find a label Symbol at the given address.
Definition: database.cc:2231
Funcdata::size
int4 size
Number of bytes of binary data in function body.
Definition: funcdata.hh:68
Translate::target_isbigendian
bool target_isbigendian
true if the general endianness of the process is big endian
Definition: translate.hh:294
AddrSpaceManager::restoreXmlSpaces
void restoreXmlSpaces(const Element *el, const Translate *trans)
Restore address spaces in the model from an XML tag.
Definition: translate.cc:228
Funcdata::cloneVarnode
Varnode * cloneVarnode(const Varnode *vn)
Clone a Varnode (between copies of the function)
Definition: funcdata_varnode.cc:241
ScopeGhidra::resolveExternalRefFunction
virtual Funcdata * resolveExternalRefFunction(ExternRefSymbol *sym) const
Convert an external reference to the referenced function.
Definition: database_ghidra.cc:358
TypeSpacebase::localframe
Address localframe
Address of function whose symbol table is indexed (or INVALID for "global")
Definition: type.hh:359
ProtoModel::~ProtoModel
virtual ~ProtoModel(void)
Destructor.
Definition: fspec.cc:1799
ValueSetSolver::recordStorage
list< Partition > recordStorage
Storage for the Partitions establishing components.
Definition: rangeutil.hh:292
CommentSorter::Subsort::setHeader
void setHeader(uint4 headerType)
Initialize a key for a header comment.
Definition: comment.hh:217
PartialSymbolEntry
A structure for pushing nested fields to the RPN stack.
Definition: printc.hh:45
RuleConcatLeftShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4595
ProtoModel::checkInputJoin
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
ProtoParameter::isIndirectStorage
virtual bool isIndirectStorage(void) const =0
Is this really a pointer to the true parameter.
EmulateSnippet::opList
vector< PcodeOpRaw * > opList
Sequence of p-code ops to be executed.
Definition: emulateutil.hh:113
xml_arch.hh
Extension to read executables based on an XML format.
Scope::renameSymbol
virtual void renameSymbol(Symbol *sym, const string &newname)=0
Rename a Symbol within this Scope.
OpBehaviorCopy::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:155
Merge::mergeTestSpeculative
static bool mergeTestSpeculative(HighVariable *high_out, HighVariable *high_in)
Speculative tests for merging HighVariables that are not Cover related.
Definition: merge.cc:166
ParamListStandard::separateFloat
void separateFloat(ParamActive *active, int4 &floatstart, int4 &floatstop, int4 &start, int4 &stop) const
Calculate the range of floating-point entries within a given set of parameter trials.
Definition: fspec.cc:690
rangemap::AddrRange::last
linetype last
End of the disjoint sub-range.
Definition: rangemap.hh:79
TypeOpIntRem::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1296
rangemap::PartIterator::iter
std::multiset< AddrRange >::const_iterator iter
The underlying multiset iterator.
Definition: rangemap.hh:101
TypeOpFloatEqual::TypeOpFloatEqual
TypeOpFloatEqual(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1356
RuleNotDistribute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:261
EmulatePcodeCache::varcache
vector< VarnodeData * > varcache
The cache of current varnodes.
Definition: emulate.hh:299
FlowBlock::isLoopDAGOut
bool isLoopDAGOut(int4 i) const
Is the i-th outgoing edge part of the DAG sub-graph.
Definition: block.hh:249
RuleBoolZext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2737
ConditionMarker::varnodeComplement
static bool varnodeComplement(Varnode *a, Varnode *b)
Do the given boolean Varnodes always hold complementary values.
Definition: condexe.cc:193
TypeOpIntSright::TypeOpIntSright
TypeOpIntSright(TypeFactory *t)
Constructor.
Definition: typeop.cc:1184
EmulateMemory::executeCall
virtual void executeCall(void)
Standard behavior for a p-code CALL.
Definition: emulate.cc:277
JumpModel::sanityCheck
virtual bool sanityCheck(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable)=0
Perform a sanity check on recovered addresses.
TypeUnicode::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:365
OpBehaviorCopy
CPUI_COPY behavior.
Definition: opbehavior.hh:123
EmitXml::tagLine
virtual void tagLine(void)
Force a line break.
Definition: prettyprint.cc:73
LoopBody::orderTails
void orderTails(void)
Find preferred tail.
Definition: blockaction.cc:238
Range::spc
AddrSpace * spc
Space containing range.
Definition: address.hh:163
EmulateFunction::fd
Funcdata * fd
The function being emulated.
Definition: jumptable.hh:101
JumpValuesRange::truncate
virtual void truncate(int4 nm)
Definition: jumptable.cc:257
SizePass::size
int4 size
Size of the range (in bytes)
Definition: heritage.hh:31
FlowBlock::f_duplicate_block
@ f_duplicate_block
Block is a duplicated version of an original basic block.
Definition: block.hh:92
ActionRestartGroup::curstart
int4 curstart
Current restart iteration.
Definition: action.hh:173
RuleIntLessEqual::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:660
JumpTable::foldInNormalization
void foldInNormalization(Funcdata *fd)
Hide the normalization code for the switch.
Definition: jumptable.cc:2400
TokenSplit::beginFuncProto
int4 beginFuncProto(void)
Create a "begin function prototype declaration" command.
Definition: prettyprint.hh:428
ActionStartTypes::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:75
PrintC::pointer_member
static OpToken pointer_member
The points to member operator.
Definition: printc.hh:68
Emulate::executeCurrentOp
void executeCurrentOp(void)
Do a single pcode op step.
Definition: emulate.cc:141
Merge::inflateTest
bool inflateTest(Varnode *a, HighVariable *high)
Test if we can inflate the Cover of the given Varnode without incurring intersections.
Definition: merge.cc:1567
OpBehaviorFloatNotEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:544
ContextDatabase::getTrackedSet
virtual const TrackedSet & getTrackedSet(const Address &addr) const =0
Get the set of tracked register values associated with the given address.
EmulatePcodeOp::executeBinary
virtual void executeBinary(void)
Execute a binary arithmetic/logical operation.
Definition: emulateutil.cc:54
EmulateMemory::executeCbranch
virtual bool executeCbranch(void)
Check if the conditional of a CBRANCH is true.
Definition: emulate.cc:263
ScopeLocal::dynRecommend
list< DynamicRecommend > dynRecommend
Symbol name recommendations for dynamic locations.
Definition: varmap.hh:186
RuleBoolNegate
Apply a set of identities involving BOOL_NEGATE.
Definition: ruleaction.hh:934
partmap
A map from a linear space to value objects.
Definition: partmap.hh:48
PcodeOpBank::clearCodeLists
void clearCodeLists(void)
Clear all op-code specific lists.
Definition: op.cc:662
Address::restoreXml
static Address restoreXml(const Element *el, const AddrSpaceManager *manage)
Restore an address from parsed XML.
Definition: address.cc:201
FuncProto::clearUnlockedOutput
void clearUnlockedOutput(void)
Clear the return value if it has not been locked.
Definition: fspec.cc:3147
PrintC::opIntLessEqual
virtual void opIntLessEqual(const PcodeOp *op)
Emit a INT_LESSEQUAL operator.
Definition: printc.hh:239
RuleShift2Mult::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3374
EffectRecord::operator<
bool operator<(const EffectRecord &op2) const
Comparator for EffectRecords.
Definition: fspec.hh:1546
SubfloatFlow::SubfloatFlow
SubfloatFlow(Funcdata *f, Varnode *root, int4 prec)
Definition: subflow.cc:1952
JumpValuesRange::curval
uintb curval
The current value pointed to be the iterator.
Definition: jumptable.hh:182
RawLoadImage
A simple raw binary loadimage.
Definition: loadimage.hh:96
ScopeGhidra::removeSymbol
virtual void removeSymbol(Symbol *symbol)
Remove the given Symbol from this Scope.
Definition: database_ghidra.hh:105
ProtoModel::possibleOutputParam
bool possibleOutputParam(const Address &loc, int4 size) const
Does the given storage location make sense as a return value.
Definition: fspec.hh:736
ActionMergeCopy::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:376
RegisterProgram::sendResult
virtual void sendResult(void)
Send results of the command (if any) back to the Ghidra client.
Definition: ghidra_process.cc:185
Heritage::placeMultiequals
void placeMultiequals(void)
Perform phi-node placement for the current set of address ranges.
Definition: heritage.cc:2157
Attributes::elementname
string * elementname
The name of the XML element.
Definition: xml.hh:39
CPoolRecord::array_length
@ array_length
Integer length, token is language specific indicator, type is integral data-type.
Definition: cpool.hh:53
ActionInferTypes::propagateAcrossReturns
static void propagateAcrossReturns(Funcdata &data)
Give data-types a chance to propagate between CPUI_RETURN operations.
Definition: coreaction.cc:4596
TypeOpIntAdd::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:370
VarnodeBank::destroy
void destroy(Varnode *vn)
Remove a Varnode from the container.
Definition: varnode.cc:900
Heritage::handleNewLoadCopies
void handleNewLoadCopies(void)
Mark the boundary of artificial ops introduced by load guards.
Definition: heritage.cc:543
Database::attachScope
void attachScope(Scope *newscope, Scope *parent)
Register a new Scope.
Definition: database.cc:2789
ScopeGhidra::findCodeLabel
virtual LabSymbol * findCodeLabel(const Address &addr) const
Find a label Symbol at the given address.
Definition: database_ghidra.cc:339
RuleConcatCommute::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4265
BlockGoto::gotoPrints
bool gotoPrints(void) const
Should a formal goto statement be emitted.
Definition: block.cc:2647
CircleRange::arrange
static const char arrange[]
Map from raw overlaps to normalized overlap code.
Definition: rangeutil.hh:54
RuleLessNotEqual::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2300
FlowBlock::eliminateOutDups
void eliminateOutDups(FlowBlock *bl)
Eliminate duplicate out edges to given block.
Definition: block.cc:445
RuleEqual2Zero::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:978
a_v_i
void a_v_i(ostream &s, const string &attr, intb val)
Output the given signed integer as an XML attribute value.
Definition: xml.hh:343
ProtoStoreSymbol::setInput
virtual ProtoParameter * setInput(int4 i, const string &nm, const ParameterPieces &pieces)
Establish name, data-type, storage of a specific input parameter.
Definition: fspec.cc:2463
TypeOpUnary::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:296
RuleOrPredicate::MultiPredicate::zeroBlock
const FlowBlock * zeroBlock
Final block in path that sets zero.
Definition: condexe.hh:216
RuleLessEqual::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:421
PrintLanguage::pushVnExplicit
void pushVnExplicit(const Varnode *vn, const PcodeOp *op)
Push an explicit variable onto the RPN stack.
Definition: printlanguage.cc:206
JumpBasic::calcRange
void calcRange(Varnode *vn, CircleRange &rng) const
Calculate the range of values in the given Varnode that direct control-flow to the switch.
Definition: jumptable.cc:1073
HighVariable::compareName
static bool compareName(Varnode *vn1, Varnode *vn2)
Determine which given Varnode is most nameable.
Definition: variable.cc:201
SpacebaseSpace::getSpacebase
virtual const VarnodeData & getSpacebase(int4 i) const
Get a base register that creates this virtual space.
Definition: translate.cc:89
SeqNum::setOrder
void setOrder(uintm ord)
Set the order field of a sequence number.
Definition: address.hh:135
JoinRecord::getEquivalentAddress
Address getEquivalentAddress(uintb offset, int4 &pos) const
Given offset in \join space, get equivalent address of piece.
Definition: translate.cc:127
RulePullsubIndirect::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1000
Merge::copyTrims
vector< PcodeOp * > copyTrims
COPY ops inserted to facilitate merges.
Definition: merge.hh:83
Merge::mergeTest
bool mergeTest(HighVariable *high, vector< HighVariable * > &tmplist)
Test for intersections between a given HighVariable and a list of other HighVariables.
Definition: merge.cc:1594
JumpTable::maxtablesize
uint4 maxtablesize
Maximum table size we allow to be built (sanity check)
Definition: jumptable.hh:520
JumpBasic2::clone
virtual JumpModel * clone(JumpTable *jt) const
Clone this model.
Definition: jumptable.cc:1625
IopSpace::IopSpace
IopSpace(AddrSpaceManager *m, const Translate *t, const string &nm, int4 ind)
Definition: op.cc:27
LabSymbol::saveXml
virtual void saveXml(ostream &s) const
Save this Symbol to an XML stream.
Definition: database.cc:688
RuleLeftRight
Transform canceling INT_RIGHT or INT_SRIGHT of INT_LEFT.
Definition: ruleaction.hh:388
FlowInfo::forwardRecursion
void forwardRecursion(const FlowInfo &op2)
Pull in-lining recursion information from another flow.
Definition: flow.cc:1016
OpBehavior::recoverInputBinary
virtual uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering an input value.
Definition: opbehavior.cc:149
loadimage_xml.hh
Support for programs stored using an XML schema.
PrintLanguageCapability::initialize
virtual void initialize(void)
Complete initialization of an extension point.
Definition: printlanguage.cc:33
PathMeld::meldOps
int4 meldOps(const vector< PcodeOp * > &path, int4 cutOff, const vector< int4 > &parentMap)
Meld in PcodeOps from a new path into this container.
Definition: jumptable.cc:788
EmitXml::comment_color
@ comment_color
Comments.
Definition: prettyprint.hh:89
ConstantPool::restoreXml
virtual void restoreXml(const Element *el, TypeFactory &typegrp)=0
Restore constant pool records from an XML stream.
BlockList::negateCondition
virtual bool negateCondition(bool toporbottom)
Flip the condition computed by this.
Definition: block.cc:2733
BlockGraph::addBlock
void addBlock(FlowBlock *bl)
Add a component FlowBlock.
Definition: block.cc:787
TypeOpFloatTrunc
Information about the FLOAT_TRUNC op-code.
Definition: typeop.hh:643
TokenSplit::stopComment
void stopComment(int4 id)
Create an "end a comment block" command.
Definition: prettyprint.hh:567
FlowBlock::isJumpTarget
bool isJumpTarget(void) const
Return true if non-fallthru jump flows into this.
Definition: block.cc:305
TreeHandler::endDocument
virtual void endDocument(void)
End processing for the current XML document.
Definition: xml.hh:226
SubvariableFlow::traceForwardSext
bool traceForwardSext(ReplaceVarnode *rvn)
Trace logical data-flow forward assuming sign-extensions.
Definition: subflow.cc:788
ValueSet::rightIsStable
bool rightIsStable
Set to true if right boundary of range didn't change (last iteration)
Definition: rangeutil.hh:134
Architecture::parseReturnAddress
void parseReturnAddress(const Element *el)
Apply return address configuration.
Definition: architecture.cc:866
ScopeInternal::buildUndefinedName
virtual string buildUndefinedName(void) const
Build a formal undefined name, used internally when a Symbol is not given a name.
Definition: database.cc:2375
ActionSwitchNorm
Normalize jump-table construction.
Definition: coreaction.hh:571
CommentDatabase
An interface to a container of comments.
Definition: comment.hh:84
Heritage::infolist
vector< HeritageInfo > infolist
Heritage status for individual address spaces.
Definition: heritage.hh:213
TypeOpIntAnd::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:434
SleighArchitecture::normalizeProcessor
static string normalizeProcessor(const string &nm)
Try to recover a language id processor field.
Definition: sleigh_arch.cc:333
TypeOpIntCarry::TypeOpIntCarry
TypeOpIntCarry(TypeFactory *t)
Constructor.
Definition: typeop.cc:1004
EmulateMemory::executeBranch
virtual void executeBranch(void)
Standard behavior for a BRANCH.
Definition: emulate.cc:257
ActionUnjustifiedParams
Adjust improperly justified parameters.
Definition: coreaction.hh:878
TypeOpFloatAbs::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:618
ValueSet::setVarnode
void setVarnode(Varnode *v, int4 tCode)
Attach this to given Varnode and set initial values.
Definition: rangeutil.cc:1489
IopSpace::saveXmlAttributes
virtual void saveXmlAttributes(ostream &s, uintb offset, int4 size) const
Save an address and size as XML.
Definition: op.hh:36
CommentDatabase::restoreXml
virtual void restoreXml(const Element *el, const AddrSpaceManager *manage)=0
Restore all comments from XML.
Database::restoreXmlScope
void restoreXmlScope(const Element *el, Scope *new_scope)
Register and fill out a single Scope from XML.
Definition: database.cc:3129
AddrSpaceManager
A manager for different address spaces.
Definition: translate.hh:218
Symbol::catindex
uint2 catindex
Index within category.
Definition: database.hh:167
ParamEntry::addressbase
uintb addressbase
Starting offset of the range.
Definition: fspec.hh:67
ProtoModel::extrapop_unknown
@ extrapop_unknown
Reserved extrapop value meaning the function's extrapop is unknown.
Definition: fspec.hh:636
AddrSpaceManager::getDefaultSize
int4 getDefaultSize(void) const
Get size of addresses for the default space.
Definition: translate.hh:433
RuleTransformCpool::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3555
JumpAssisted::sizeIndices
int4 sizeIndices
Total number of indices in the table (not including the defaultaddress)
Definition: jumptable.hh:475
ActionInputPrototype
Calculate the prototype for the function.
Definition: coreaction.hh:852
Funcdata::beginLoc
VarnodeLocSet::const_iterator beginLoc(const Address &addr) const
Start of Varnodes at a storage address.
Definition: funcdata.hh:310
ActionDeindirect::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:201
FuncCallSpecs::resolveSpacebaseRelative
void resolveSpacebaseRelative(Funcdata &data, Varnode *phvn)
Calculate the stack offset of this call site.
Definition: fspec.cc:3941
FlowInfo::checkEZModel
bool checkEZModel(void) const
Check if this flow matches the EX in-lining model.
Definition: flow.cc:1138
ArchitectureGhidra::postSpecFile
virtual void postSpecFile(void)
Let components initialize after Translate is built.
Definition: ghidra_arch.cc:273
inject_ghidra.hh
P-code injection classes using a Ghidra client as the back-end for generating p-code.
PrintC::opIntLess
virtual void opIntLess(const PcodeOp *op)
Emit a INT_LESS operator.
Definition: printc.hh:238
FuncCallSpecs::getInputBytesConsumed
int4 getInputBytesConsumed(int4 slot) const
Get the estimated number of bytes within the given parameter that are consumed.
Definition: fspec.cc:4885
Symbol::saveXml
virtual void saveXml(ostream &s) const
Save this Symbol to an XML stream.
Definition: database.cc:488
XmlArchitectureCapability
Extension for building an XML format capable Architecture.
Definition: xml_arch.hh:22
FlowInfo::inlineEZClone
void inlineEZClone(const FlowInfo &inlineflow, const Address &calladdr)
Clone the given in-line flow into this flow using the EZ model.
Definition: flow.cc:1081
CollapseStructure::updateLoopBody
bool updateLoopBody(void)
Find likely unstructured edges within the innermost loop body.
Definition: blockaction.cc:1186
xml_parse
int4 xml_parse(istream &i, ContentHandler *hand, int4 dbg=0)
Start-up the XML parser given a stream and a handler.
ValueSetRead::setPcodeOp
void setPcodeOp(PcodeOp *o, int4 slt)
Establish read this value set corresponds to.
Definition: rangeutil.cc:1767
ActionGroup::~ActionGroup
virtual ~ActionGroup(void)
Destructor.
Definition: action.cc:356
ArchitectureGhidra::setSendCCode
void setSendCCode(bool val)
Toggle whether the recovered source code is emitted as part of the main decompile action.
Definition: ghidra_arch.hh:114
ProtoStoreSymbol::restricted_usepoint
Address restricted_usepoint
A usepoint reference for storage locations (usually function entry -1)
Definition: fspec.hh:1082
EmitNoXml::tagLine
virtual void tagLine(int4 indent)
Force a line break and indent level.
Definition: prettyprint.hh:229
FlowInfo::data
Funcdata & data
The function being flow-followed.
Definition: flow.hh:80
EmitPrettyPrint::print
void print(const TokenSplit &tok)
Output the given token to the low-level emitter.
Definition: prettyprint.cc:602
Cover::rebuild
void rebuild(const Varnode *vn)
Reset this based on def-use of a single Varnode.
Definition: cover.cc:427
StackEqn::var1
int4 var1
Variable with 1 coefficient.
Definition: coreaction.cc:23
VarnodeBank::replace
void replace(Varnode *oldvn, Varnode *newvn)
Replace every read of one Varnode with another.
Definition: varnode.cc:956
PrintC::commsorter
CommentSorter commsorter
Container/organizer for comments in the current function.
Definition: printc.hh:122
circularqueue::max
int4 max
Size of the array.
Definition: prettyprint.hh:609
FlowInfo::baddata_present
@ baddata_present
Indicate we have encountered flow into unaccessible data.
Definition: flow.hh:65
TypePointer::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:387
SubvariableFlow::replaceInput
void replaceInput(ReplaceVarnode *rvn)
Replace an input Varnode in the subgraph with a temporary register.
Definition: subflow.cc:1154
PrintC::remequal
static OpToken remequal
The in-place modulo operator.
Definition: printc.hh:102
EmitXml::tagOp
virtual void tagOp(const char *ptr, syntax_highlight hl, const PcodeOp *op)
Emit an operation token.
Definition: prettyprint.cc:177
Scope::children
ScopeMap children
Sorted list of child scopes.
Definition: database.hh:418
OpBehaviorFloatLess::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:365
TypeOp::recoverInputBinary
uintb recoverInputBinary(int4 slot, int4 sizeout, uintb out, int4 sizein, uintb in) const
Reverse the binary op-code operation, recovering a constant input value.
Definition: typeop.hh:91
FlowBlock::flipInPlaceTest
virtual int4 flipInPlaceTest(vector< PcodeOp * > &fliplist) const
Test normalizing the conditional branch in this.
Definition: block.hh:743
Scope::stackContainer
static const Scope * stackContainer(const Scope *scope1, const Scope *scope2, const Address &addr, int4 size, const Address &usepoint, SymbolEntry **addrmatch)
Definition: database.cc:875
HighVariable::getTypeRepresentative
Varnode * getTypeRepresentative(void) const
Get a member Varnode with the strongest data-type.
Definition: variable.cc:122
TokenSplit::endBlock
void endBlock(int4 id)
Create an "end control-flow element" command.
Definition: prettyprint.hh:383
JumpBasicOverride::istrivial
bool istrivial
true if we use a trivial value model
Definition: jumptable.hh:432
CapabilityPoint::initializeAll
static void initializeAll(void)
Finish initialization for all extension points.
Definition: capability.cc:38
PcodeInjectLibrary::~PcodeInjectLibrary
virtual ~PcodeInjectLibrary(void)
Destructor.
Definition: pcodeinject.cc:175
ArchitectureGhidra::readToResponse
static void readToResponse(istream &s)
Read the query response protocol marker.
Definition: ghidra_arch.cc:178
EquateSymbol::saveXml
virtual void saveXml(ostream &s) const
Save this Symbol to an XML stream.
Definition: database.cc:638
PrintC::binary_plus
static OpToken binary_plus
The binary addition operator.
Definition: printc.hh:81
OpBehaviorFloatDiv
CPUI_FLOAT_DIV behavior.
Definition: opbehavior.hh:396
XmlArchitecture::saveXml
virtual void saveXml(ostream &s) const
Definition: xml_arch.cc:94
TokenSplit::beginStatement
int4 beginStatement(const PcodeOp *o)
Create a "begin source code statement" command.
Definition: prettyprint.hh:416
JumpBasic::selectguards
vector< GuardRecord > selectguards
Any guards associated with model.
Definition: jumptable.hh:348
Heritage::callOpIndirectEffect
bool callOpIndirectEffect(const Address &addr, int4 size, PcodeOp *op) const
Determine if the address range is affected by the given call p-code op.
Definition: heritage.cc:203
Varnode::valueSet
ValueSet * valueSet
Value set associated with this when performing Value Set Analysis.
Definition: varnode.hh:141
CommentDatabaseInternal::commentset
CommentSet commentset
The sorted set of Comment objects.
Definition: comment.hh:155
JumpTable::recoverystage
int4 recoverystage
0=no stages recovered, 1=additional stage needed, 2=complete
Definition: jumptable.hh:524
CommentSorter::setupOpList
void setupOpList(const PcodeOp *op)
Establish a p-code landmark within the current set of comments.
Definition: comment.cc:359
universal_action
void universal_action(Architecture *conf)
The generic decompilation action.
Definition: coreaction.cc:4769
ParamList::clone
virtual ParamList * clone(void) const =0
Clone this parameter list model.
ArchitectureGhidra::readXMLStream
static Document * readXMLStream(istream &s)
Receive an XML document from the client.
Definition: ghidra_arch.cc:116
AncestorRealistic::pop_success
@ pop_success
Backtracking, from path that contained a reasonable ancestor.
Definition: funcdata.hh:599
PrintLanguage::opIntDiv
virtual void opIntDiv(const PcodeOp *op)=0
Emit a INT_DIV operator.
ActionParamDouble::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:1510
ActionGroup::addAction
void addAction(Action *ac)
Add an Action to the group.
Definition: action.cc:368
ParamEntry::smallsize_floatext
@ smallsize_floatext
Assume values smaller than max size are floating-point extended to full size.
Definition: fspec.hh:57
MemoryBank::getChunk
void getChunk(uintb offset, int4 size, uint1 *res) const
Retrieve an arbitrary sequence of bytes.
Definition: memstate.cc:333
Translate::getAlignment
int4 getAlignment(void) const
Get the instruction alignment for the processor.
Definition: translate.hh:581
Architecture::evalfp_called
ProtoModel * evalfp_called
Function proto to use when evaluating called functions.
Definition: architecture.hh:141
CircleRange::printRaw
void printRaw(ostream &s) const
Write a text representation of this to stream.
Definition: rangeutil.cc:1456
OpBehaviorIntLessEqual
CPUI_INT_LESSEQUAL behavior.
Definition: opbehavior.hh:166
PcodeInjectLibrary::registerCallFixup
void registerCallFixup(const string &fixupName, int4 injectid)
Map a call-fixup name to a payload id.
Definition: pcodeinject.cc:187
ParamListStandardOut::possibleParam
virtual bool possibleParam(const Address &loc, int4 size) const
Does the given storage location make sense as a parameter.
Definition: fspec.cc:1197
SeqNum::pc
Address pc
Program counter at start of instruction.
Definition: address.hh:112
TokenSplit::vn
const Varnode * vn
Associated Varnode.
Definition: prettyprint.hh:333
ActionConstbase
Search for input Varnodes that have been officially provided constant values.
Definition: coreaction.hh:253
FlowBlock::markLabelBumpUp
virtual void markLabelBumpUp(bool bump)
Let hierarchical blocks steal labels of their (first) components.
Definition: block.cc:247
PcodeOp::target
PcodeOp * target(void) const
Return starting op for instruction associated with this op.
Definition: op.cc:260
Heritage::remove13Refinement
void remove13Refinement(vector< int4 > &refine)
If we see 1-3 or 3-1 pieces in the partition, replace with a 4.
Definition: heritage.cc:1447
EntryMap
rangemap< SymbolEntry > EntryMap
A rangemap of SymbolEntry.
Definition: database.hh:141
BreakTableCallBack
A basic instantiation of a breakpoint table.
Definition: emulate.hh:137
HighVariable::wholecover
Cover wholecover
The ranges of code addresses covered by this HighVariable.
Definition: variable.hh:65
LoadImageGhidra::open
void open(void)
Open any descriptors.
Definition: loadimage_ghidra.cc:25
FlowInfo::dedupUnprocessed
void dedupUnprocessed(void)
Get rid of duplicates in the unprocessed list.
Definition: flow.cc:839
BlockGraph::restoreXmlBody
virtual void restoreXmlBody(List::const_iterator &iter, List::const_iterator enditer, BlockMap &resolver)
Restore details about this FlowBlock from an XML stream.
Definition: block.cc:1293
Translate::getUniqueBase
uintm getUniqueBase(void) const
Get the base offset for new temporary registers.
Definition: translate.hh:591
ScoreProtoModel::model
const ProtoModel * model
Prototype model to score against.
Definition: fspec.hh:858
JoinSpace::read
virtual uintb read(const string &s, int4 &size) const
Read in an address (and possible size) from a string.
Definition: space.cc:599
CastStrategy::localExtensionType
virtual int4 localExtensionType(const Varnode *vn) const =0
Decide on integer promotion by examining just local properties of the given Varnode.
AddTreeState::size
int4 size
Size of ptr type in question.
Definition: ruleaction.hh:34
JumpTable::maxext
uint4 maxext
Maximum extensions to normalize.
Definition: jumptable.hh:523
SubvariableFlow::PatchRecord::slot
int4 slot
slot being affected or other parameter
Definition: subflow.hh:77
SubvariableFlow::varmap
map< Varnode *, ReplaceVarnode > varmap
Map from original Varnodes to the overlaying subgraph nodes.
Definition: subflow.hh:86
OpBehaviorIntSlessEqual
CPUI_INT_SLESSEQUAL behavior.
Definition: opbehavior.hh:152
BlockCondition
Two conditional blocks combined into one conditional using BOOL_AND or BOOL_OR.
Definition: block.hh:516
RuleZextSless::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:481
ConditionalJoin::joinblock
BlockBasic * joinblock
The new joined condition block.
Definition: blockaction.hh:251
RuleTrivialShift::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3164
FuncCallSpecs::checkOutputTrialUse
void checkOutputTrialUse(Funcdata &data, vector< Varnode * > &trialvn)
Mark if output trials are being actively used.
Definition: fspec.cc:4689
Architecture::buildTypegrp
virtual void buildTypegrp(DocumentStorage &store)
Build the data-type factory/container.
Definition: architecture.cc:540
ActionPool::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: action.cc:873
JumpTable::defaultBlock
int4 defaultBlock
The out-edge corresponding to the default switch destination (-1 = undefined)
Definition: jumptable.hh:518
LaneDivide::buildLoad
bool buildLoad(PcodeOp *op, TransformVar *outVars, int4 numLanes, int4 skipLanes)
Split a given CPUI_LOAD operation into a sequence of LOADs of individual lanes.
Definition: subflow.cc:2211
FlowInfo::clearProperties
void clearProperties(void)
Clear any discovered flow properties.
Definition: flow.cc:76
Heritage::analyzeNewLoadGuards
void analyzeNewLoadGuards(void)
Make final determination of what range new LoadGuards are protecting.
Definition: heritage.cc:682
ActionMergeType::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:402
PcodeOp::nonprinting
@ nonprinting
Op should not be directly printed as source.
Definition: op.hh:89
ConditionalJoin::MergePair::operator<
bool operator<(const MergePair &op2) const
Lexicographic comparator.
Definition: blockaction.cc:1878
SleighArchitecture::SleighArchitecture
SleighArchitecture(const string &fname, const string &targ, ostream *estream)
Construct given executable file.
Definition: sleigh_arch.cc:288
ActionMarkImplied
Mark all the implied Varnode objects, which will have no explicit token in the output.
Definition: coreaction.hh:437
SleighBase::saveXml
void saveXml(ostream &s) const
Write out the SLEIGH specification as an XML <sleigh> tag.
Definition: sleighbase.cc:143
ActionPreferComplement
Attempt to normalize symmetric block structures.
Definition: blockaction.hh:285
TypeOpCall::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:564
JumpTable::IndexPair::compareByPosition
static bool compareByPosition(const IndexPair &op1, const IndexPair &op2)
Compare just by position.
Definition: jumptable.hh:582
RuleHumptyOr::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:897
RuleDoubleLoad::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: double.hh:306
BlockMap::resolveBlock
FlowBlock * resolveBlock(FlowBlock::block_type bt)
Construct a FlowBlock of the given type.
Definition: block.cc:3192
MemoryImage::find
virtual uintb find(uintb addr) const
Overridden find method.
Definition: memstate.cc:363
PcodeOp::indirect_source
@ indirect_source
Op is source of (one or more) CPUI_INDIRECTs.
Definition: op.hh:79
Architecture::addOtherSpace
void addOtherSpace(void)
Add OTHER space and all of its overlays to the symboltab.
Definition: architecture.cc:813
PrintC::opFloatAbs
virtual void opFloatAbs(const PcodeOp *op)
Emit a FLOAT_ABS operator.
Definition: printc.hh:274
FunctionSymbol::getFunction
Funcdata * getFunction(void)
Get the underlying Funcdata object.
Definition: database.cc:562
CollapseStructure::collapseConditions
void collapseConditions(void)
Simplify conditionals.
Definition: blockaction.cc:1834
FuncProto::restoreXml
void restoreXml(const Element *el, Architecture *glb)
Restore this from an XML stream.
Definition: fspec.cc:3741
Heritage::floatExtensionRead
void floatExtensionRead(Varnode *vn, JoinRecord *joinrec)
Create float truncation into a free lower precision join-space Varnode.
Definition: heritage.cc:1792
Override::saveXml
void saveXml(ostream &s, Architecture *glb) const
Write the override commands to an XML stream.
Definition: override.cc:284
ActionMergeRequired::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:357
Heritage::guardCalls
void guardCalls(uint4 flags, const Address &addr, int4 size, vector< Varnode * > &write)
Guard CALL/CALLIND ops in preparation for renaming algorithm.
Definition: heritage.cc:1082
RulePtrArith::spanAddTree
static bool spanAddTree(PcodeOp *op, AddTreeState *state)
Traverse the additive expression accumulating offset information.
Definition: ruleaction.cc:5724
PrintC::boolean_and
static OpToken boolean_and
The boolean and operator.
Definition: printc.hh:94
TypeStruct::field
vector< TypeField > field
The list of fields.
Definition: type.hh:304
JumpAssisted::getTableSize
virtual int4 getTableSize(void) const
Return the number of entries in the address table.
Definition: jumptable.hh:481
MemoryBank::deconstructValue
static void deconstructValue(uint1 *ptr, uintb val, int4 size, bool bigendian)
Encode value to bytes.
Definition: memstate.cc:51
AddrSpace::getDelay
int4 getDelay(void) const
Get number of heritage passes being delayed.
Definition: space.hh:300
Cover::cover
map< int4, CoverBlock > cover
block index -> CoverBlock
Definition: cover.hh:69
Architecture::loader
LoadImage * loader
Method for loading portions of binary.
Definition: architecture.hh:144
PrintJava::opCallind
virtual void opCallind(const PcodeOp *op)
Emit a CALLIND operator.
Definition: printjava.cc:227
Symbol::merge_problems
@ merge_problems
Set if some SymbolEntrys did not get merged.
Definition: database.hh:184
PcodeOpBank::beginAll
PcodeOpTree::const_iterator beginAll(void) const
Start of all PcodeOps in sequence number order.
Definition: op.hh:279
TypeOpIntRight::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:1160
Architecture::max_basetype_size
int4 max_basetype_size
Maximum size of an "integer" type before creating an array type.
Definition: architecture.hh:125
RulePtrsubUndo::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6166
RulePullsubMulti
Pull SUBPIECE back through MULTIEQUAL.
Definition: ruleaction.hh:222
PrintJava::printUnicode
virtual void printUnicode(ostream &s, int4 onechar) const
Print a single unicode character as a character constant for the high-level language.
Definition: printjava.cc:152
PrintC::opHiddenFunc
void opHiddenFunc(const PcodeOp *op)
Push the given p-code op as a hidden token.
Definition: printc.cc:332
Heritage::pass
int4 pass
Current pass being executed.
Definition: heritage.hh:209
Varnode::addDescend
void addDescend(PcodeOp *op)
Add a descendant (reading) PcodeOp to this Varnode's list.
Definition: varnode.cc:303
Funcdata::spacebaseConstant
void spacebaseConstant(PcodeOp *op, int4 slot, SymbolEntry *entry, const Address &rampoint, uintb origval, int4 origsize)
Convert a constant pointer into a ram CPUI_PTRSUB.
Definition: funcdata.cc:291
Funcdata::newConstant
Varnode * newConstant(int4 s, uintb constant_val)
Create a new constant Varnode.
Definition: funcdata_varnode.cc:64
RangeHint::preferred
bool preferred(const RangeHint *b, bool reconcile) const
Return true if the this range's data-type is preferred over the other given range.
Definition: varmap.cc:73
SleighBase::addRegister
virtual void addRegister(const string &nm, AddrSpace *base, uintb offset, int4 size)
Add a named register to the model for this processor.
Definition: sleighbase.cc:85
RuleZextShiftZext::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4466
TypeOpIntXor::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1085
TypeOpFunc
A generic functional operator.
Definition: typeop.hh:189
PcodeOpBank::uniqid
uintm uniqid
Counter for producing unique id's for each op.
Definition: op.hh:253
ScopeGhidra::findByName
virtual void findByName(const string &name, vector< Symbol * > &res) const
Find a Symbol by name within this Scope.
Definition: database_ghidra.hh:91
Emulate::executeIndirect
virtual void executeIndirect(void)=0
Standard behavior for an INDIRECT op.
PcodeOp::booloutput
@ booloutput
Boolean operation.
Definition: op.hh:76
Varnode::addrforce
@ addrforce
Varnode is used to force variable into an address.
Definition: varnode.hh:97
FuncProto
A function prototype.
Definition: fspec.hh:1147
ConstantPoolInternal
An implementation of the ConstantPool interface storing records internally in RAM.
Definition: cpool.hh:155
ValueSet::Equation::typeCode
int4 typeCode
The constraint characteristic 0=absolute 1=relative to a spacebase register.
Definition: rangeutil.hh:122
CommentSorter::opstop
map< Subsort, Comment * >::const_iterator opstop
Statement landmark within current set of comments.
Definition: comment.hh:234
JumptableNotReachableError
Exception thrown is there are no legal flows to a switch.
Definition: jumptable.hh:33
FlowInfo::fillinBranchStubs
void fillinBranchStubs(void)
Fill-in artificial HALT p-code for unprocessed addresses.
Definition: flow.cc:862
BlockBasic::flipInPlaceExecute
virtual void flipInPlaceExecute(void)
Perform the flip to normalize conditional branch executed by this block.
Definition: block.cc:2264
Funcdata::qlst
vector< FuncCallSpecs * > qlst
List of calls this function makes.
Definition: funcdata.hh:73
RulePiecePathology::tracePathologyForward
static int4 tracePathologyForward(PcodeOp *op, Funcdata &data)
Given a known pathological concatenation, trace it forward to CALLs and RETURNs.
Definition: ruleaction.cc:8755
FuncProto::getBiggestContainedInputParam
bool getBiggestContainedInputParam(const Address &loc, int4 size, VarnodeData &res) const
Pass-back the biggest potential input parameter contained within the given range.
Definition: fspec.cc:3534
FlowInfo::unimplemented_present
@ unimplemented_present
Indicate we have encountered unimplemented instructions.
Definition: flow.hh:64
ScopeInternal::clearUnlocked
virtual void clearUnlocked(void)
Clear all unlocked symbols from this scope.
Definition: database.cc:1923
Emulate::executeStore
virtual void executeStore(void)=0
Standard behavior for a p-code STORE.
RulePtrFlow::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7506
SleighArchitecture::buildTranslator
virtual Translate * buildTranslator(DocumentStorage &store)
Build the Translator object.
Definition: sleigh_arch.cc:148
TokenSplit::closeGroup
void closeGroup(int4 id)
Create an "end a printing group" command.
Definition: prettyprint.hh:541
EmulateMemory::executeLoad
virtual void executeLoad(void)
Standard behavior for a p-code LOAD.
Definition: emulate.cc:235
PrintC::emitInplaceOp
bool emitInplaceOp(const PcodeOp *op)
Attempt to emit an expression rooted at an in-place operator.
Definition: printc.cc:2027
RuleOrPredicate
Simplify predication constructions involving the INT_OR operator.
Definition: condexe.hh:211
AddrSpace::other_space_index
@ other_space_index
Reserved index for the other space.
Definition: space.hh:91
ExecutablePcode::evaluate
uintb evaluate(const vector< uintb > &input)
Evaluate the snippet on the given inputs.
Definition: pcodeinject.cc:159
BlockGraph::newBlockIfElse
BlockIf * newBlockIfElse(FlowBlock *cond, FlowBlock *tc, FlowBlock *fc)
Build a new BlockIfElse.
Definition: block.cc:1733
TreeHandler::error
string error
The last error condition returned by the parser (if not empty)
Definition: xml.hh:220
LoadImageGhidra::close
void close(void)
Close any descriptor.
Definition: loadimage_ghidra.cc:30
JumpModel::recoverModel
virtual bool recoverModel(Funcdata *fd, PcodeOp *indop, uint4 matchsize, uint4 maxtablesize)=0
Attempt to recover details of the model, given a specific BRANCHIND.
FlowInfo::eaddr
Address eaddr
End of range in which we are allowed to flow.
Definition: flow.hh:95
FuncCallSpecs::findPreexistingWhole
static Varnode * findPreexistingWhole(Varnode *vn1, Varnode *vn2)
Check if given two Varnodes are merged into a whole.
Definition: fspec.cc:4772
ActionStackPtrFlow::isStackRelative
static bool isStackRelative(Varnode *spcbasein, Varnode *vn, uintb &constval)
Is the given Varnode defined as a pointer relative to the stack-pointer?
Definition: coreaction.cc:326
Varnode::unsignedprint
@ unsignedprint
Constant that must be explicitly printed as unsigned.
Definition: varnode.hh:118
Funcdata::removeBranch
void removeBranch(BlockBasic *bb, int4 num)
Remove the indicated branch from a basic block.
Definition: funcdata_block.cc:215
TypeOpFloatNotEqual
Information about the FLOAT_NOTEQUAL op-code.
Definition: typeop.hh:552
FuncProto::setModelLock
void setModelLock(bool val)
Toggle the lock on the prototype model for this.
Definition: fspec.hh:1208
ActionConstantPtr::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:190
SleighArchitecture::saveXmlHeader
void saveXmlHeader(ostream &s) const
Write out (as XML) basic attributes of the active executable.
Definition: sleigh_arch.cc:314
PrintLanguage::isCharacterConstant
virtual bool isCharacterConstant(const uint1 *buf, int4 size, int4 charsize) const =0
Decide is the given byte array looks like a character string.
TreeHandler::processingInstruction
virtual void processingInstruction(const string &target, const string &data)
Callback for a formal processing instruction seen in the current document.
Definition: xml.hh:235
ScopeInternal::isNameUsed
virtual bool isNameUsed(const string &name) const
Check if the given name is used within this scope.
Definition: database.cc:2280
Architecture::cpool
ConstantPool * cpool
Deferred constant values.
Definition: architecture.hh:148
TypeOpIntSdiv
Information about the INT_SDIV op-code.
Definition: typeop.hh:493
RuleMultNegOne::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:6211
RecovError::RecovError
RecovError(const string &s)
Initialize the error with an explanatory string.
Definition: error.hh:57
EmulatePcodeCache::isInstructionStart
bool isInstructionStart(void) const
Return true if we are at an instruction start.
Definition: emulate.hh:330
TypeOpFunc::metain
type_metatype metain
The metatype of the inputs.
Definition: typeop.hh:191
LoadGuard::finalizeRange
void finalizeRange(const ValueSetRead &valueSet)
Convert value set analysis to final guard range.
Definition: heritage.cc:635
PrintLanguage::Atom::vn
const Varnode * vn
A Varnode associated with the token.
Definition: printlanguage.hh:200
ProtoStoreSymbol::getOutput
virtual ProtoParameter * getOutput(void)
Get the return-value description.
Definition: fspec.cc:2564
SubvariableFlow::fd
Funcdata * fd
Containing function.
Definition: subflow.hh:85
ActionDatabase::currentactname
string currentactname
The name associated with the current root Action.
Definition: action.hh:296
TypeOpPiece::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:1549
RuleLessEqual::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2236
PrintC::hidden
static OpToken hidden
Hidden functional (that may force parentheses)
Definition: printc.hh:65
JumpBasicOverride::clone
virtual JumpModel * clone(JumpTable *jt) const
Clone this model.
Definition: jumptable.cc:1879
PrintC::opPopcountOp
virtual void opPopcountOp(const PcodeOp *op)
Emit a POPCOUNT operator.
Definition: printc.hh:294
VarnodeBank::findInput
Varnode * findInput(int4 s, const Address &loc) const
Find an input Varnode.
Definition: varnode.cc:1089
PrintC::opNewOp
virtual void opNewOp(const PcodeOp *op)
Emit a NEW operator.
Definition: printc.cc:937
RulePopcountBoolXor::getBooleanResult
static Varnode * getBooleanResult(Varnode *vn, int4 bitPos, int4 &constRes)
Extract boolean Varnode producing bit at given Varnode and position.
Definition: ruleaction.cc:8583
RulePtrsubCharConstant::pushConstFurther
bool pushConstFurther(Funcdata &data, TypePointer *outtype, PcodeOp *op, int4 slot, uintb val)
Try to push constant pointer further.
Definition: ruleaction.cc:6354
TypeOpBoolNegate::TypeOpBoolNegate
TypeOpBoolNegate(TypeFactory *t)
Constructor.
Definition: typeop.cc:1328
TypeOpReturn::getInputLocal
virtual Datatype * getInputLocal(const PcodeOp *op, int4 slot) const
Find the minimal (or suggested) data-type of an input to this op-code.
Definition: typeop.cc:788
TypeOpIntNegate::TypeOpIntNegate
TypeOpIntNegate(TypeFactory *t)
Constructor.
Definition: typeop.cc:1063
TypeOpCallother::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:683
PrintLanguage::opCallother
virtual void opCallother(const PcodeOp *op)=0
Emit a CALLOTHER operator.
TypeOpIntAdd
Information about the INT_ADD op-code.
Definition: typeop.hh:367
ParamEntry::type
type_metatype type
Data-type class that this entry must match.
Definition: fspec.hh:63
ConditionalJoin::MergePair::side2
Varnode * side2
Varnode coming from block2.
Definition: blockaction.hh:236
ScopeInternal::findFirstByName
SymbolNameTree::const_iterator findFirstByName(const string &name) const
Find an iterator pointing to the first Symbol in the ordering with a given name.
Definition: database.cc:2592
CastStrategy::tlst
TypeFactory * tlst
Type factory associated with the Architecture.
Definition: cast.hh:54
OpBehaviorIntScarry
CPUI_INT_SCARRY behavior.
Definition: opbehavior.hh:212
EmulateMemory::executeCallind
virtual void executeCallind(void)
Standard behavior for a CALLIND.
Definition: emulate.cc:283
StackSolver::missedvariables
int4 missedvariables
Number of variables for which we are missing an equation.
Definition: coreaction.cc:37
PrintJava::needZeroArray
static bool needZeroArray(const Varnode *vn)
Do we need '[0]' syntax.
Definition: printjava.cc:139
FlowInfo::xrefInlinedBranch
void xrefInlinedBranch(PcodeOp *op)
Check for control-flow in a new injected p-code op.
Definition: flow.cc:1026
Address::m_maximal
@ m_maximal
Biggest possible address.
Definition: address.hh:54
RuleTrivialBool::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2424
EmitPrettyPrint::openGroup
virtual int4 openGroup(void)
Start a group of things that are printed together.
Definition: prettyprint.cc:1092
Comment::text
string text
The body of the comment.
Definition: comment.hh:43
RangeList::removeRange
void removeRange(AddrSpace *spc, uintb first, uintb last)
Remove a range of addresses.
Definition: address.cc:351
PcodeData
Definition: sleigh.hh:28
ParamEntry::force_left_justify
@ force_left_justify
Big endian values are left justified within their slot.
Definition: fspec.hh:51
AliasChecker
A light-weight class for analyzing pointers and aliasing on the stack.
Definition: varmap.hh:108
Funcdata::opUnsetInput
void opUnsetInput(PcodeOp *op, int4 slot)
Clear an input operand slot for the given PcodeOp.
Definition: funcdata_op.cc:90
AddrSpaceManager::setDeadcodeDelay
void setDeadcodeDelay(AddrSpace *spc, int4 delaydelta)
Set the deadcodedelay for a specific space.
Definition: translate.cc:701
OptionIndentIncrement::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:434
OpBehaviorIntAdd::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:274
Funcdata::newVarnodeIop
Varnode * newVarnodeIop(PcodeOp *op)
Create a PcodeOp annotation Varnode.
Definition: funcdata_varnode.cc:165
Funcdata::processing_complete
@ processing_complete
Set if processing completed.
Definition: funcdata.hh:51
TraceDAG::selectBadEdge
BlockTrace * selectBadEdge(void)
Select the the most likely unstructured edge from active BlockTraces.
Definition: blockaction.cc:723
Emulate::executeCall
virtual void executeCall(void)=0
Standard behavior for a p-code CALL.
ScopeMap
map< ScopeKey, Scope * > ScopeMap
A map from ScopeKey to Scope.
Definition: database.hh:390
TypeOpIntCarry::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:1011
RuleShiftSub::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4779
TraceDAG::BranchPoint::parent
BranchPoint * parent
The parent BranchPoint along which this is only one path.
Definition: blockaction.hh:101
Varnode::indirectonly
@ indirectonly
If all uses of illegalinput varnode are inputs to INDIRECT.
Definition: varnode.hh:95
TypeOpFloatLess
Information about the FLOAT_LESS op-code.
Definition: typeop.hh:559
JumpValuesRangeDefault::lastvalue
bool lastvalue
true is the extra value has been visited by the iterator
Definition: jumptable.hh:207
ArchitectureGhidra::getRegisterName
string getRegisterName(const VarnodeData &vndata)
Retrieve a register name given its storage location.
Definition: ghidra_arch.cc:389
ActionMergeMultiEntry::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:391
PrintC::opFloatMult
virtual void opFloatMult(const PcodeOp *op)
Emit a FLOAT_MULT operator.
Definition: printc.hh:271
CastStrategyC::arithmeticOutputStandard
virtual Datatype * arithmeticOutputStandard(const PcodeOp *op)
What is the output data-type produced by the given integer arithmetic operation.
Definition: cast.cc:289
TransformVar::byteSize
int4 byteSize
Size of the lane Varnode in bytes.
Definition: transform.hh:49
PrintJava::PrintJava
PrintJava(Architecture *g, const string &nm="java-language")
Constructor.
Definition: printjava.cc:37
LoadGuard::establishRange
void establishRange(const ValueSetRead &valueSet)
Convert partial value set analysis into guard range.
Definition: heritage.cc:588
Architecture::loadersymbols_parsed
bool loadersymbols_parsed
True if loader symbols have been read.
Definition: architecture.hh:157
PrintC::emitBlockCondition
virtual void emitBlockCondition(const BlockCondition *bl)
Emit a conditional statement.
Definition: printc.cc:2449
ConditionMarker::opstate
PcodeOp * opstate[2]
p-code operations along the critical path
Definition: condexe.hh:43
CompilerTag
Contents of a <compiler> tag in a .ldefs file.
Definition: sleigh_arch.hh:29
RuleEmbed::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:907
CommentDatabaseInternal
An in-memory implementation of the CommentDatabase API.
Definition: comment.hh:154
Funcdata::setDeadCodeDelay
void setDeadCodeDelay(AddrSpace *spc, int4 delay)
Set a delay before removing dead code for a specific address space.
Definition: funcdata.hh:219
BlockGraph::selfIdentify
void selfIdentify(void)
Inherit our edges from the edges of our components.
Definition: block.cc:820
FlushNative::res
int4 res
Success status returned to the client (0=success)
Definition: ghidra_process.hh:138
Merge::trimOpOutput
void trimOpOutput(PcodeOp *op)
Trim the output HighVariable of the given PcodeOp so that its Cover is tiny.
Definition: merge.cc:552
ArchitectureGhidra::readPackedAll
static uint1 * readPackedAll(istream &s)
Read a whole response as packed p-code op information.
Definition: ghidra_arch.cc:222
FlowBlock::f_loop_exit_edge
@ f_loop_exit_edge
Edge exits the body of a loop.
Definition: block.hh:104
EmitNoXml::endDocument
virtual void endDocument(int4 id)
End a whole document of output.
Definition: prettyprint.hh:224
SymbolEntry::EntryInitData::symbol
Symbol * symbol
The symbol being mapped.
Definition: database.hh:70
ParamListStandard::getBiggestContainedParam
virtual bool getBiggestContainedParam(const Address &loc, int4 size, VarnodeData &res) const
Pass-back the biggest parameter contained within the given range.
Definition: fspec.cc:947
RuleHumptyDumpty::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:877
PrintLanguage::name
string name
The name of the high-level language.
Definition: printlanguage.hh:231
SymbolEntry::saveXml
void saveXml(ostream &s) const
Save this to an XML stream.
Definition: database.cc:176
Heritage::globaldisjoint
LocationMap globaldisjoint
Disjoint cover of every heritaged memory location.
Definition: heritage.hh:202
TypeOpStore::TypeOpStore
TypeOpStore(TypeFactory *t)
Constructor.
Definition: typeop.cc:423
OpToken::presurround
@ presurround
Modifier form (like a cast operation)
Definition: printlanguage.hh:88
SpacebaseSpace::contain
AddrSpace * contain
Containing space.
Definition: translate.hh:172
TypeOpIntOr::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1113
Action::rule_warnings_on
@ rule_warnings_on
If this action makes a change, issue a warning.
Definition: action.hh:58
ContextInternal::saveXml
virtual void saveXml(ostream &s) const
Serialize the entire database to an XML stream.
Definition: globalcontext.cc:490
Scope::retypeSymbol
virtual void retypeSymbol(Symbol *sym, Datatype *ct)=0
Change the data-type of a Symbol within this Scope.
ParamTrial::splitHi
ParamTrial splitHi(int4 sz) const
Create a trial representing the first part of this.
Definition: fspec.cc:1307
ParamList
Definition: fspec.hh:339
JumpModel::clone
virtual JumpModel * clone(JumpTable *jt) const =0
Clone this model.
leastsigbit_set
int4 leastsigbit_set(uintb val)
Return index of least significant bit set in given value.
Definition: address.cc:684
VarnodeBank::createDef
Varnode * createDef(int4 s, const Address &m, Datatype *ct, PcodeOp *op)
Create a Varnode as the output of a PcodeOp.
Definition: varnode.cc:1035
AddTreeState::multsum
uintb multsum
Sum of multiple constants.
Definition: ruleaction.hh:38
Funcdata::newSpacebasePtr
Varnode * newSpacebasePtr(AddrSpace *id)
Construct a new spacebase register for a given address space.
Definition: funcdata.cc:247
FlowBlock::f_back_edge
@ f_back_edge
Within (reducible) graph, a back edge defining a loop.
Definition: block.hh:103
CircleRange::right
uintb right
Right boundary of the open range [left,right)
Definition: rangeutil.hh:50
JumpBasicOverride::trialNorm
int4 trialNorm(Funcdata *fd, Varnode *trialvn, uint4 tolerance)
Test a given Varnode as a potential normalized switch variable.
Definition: jumptable.cc:1695
PrintC::opFloatFloat2Float
virtual void opFloatFloat2Float(const PcodeOp *op)
Emit a FLOAT_FLOAT2FLOAT operator.
Definition: printc.hh:277
OpToken
A token representing an operator in the high-level language.
Definition: printlanguage.hh:81
RuleLeftRight::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:2010
EmitXml::getIndentIncrement
int4 getIndentIncrement(void) const
Get the number of characters indented per level of nesting.
Definition: prettyprint.hh:207
Heritage::StackNode::StackNode
StackNode(Varnode *v, uintb o, uint4 trav)
Constructor.
Definition: heritage.hh:193
EmulateMemory::getMemoryState
MemoryState * getMemoryState(void) const
Get the emulator's memory state.
Definition: emulate.hh:269
ActionRestructureVarnode::reset
virtual void reset(Funcdata &data)
Reset the Action for a new function.
Definition: coreaction.hh:816
Architecture::restoreFromSpec
void restoreFromSpec(DocumentStorage &store)
Fully initialize the Translate object.
Definition: architecture.cc:610
Architecture::symboltab
Database * symboltab
Memory map of global variables and functions.
Definition: architecture.hh:135
JumpBasic::clone
virtual JumpModel * clone(JumpTable *jt) const
Clone this model.
Definition: jumptable.cc:1485
PcodeOp::badinstruction
@ badinstruction
placeholder for bad instruction data
Definition: op.hh:91
type_metatype
type_metatype
Definition: type.hh:33
RuleDivOpt
Convert INT_MULT and shift forms into INT_DIV or INT_SDIV.
Definition: ruleaction.hh:1162
SpacebaseSpace::stackGrowsNegative
virtual bool stackGrowsNegative(void) const
Return true if a stack in this space grows negative.
Definition: translate.hh:184
VariableStack
map< Address, vector< Varnode * > > VariableStack
Definition: heritage.hh:27
Funcdata::numHeritagePasses
int4 numHeritagePasses(AddrSpace *spc)
Get the number of heritage passes performed for the given address space.
Definition: funcdata.hh:208
Architecture::printlist
vector< PrintLanguage * > printlist
List of high-level language printers supported.
Definition: architecture.hh:150
GhidraTranslate::cacheRegister
const VarnodeData & cacheRegister(const string &nm, const VarnodeData &data) const
Associate a Varnode with a register name.
Definition: ghidra_translate.cc:24
Funcdata::ancestorOpUse
bool ancestorOpUse(int4 maxlevel, const Varnode *invn, const PcodeOp *op, ParamTrial &trial) const
Test if the given trial Varnode is likely only used for parameter passing.
Definition: funcdata_varnode.cc:1484
ConditionalJoin::b_in1
int4 b_in1
In edge of exitb coming from block1.
Definition: blockaction.hh:247
TypeOpFloatMult::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:597
ActionRedundBranch
Get rid of redundant branches: duplicate edges between the same input and output block.
Definition: coreaction.hh:501
RuleRangeMeld::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:301
EmitNoXml::endStatement
virtual void endStatement(int4 id)
End a source code statement.
Definition: prettyprint.hh:236
HighVariable::type
Datatype * type
The data-type for this.
Definition: variable.hh:63
Funcdata::mapGlobals
void mapGlobals(void)
Make sure there is a Symbol entry for all global Varnodes.
Definition: funcdata_varnode.cc:1302
PcodeOpBank::clear
void clear(void)
Clear all PcodeOps from this container.
Definition: op.cc:925
ParamListStandard::assignMap
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.cc:534
CastStrategy::IntPromotionCode
IntPromotionCode
Types of integer promotion.
Definition: cast.hh:46
SymbolEntry::SymbolEntry
SymbolEntry(Symbol *sym)
Construct a mapping for a Symbol without an address.
Definition: database.cc:25
EmulateMemory::executeCpoolRef
virtual void executeCpoolRef(void)
Standard behavior for a CPOOLREF (constant pool reference) op.
Definition: emulate.cc:314
ScopeInternal::clearUnlockedCategory
virtual void clearUnlockedCategory(int4 cat)
Clear unlocked symbols of the given category from this scope.
Definition: database.cc:1945
ActionInferTypes
Infer and propagate data-types.
Definition: coreaction.hh:920
AddrSpaceManager::defaultcodespace
AddrSpace * defaultcodespace
Default space where code lives, generally main RAM.
Definition: translate.hh:224
PrintC::checkArrayDeref
bool checkArrayDeref(const Varnode *vn) const
Determine whether a LOAD/STORE expression requires pointer '*' syntax.
Definition: printc.cc:268
CommentDatabaseInternal::addCommentNoDuplicate
virtual bool addCommentNoDuplicate(uint4 tp, const Address &fad, const Address &ad, const string &txt)
Add a new comment to the container, making sure there is no duplicate.
Definition: comment.cc:193
EmitPrettyPrint::endFunction
virtual void endFunction(int4 id)
End a whole declaration and body of a function.
Definition: prettyprint.cc:879
FuncCallSpecs::commitNewInputs
void commitNewInputs(Funcdata &data, vector< Varnode * > &newinput)
Update input Varnodes to this CALL to reflect the formal input parameters.
Definition: fspec.cc:4220
Varnode::dataType
Datatype * dataType
Temporary data-type associated with this for use in type propagate algorithm.
Definition: varnode.hh:140
ParamListStandard::assignAddress
Address assignAddress(const Datatype *tp, vector< int4 > &status) const
Assign storage for given parameter data-type.
Definition: fspec.cc:510
FlowInfo::maxaddr
Address maxaddr
End of actual function range.
Definition: flow.hh:97
InjectPayload::name
string name
Formal name of the payload.
Definition: pcodeinject.hh:87
CPoolRecord::flags
uint4 flags
Additional boolean properties on the record.
Definition: cpool.hh:65
TypeOpIntOr
Information about the INT_OR op-code.
Definition: typeop.hh:439
RuleSubvarSext::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1318
EmulateSnippet::fallthruOp
virtual void fallthruOp(void)
Standard p-code fall-thru semantics.
Definition: emulateutil.cc:282
ParamListStandard::checkSplit
virtual bool checkSplit(const Address &loc, int4 size, int4 splitpoint) const
Check if it makes sense to split a single storage location into two parameters.
Definition: fspec.cc:914
RulePtraddUndo
Remove PTRADD operations with mismatched data-type information.
Definition: ruleaction.hh:1028
OptionNullPrinting::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:339
InjectPayload::CALLFIXUP_TYPE
@ CALLFIXUP_TYPE
Injection that replaces a CALL.
Definition: pcodeinject.hh:81
Address::offset
uintb offset
Offset (in bytes)
Definition: address.hh:49
Comment::warning
@ warning
The comment is auto-generated to alert the user.
Definition: comment.hh:51
Symbol::type
Datatype * type
The symbol's data-type.
Definition: database.hh:160
TransformOp
Placeholder node for PcodeOp that will exist after a transform is applied to a function.
Definition: transform.hh:61
BlockMap::sortList
void sortList(void)
Sort the list of FlowBlock objects.
Definition: block.cc:3231
BlockBasic::setInitialRange
void setInitialRange(const Address &beg, const Address &end)
Set the initial address range of the block.
Definition: block.cc:2511
TypeOpBoolOr
Information about the BOOL_OR op-code.
Definition: typeop.hh:538
PrintC::pushUnnamedLocation
virtual void pushUnnamedLocation(const Address &addr, const Varnode *vn, const PcodeOp *op)
Push an address as a substitute for a Symbol onto the RPN stack.
Definition: printc.cc:1606
TypeOpPiece::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:693
PrintLanguage::pushVnLHS
void pushVnLHS(const Varnode *vn, const PcodeOp *op)
Push a variable as the left-hand side of an expression.
Definition: printlanguage.cc:241
ScopeGhidra::addMapInternal
virtual SymbolEntry * addMapInternal(Symbol *sym, uint4 exfl, const Address &addr, int4 off, int4 sz, const RangeList &uselim)
Create a new SymbolEntry for a Symbol given a memory range.
Definition: database_ghidra.hh:52
Funcdata::newVarnodeSpace
Varnode * newVarnodeSpace(AddrSpace *spc)
Create a constant Varnode referring to an address space.
Definition: funcdata_varnode.cc:179
ActionDeterminedBranch::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:515
RulePiecePathology::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:8827
Funcdata::endOpAlive
list< PcodeOp * >::const_iterator endOpAlive(void) const
End of PcodeOp objects in the alive list.
Definition: funcdata.hh:458
BlockInfLoop::emit
virtual void emit(PrintLanguage *lng) const
Emit the instructions in this FlowBlock as structured code.
Definition: block.hh:619
ScopeLocal::markUnaliased
void markUnaliased(const vector< uintb > &alias)
Mark all local symbols for which there are no aliases.
Definition: varmap.cc:1080
ScopeInternal::categorySanity
virtual void categorySanity(void)
Make sure Symbol categories are sane.
Definition: database.cc:1873
Element::attr
vector< string > attr
A list of attribute names for this element.
Definition: xml.hh:153
ArchitectureGhidra::sendsyntaxtree
bool sendsyntaxtree
True if the syntax tree should be sent with function output.
Definition: ghidra_arch.hh:68
SubvariableFlow::useSameAddress
bool useSameAddress(ReplaceVarnode *rvn)
Decide if we use the same memory range of the original Varnode for the logical replacement.
Definition: subflow.cc:1170
TypeOpCpoolref
Information about the CPOOLREF op-code.
Definition: typeop.hh:761
JumpValuesRangeDefault
A jump-table starting range with two possible execution paths.
Definition: jumptable.hh:203
FlowInfo::inline_recursion
set< Address > * inline_recursion
Active list of addresses for function that are in-lined.
Definition: flow.hh:101
BlockCondition::getSplitPoint
virtual FlowBlock * getSplitPoint(void)
Get the leaf splitting block.
Definition: block.hh:526
TraceDAG::openBranch
list< BlockTrace * >::iterator openBranch(BlockTrace *parent)
Open a new BranchPoint along a given BlockTrace.
Definition: blockaction.cc:832
RuleLessEqual2Zero
Simplify INT_LESSEQUAL applied to extremal constants.
Definition: ruleaction.hh:954
AliasChecker::AddBase::index
Varnode * index
The index value or NULL.
Definition: varmap.hh:113
TypeOpReturn::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:769
PrintC::setCommentStyle
virtual void setCommentStyle(const string &nm)
Set the way comments are displayed in decompiler output.
Definition: printc.cc:1940
Funcdata::cast_phase_index
uint4 cast_phase_index
Creation index of first Varnode created after ActionSetCasts.
Definition: funcdata.hh:65
CastStrategy::EITHER_EXTENSION
@ EITHER_EXTENSION
The value is promoted using either signed or unsigned extension.
Definition: cast.hh:51
TransformManager::getSplit
TransformVar * getSplit(Varnode *vn, const LaneDescription &description)
Find (or create) placeholder nodes splitting a Varnode into its lanes.
Definition: transform.cc:604
LoadImageXml::rootel
const Element * rootel
The root XML element.
Definition: loadimage_xml.hh:29
CoverBlock::print
void print(ostream &s) const
Dump a description to stream.
Definition: cover.cc:186
Comment::header
@ header
The comment should be displayed in the function header.
Definition: comment.hh:50
RuleHumptyDumpty
Simplify break and rejoin: concat( sub(V,c), sub(V,0) ) => V
Definition: ruleaction.hh:874
RuleSborrow::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:551
Symbol::restoreXmlHeader
void restoreXmlHeader(const Element *el)
Restore basic Symbol properties from XML.
Definition: database.cc:373
ActionStackPtrFlow::repair
static int4 repair(Funcdata &data, AddrSpace *id, Varnode *spcbasein, PcodeOp *loadop, uintb constz)
Link LOAD to matching STORE of a constant.
Definition: coreaction.cc:375
ConstantSpace::saveXml
virtual void saveXml(ostream &s) const
Definition: space.cc:378
TypeOpIndirect::TypeOpIndirect
TypeOpIndirect(TypeFactory *t)
Constructor.
Definition: typeop.cc:1507
PcodeOp::has_thisptr
@ has_thisptr
First parameter ( getIn(1) ) is a this pointer.
Definition: op.hh:103
Attributes
The attributes for a single XML element.
Definition: xml.hh:36
Varnode::explict
@ explict
This varnode CANNOT be a temporary variable.
Definition: varnode.hh:80
SleighArchitecture::normalizeSize
static string normalizeSize(const string &nm)
Try to recover a language id size field.
Definition: sleigh_arch.cc:359
Architecture::nameFunction
virtual void nameFunction(const Address &addr, string &name) const
Pick a default name for a function.
Definition: architecture.cc:462
FuncCallSpecs::stackoffset
uintb stackoffset
Relative offset of stack-pointer at time of this call.
Definition: fspec.hh:1442
Symbol
The base class for a symbol in a symbol table or scope.
Definition: database.hh:153
ActionStackPtrFlow::stackspace
AddrSpace * stackspace
Stack space associated with stack-pointer register.
Definition: coreaction.hh:83
TransformVar::def
TransformOp * def
Defining op for new Varnode.
Definition: transform.hh:52
Varnode::isExtraOut
bool isExtraOut(void) const
Is this Varnode created indirectly by a CALL operation?
Definition: varnode.hh:250
ScopeGhidra::beginDynamic
virtual list< SymbolEntry >::const_iterator beginDynamic(void) const
Beginning iterator to dynamic SymbolEntrys.
Definition: database_ghidra.hh:96
Merge::collectCovering
void collectCovering(vector< Varnode * > &vlist, HighVariable *high, PcodeOp *op)
Collect all instances of the given HighVariable whose Cover intersects a p-code op.
Definition: merge.cc:670
EmitPrettyPrint::commentmode
bool commentmode
true if in the middle of a comment
Definition: prettyprint.hh:711
RuleSubZext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:4634
Merge::checkCopyPair
bool checkCopyPair(HighVariable *high, PcodeOp *domOp, PcodeOp *subOp)
Check if the given PcodeOp COPYs are redundant.
Definition: merge.cc:1010
FloatFormat::frac_size
int4 frac_size
Number of bits in fractional part.
Definition: float.hh:44
TraceDAG::BlockTrace::top
BranchPoint * top
Parent BranchPoint for which this is a path.
Definition: blockaction.hh:127
ValueSetRead::leftIsStable
bool leftIsStable
Set to true if left boundary of range didn't change (last iteration)
Definition: rangeutil.hh:184
TypeOpBinary::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:274
HighVariable::updateType
void updateType(void) const
(Re)derive the data-type for this from the member Varnodes
Definition: variable.cc:145
ActionMergeCopy
Try to merge the input and output Varnodes of a CPUI_COPY op.
Definition: coreaction.hh:373
LaneDivide::buildUnaryOp
void buildUnaryOp(OpCode opc, PcodeOp *op, TransformVar *inVars, TransformVar *outVars, int4 numLanes)
Build unary op placeholders with the same opcode across a set of lanes.
Definition: subflow.cc:2039
TokenSplit::vard_b
@ vard_b
Start of a variable declaration.
Definition: prettyprint.hh:303
ActionDynamicMapping::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3935
Override::deadcodedelay
vector< int4 > deadcodedelay
Delay count indexed by address space.
Definition: override.hh:52
FlowBlock::saveXml
void saveXml(ostream &s) const
Write out this to an XML stream.
Definition: block.cc:2377
LoadGuard::analysisState
int4 analysisState
0=unanalyzed, 1=analyzed(partial result), 2=analyzed(full result)
Definition: heritage.hh:113
RuleShiftAnd::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:4514
TraceDAG::missedactivecount
int4 missedactivecount
Current number of active BlockTraces that can't be pushed further.
Definition: blockaction.hh:158
TypeCode::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:1054
CPoolRecord::instance_of
@ instance_of
Boolean value, token is language specific indicator, type is boolean data-type.
Definition: cpool.hh:54
VolatileReadOp::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the symbol representing this operation in decompiled code.
Definition: userop.cc:55
CommentDatabaseInternal::addComment
virtual void addComment(uint4 tp, const Address &fad, const Address &ad, const string &txt)
Add a new comment to the container.
Definition: comment.cc:175
RulePtraddUndo::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6127
SymbolCompareName
Comparator for sorting Symbol objects by name.
Definition: database.hh:309
OptionNullPrinting
Toggle whether null pointers should be printed as the string "NULL".
Definition: options.hh:123
Architecture::buildGlobalScope
virtual Scope * buildGlobalScope(void)
Build the global scope for this executable.
Definition: architecture.cc:525
JumpBasic::flowsOnlyToModel
bool flowsOnlyToModel(Varnode *vn, PcodeOp *trailOp)
Check if the given Varnode flows to anything other than this model.
Definition: jumptable.cc:1236
SubvariableFlow::doesOrSet
static int4 doesOrSet(PcodeOp *orop, uintb mask)
Return slot of constant if INT_OR op sets all bits in mask, otherwise -1.
Definition: subflow.cc:23
TermOrder::sortTerms
void sortTerms(void)
Sort the terms using additiveCompare()
Definition: coreaction.cc:4718
Architecture::addNoHighPtr
void addNoHighPtr(const Range &rng)
Add a new region where pointers do not exist.
Definition: architecture.cc:497
EmulatePcodeOp::executeStore
virtual void executeStore(void)
Standard behavior for a p-code STORE.
Definition: emulateutil.cc:76
OpBehaviorIntAnd
CPUI_INT_AND behavior.
Definition: opbehavior.hh:247
ActionConditionalConst
Propagate conditional constants.
Definition: coreaction.hh:556
RuleSubCommute::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:756
PrintLanguage::opIntLessEqual
virtual void opIntLessEqual(const PcodeOp *op)=0
Emit a INT_LESSEQUAL operator.
Override::generateDeadcodeDelayMessage
static string generateDeadcodeDelayMessage(int4 index, Architecture *glb)
Generate warning message related to a dead code delay.
Definition: override.cc:41
partmap::const_iterator
maptype::const_iterator const_iterator
A constant iterator.
Definition: partmap.hh:52
TYPE_BOOL
@ TYPE_BOOL
Boolean.
Definition: type.hh:39
ContextInternal::getTrackedSet
virtual const TrackedSet & getTrackedSet(const Address &addr) const
Get the set of tracked register values associated with the given address.
Definition: globalcontext.hh:296
Funcdata::findHigh
HighVariable * findHigh(const string &name) const
Find a high-level variable by name.
Definition: funcdata_varnode.cc:303
ProtoParameter::getAddress
virtual Address getAddress(void) const =0
Get the storage address for this parameter.
RuleBxor2NotEqual::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:318
CommentDatabaseInternal::deleteComment
virtual void deleteComment(Comment *com)
Remove the given Comment object from the container.
Definition: comment.cc:218
OptionHideExtensions::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:399
Datatype::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:99
PcodeInjectLibraryGhidra::getCachedContext
virtual InjectContext & getCachedContext(void)
Retrieve a reusable context object for this library.
Definition: inject_ghidra.hh:90
ActionStart::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:35
TransformVar::piece_temp
@ piece_temp
A temporary representing a piece of an original Varnode.
Definition: transform.hh:35
TypeOpFloatFloat2Float
Information about the FLOAT_FLOAT2FLOAT op-code.
Definition: typeop.hh:636
Heritage::visitIncr
void visitIncr(FlowBlock *qnode, FlowBlock *vnode)
The heart of the phi-node placement algorithm.
Definition: heritage.cc:1951
SymbolEntry::EntryInitData::uselimit
const RangeList & uselimit
Reference to the range of code addresses for which the storage is valid.
Definition: database.hh:73
OpBehaviorIntSright::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:419
ScoreProtoModel::mismatch
int4 mismatch
Number of trials that don't fit the prototype model at all.
Definition: fspec.hh:860
TypeOpFloatTrunc::TypeOpFloatTrunc
TypeOpFloatTrunc(TypeFactory *t, const Translate *trans)
Constructor.
Definition: typeop.cc:1454
LoadGuard::pointerBase
uintb pointerBase
Base offset of the pointer.
Definition: heritage.hh:109
CPUI_FLOAT_MULT
@ CPUI_FLOAT_MULT
Floating-point multiplication (*)
Definition: opcodes.hh:95
VarnodeCompareLocDef::operator()
bool operator()(const Varnode *a, const Varnode *b) const
Functional comparison operator.
Definition: varnode.cc:26
TypeOpFloatLess::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:562
TypeEnum::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:652
EmulatePcodeOp::executeLoad
virtual void executeLoad(void)
Standard behavior for a p-code LOAD.
Definition: emulateutil.cc:64
varnode.hh
The Varnode and VarnodeBank classes.
JumpValues
An iterator over values a switch variable can take.
Definition: jumptable.hh:156
EmitXml::var_color
@ var_color
Local variable identifiers.
Definition: prettyprint.hh:92
ToOpEdge::operator<
bool operator<(const ToOpEdge &op2) const
Compare two edges based on PcodeOp.
Definition: dynamic.cc:66
PrintLanguage::print_load_value
@ print_load_value
Hide pointer deref for load with other ops.
Definition: printlanguage.hh:143
VarnodeLocSet
set< Varnode *, VarnodeCompareLocDef > VarnodeLocSet
A set of Varnodes sorted by location (then by definition)
Definition: varnode.hh:44
TypeOpIntSext::getOperatorName
virtual string getOperatorName(const PcodeOp *op) const
Get the name of the op-code as it should be displayed in context.
Definition: typeop.cc:957
TokenSplit::countbase
static int4 countbase
Static counter for uniquely assigning begin/end pair ids.
Definition: prettyprint.hh:345
OpBehaviorBoolXor
CPUI_BOOL_XOR behavior.
Definition: opbehavior.hh:327
TraceDAG::activetrace
list< BlockTrace * > activetrace
The list of active BlockTrace objects.
Definition: blockaction.hh:159
Rule::typeflags
typeflags
Properties associated with a Rule.
Definition: action.hh:195
TypeVoid::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:374
JumpBasic::buildAddresses
virtual void buildAddresses(Funcdata *fd, PcodeOp *indop, vector< Address > &addresstable, vector< LoadTable > *loadpoints) const
Construct the explicit list of target addresses (the Address Table) from this model.
Definition: jumptable.cc:1314
LocationMap::add
iterator add(Address addr, int4 size, int4 pass, int4 &intersect)
Mark new address as heritaged.
Definition: heritage.cc:30
BlockDoWhile::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2970
ValueSetSolver
Class that determines a ValueSet for each Varnode in a data-flow system.
Definition: rangeutil.hh:272
Funcdata::splitUses
void splitUses(Varnode *vn)
Make all reads of the given Varnode unique.
Definition: funcdata_varnode.cc:1271
FuncProto::effectlist
vector< EffectRecord > effectlist
Side-effects associated with non-parameter storage locations.
Definition: fspec.hh:1168
PrintC::emitVarDecl
virtual void emitVarDecl(const Symbol *sym)
Emit a variable declaration.
Definition: printc.cc:2106
RuleIdentityEl::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:3334
TypeOp::markExplicitUnsigned
bool markExplicitUnsigned(PcodeOp *op, int4 slot) const
Check if a constant input should be explicitly labeled as unsigned.
Definition: typeop.cc:230
PrintC::opIntRem
virtual void opIntRem(const PcodeOp *op)
Emit a INT_REM operator.
Definition: printc.hh:258
Translate::isBigEndian
bool isBigEndian(void) const
Is the processor big endian?
Definition: translate.hh:571
TokenSplit::func_e
@ func_e
End of a function body.
Definition: prettyprint.hh:298
OpBehaviorIntNegate
CPUI_INT_NEGATE behavior.
Definition: opbehavior.hh:233
GhidraTranslate::getRegister
virtual const VarnodeData & getRegister(const string &nm) const
Get a register as VarnodeData given its name.
Definition: ghidra_translate.cc:42
SetAction::loadParameters
virtual void loadParameters(void)
Read parameters directing command execution.
Definition: ghidra_process.cc:357
calc_mask
uintb calc_mask(int4 size)
Calculate a mask for a given byte size.
Definition: address.hh:467
TransformManager::transformInputVarnodes
void transformInputVarnodes(vector< TransformVar * > &inputList)
Remove old input Varnodes, mark new input Varnodes.
Definition: transform.cc:713
ScopeGhidra::findClosestFit
virtual SymbolEntry * findClosestFit(const Address &addr, int4 size, const Address &usepoint) const
Find Symbol which is the closest fit to the given memory range.
Definition: database_ghidra.hh:82
ConditionMarker::slotstate
int4 slotstate[2]
Input Varnode to follow to stay on critical path.
Definition: condexe.hh:45
PrintC::opBranchind
virtual void opBranchind(const PcodeOp *op)
Emit a BRANCHIND operator.
Definition: printc.cc:440
PriorityQueue::insert
void insert(FlowBlock *bl, int4 depth)
Insert a block into the queue given its priority.
Definition: heritage.cc:109
PcodeEmitCache::varcache
vector< VarnodeData * > & varcache
The cache of current varnodes.
Definition: emulate.hh:280
RawLoadImage::open
void open(void)
Open the raw file for reading.
Definition: loadimage.cc:56
JumpBasic::findDeterminingVarnodes
void findDeterminingVarnodes(PcodeOp *op, int4 slot)
Calculate the initial set of Varnodes that might be switch variables.
Definition: jumptable.cc:506
PcodeInjectLibraryGhidra::manualCallOtherFixup
virtual int4 manualCallOtherFixup(const string &name, const string &outname, const vector< string > &inname, const string &snippet)
Manually add a callother-fixup payload given a compilable snippet of p-code source.
Definition: inject_ghidra.cc:216
Funcdata::beginOp
PcodeOpTree::const_iterator beginOp(const Address &addr) const
Start of all (alive) PcodeOp objects attached to a specific Address.
Definition: funcdata.hh:473
VarnodeBank
A container for Varnode objects from a specific function.
Definition: varnode.hh:325
ArchitectureGhidra::setSendSyntaxTree
void setSendSyntaxTree(bool val)
Toggle whether the data-flow and control-flow is emitted as part of the main decompile action.
Definition: ghidra_arch.hh:106
SplitFlow::worklist
vector< TransformVar * > worklist
Pending work list of Varnodes to push the split through.
Definition: subflow.hh:134
EmitPrettyPrint::lowlevel
EmitXml * lowlevel
The low-level emitter.
Definition: prettyprint.hh:704
JumpAssisted::recoverModel
virtual bool recoverModel(Funcdata *fd, PcodeOp *indop, uint4 matchsize, uint4 maxtablesize)
Attempt to recover details of the model, given a specific BRANCHIND.
Definition: jumptable.cc:1957
ScopeLocal::createEntry
void createEntry(const RangeHint &a)
Create a Symbol entry corresponding to the given (fitted) RangeHint.
Definition: varmap.cc:459
AddrSpace::overlaybase
@ overlaybase
This is the base space for overlay space(s)
Definition: space.hh:83
ParameterBasic::getName
virtual const string & getName(void) const
Get the name of the parameter ("" for return value)
Definition: fspec.hh:972
Funcdata::opUndoPtradd
void opUndoPtradd(PcodeOp *op, bool finalize)
Convert a CPUI_PTRADD back into a CPUI_INT_ADD.
Definition: funcdata_op.cc:529
Varnode::type
Datatype * type
Datatype associated with this varnode.
Definition: varnode.hh:134
ScoreProtoModel::PEntry
A record mapping trials to parameter entries in the prototype model.
Definition: fspec.hh:845
TransformOp::indirect_creation
@ indirect_creation
Mark op as indirect creation.
Definition: transform.hh:69
LaneDivide::traceForward
bool traceForward(TransformVar *rvn, int4 numLanes, int4 skipLanes)
Push the logical lanes forward through any PcodeOp reading the given variable.
Definition: subflow.cc:2296
CPUI_FLOAT_TRUNC
@ CPUI_FLOAT_TRUNC
Round towards zero.
Definition: opcodes.hh:103
PrintLanguage::opFloatInt2Float
virtual void opFloatInt2Float(const PcodeOp *op)=0
Emit a FLOAT_INT2FLOAT operator.
ProtoStore::getOutput
virtual ProtoParameter * getOutput(void)=0
Get the return-value description.
SleighBase::restoreXml
void restoreXml(const Element *el)
Read a SLEIGH specification from XML.
Definition: sleighbase.cc:180
JumpValues::clone
virtual JumpValues * clone(void) const =0
Clone this iterator.
TypeOpCbranch::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:510
ActionMultiCse::findMatch
static PcodeOp * findMatch(BlockBasic *bl, PcodeOp *target, Varnode *in)
Find match to CPUI_MULTIEQUAL.
Definition: coreaction.cc:766
HighVariable::inst
vector< Varnode * > inst
The member Varnode objects making up this HighVariable.
Definition: variable.hh:59
ValueSetSolver::ValueSetEdge::ValueSetEdge
ValueSetEdge(ValueSet *node, const vector< ValueSet * > &roots)
Construct an iterator over the outbound edges of the given ValueSet node.
Definition: rangeutil.cc:1896
PrintLanguage::ReversePolish::visited
int4 visited
The current stage of printing for the operator.
Definition: printlanguage.hh:168
ActionStackPtrFlow
Analyze change to the stack pointer across sub-function calls.
Definition: coreaction.hh:82
Varnode::locked_input
@ locked_input
Input that exists even if its unused.
Definition: varnode.hh:120
Override::insertDeadcodeDelay
void insertDeadcodeDelay(AddrSpace *spc, int4 delay)
Override the number of passes that are executed before dead-code elimination starts.
Definition: override.cc:69
TypeOpBinary::getOutputLocal
virtual Datatype * getOutputLocal(const PcodeOp *op) const
Find the minimal (or suggested) data-type of an output to this op-code.
Definition: typeop.cc:262
PrintC::opIntZext
virtual void opIntZext(const PcodeOp *op, const PcodeOp *readOp)
Emit a INT_ZEXT operator.
Definition: printc.cc:594
JumpAssistOp::JumpAssistOp
JumpAssistOp(Architecture *g)
Constructor.
Definition: userop.cc:235
Funcdata::opStackLoad
Varnode * opStackLoad(AddrSpace *spc, uintb off, uint4 sz, PcodeOp *op, Varnode *stackptr, bool insertafter)
Create a LOAD expression at an offset relative to a spacebase register for a given address space.
Definition: funcdata_op.cc:511
FloatFormat::jbitimplied
bool jbitimplied
Set to true if integer bit of 1 is assumed.
Definition: float.hh:49
PrintC::type_expr_space
static OpToken type_expr_space
Type declaration involving a space (identifier or adornment)
Definition: printc.hh:110
TreeHandler::setVersion
virtual void setVersion(const string &val)
Set the XML version as specified by the current document.
Definition: xml.hh:236
AddTreeState::ptr
Varnode * ptr
The pointer varnode.
Definition: ruleaction.hh:33
Funcdata::updateOpFromSpec
void updateOpFromSpec(FuncCallSpecs *fc)
Update CALL PcodeOp properties based on its corresponding call specification.
Definition: funcdata.cc:426
OptionErrorUnimplemented::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:626
EmulateSnippet::executeStore
virtual void executeStore(void)
Standard behavior for a p-code STORE.
Definition: emulateutil.cc:196
RuleLessNotEqual::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:431
PcodeOp::parent
BlockBasic * parent
Basic block in which this op is contained.
Definition: op.hh:117
Funcdata::removeJumpTable
void removeJumpTable(JumpTable *jt)
Remove/delete the given jump-table.
Definition: funcdata_block.cc:62
PrintLanguage::print_store_value
@ print_store_value
Hide pointer deref for store with other ops.
Definition: printlanguage.hh:144
StackSolver::solve
void solve(void)
Solve the system of equations.
Definition: coreaction.cc:109
BlockGoto::printHeader
virtual void printHeader(ostream &s) const
Print a simple description of this to stream.
Definition: block.cc:2658
RuleDivTermAdd2::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:6675
Architecture::parsePreferSplit
void parsePreferSplit(const Element *el)
Designate registers to be split.
Definition: architecture.cc:1028
EmitPrettyPrint::endStatement
virtual void endStatement(int4 id)
End a source code statement.
Definition: prettyprint.cc:971
MemoryBank::pagesize
int4 pagesize
Number of bytes in an aligned page access.
Definition: memstate.hh:40
ExecutablePcode
A snippet of p-code that can be executed outside of normal analysis.
Definition: pcodeinject.hh:134
SizePass
Label for describing extent of address range that has been heritaged.
Definition: heritage.hh:30
RuleSubCommute
Commute SUBPIECE operations with earlier operations where possible.
Definition: ruleaction.hh:753
ConditionMarker::~ConditionMarker
~ConditionMarker(void)
Destructor.
Definition: condexe.cc:30
FlowBlock::saveXmlEdges
void saveXmlEdges(ostream &s) const
Save edge information to an XML stream.
Definition: block.cc:2350
ScopeGhidra::getCategorySymbol
virtual Symbol * getCategorySymbol(int4 cat, int4 ind) const
Retrieve a Symbol by index within a specific category.
Definition: database_ghidra.hh:113
ScopeKey::name
string name
The name of the Scope.
Definition: database.hh:384
TransformManager::specialHandling
void specialHandling(TransformOp &rop)
Handle some special PcodeOp marking If a PcodeOp is an INDIRECT creation, we need to do special marki...
Definition: transform.cc:638
InjectCallfixupGhidra::InjectCallfixupGhidra
InjectCallfixupGhidra(const string &src, const string &nm)
Constructor.
Definition: inject_ghidra.cc:78
Heritage::augment
vector< vector< FlowBlock * > > augment
Augmented edges.
Definition: heritage.hh:205
OpToken::bump
int4 bump
Spaces to indent if we break here.
Definition: printlanguage.hh:98
PhiForm
Definition: double.hh:266
TypeOpIntRem
Information about the INT_REM op-code.
Definition: typeop.hh:501
AddrSpace::printOffset
void printOffset(ostream &s, uintb offset) const
Write an address offset to a stream.
Definition: space.cc:176
LoadImageGhidra::loadFill
virtual void loadFill(uint1 *ptr, int4 size, const Address &addr)
Get data from the LoadImage.
Definition: loadimage_ghidra.cc:35
SubvariableFlow::PatchRecord::type
patchtype type
The type of this patch.
Definition: subflow.hh:73
EmulatePcodeCache::trans
Translate * trans
The SLEIGH translator.
Definition: emulate.hh:297
Symbol::getMapEntryPosition
int4 getMapEntryPosition(const SymbolEntry *entry) const
Position of given SymbolEntry within this multi-entry Symbol.
Definition: database.cc:284
GuardRecord::GuardRecord
GuardRecord(PcodeOp *bOp, PcodeOp *rOp, int4 path, const CircleRange &rng, Varnode *v)
Constructor.
Definition: jumptable.cc:570
Funcdata::newIndirectCreation
PcodeOp * newIndirectCreation(PcodeOp *indeffect, const Address &addr, int4 size, bool possibleout)
Build a CPUI_INDIRECT op that indirectly creates a Varnode.
Definition: funcdata_op.cc:660
Emulate::executeSegmentOp
virtual void executeSegmentOp(void)=0
Behavior for a SEGMENTOP.
CollapseStructure::markExitsAsGotos
int4 markExitsAsGotos(vector< FlowBlock * > &body)
Mark edges exiting the body as unstructured gotos.
Definition: blockaction.cc:1076
PrintC::pushMismatchSymbol
virtual void pushMismatchSymbol(const Symbol *sym, int4 off, int4 sz, const Varnode *vn, const PcodeOp *op)
Push an identifier for a variable that mismatches with its Symbol.
Definition: printc.cc:1704
RuleNegateIdentity
Apply INT_NEGATE identities: V & ~V => #0, V | ~V -> #-1
Definition: ruleaction.hh:161
ScopeGhidra::cache
ScopeInternal * cache
An internal cache of previously fetched Symbol objects.
Definition: database_ghidra.hh:37
CollapseStructure::labelLoops
void labelLoops(vector< LoopBody * > &looporder)
Identify all the loops in this graph.
Definition: blockaction.cc:1119
JumpBasic::findNormalized
void findNormalized(Funcdata *fd, BlockBasic *rootbl, int4 pathout, uint4 matchsize, uint4 maxtablesize)
Do all the work necessary to recover the normalized switch variable.
Definition: jumptable.cc:1167
TraceDAG::BlockTrace::pathout
int4 pathout
Index of the out-edge for this path (relative to the parent BranchPoint)
Definition: blockaction.hh:128
ActionNormalizeBranches
Flip conditional control-flow so that preferred comparison operators are used.
Definition: blockaction.hh:269
ConstantPool::empty
virtual bool empty(void) const =0
Is the container empty of records.
Architecture::parseAggressiveTrim
void parseAggressiveTrim(const Element *el)
Designate how to trim extension p-code ops.
Definition: architecture.cc:1048
AliasChecker::direction
int4 direction
1=stack grows negative, -1=positive
Definition: varmap.hh:125
ActionMapGlobals::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:841
FuncProto::setOutputErrors
void setOutputErrors(bool val)
Toggle the output error setting for this prototype.
Definition: fspec.hh:1278
LanguageDescription::size
int4 size
Size of address bus in bits.
Definition: sleigh_arch.hh:52
RuleStructOffset0::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:1011
raw_arch.hh
Bare bones capability for treating a file as a raw executable image.
HighVariable::setSymbolReference
void setSymbolReference(Symbol *sym, int4 off)
Attach a reference to a Symbol to this.
Definition: variable.cc:71
TraceDAG::BranchPoint::pathout
int4 pathout
Index (of the out edge from the parent) of the path along which this lies.
Definition: blockaction.hh:102
RuleOrPredicate::MultiPredicate::otherVn
Varnode * otherVn
Other (non-zero) Varnode getting set on other path.
Definition: condexe.hh:219
OpBehaviorFloatDiv::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:397
ConstantPoolInternal::CheapSorter::apply
void apply(vector< uintb > &refs) const
Convert the reference back to a formal array of integers.
Definition: cpool.hh:185
RuleShiftAnd
Eliminate any INT_AND when the bits it zeroes out are discarded by a shift.
Definition: ruleaction.hh:814
CPUI_FLOAT_INT2FLOAT
@ CPUI_FLOAT_INT2FLOAT
Convert an integer to a floating-point.
Definition: opcodes.hh:101
PcodeOp::printDebug
void printDebug(ostream &s) const
Print debug description of this op to stream.
Definition: op.cc:276
SymbolEntry::symbol
Symbol * symbol
Symbol object being mapped.
Definition: database.hh:53
TraceDAG::BlockTrace::f_active
@ f_active
This BlockTrace is active.
Definition: blockaction.hh:123
RelativeRecord
Definition: sleigh.hh:23
RuleDoubleSub::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:351
SubvariableFlow::addConstant
ReplaceVarnode * addConstant(ReplaceOp *rop, uintb mask, uint4 slot, uintb val)
Add a constant variable node to the logical subgraph.
Definition: subflow.cc:1001
partmap::clearRange
_valuetype & clearRange(const _linetype &pnt1, const _linetype &pnt2)
Clear a range of split points.
Definition: partmap.hh:144
HighVariable::merge
void merge(HighVariable *tv2, bool isspeculative)
Merge another HighVariable into this.
Definition: variable.cc:302
ParamActive::deleteUnusedTrials
void deleteUnusedTrials(void)
Remove trials that were found not to be parameters.
Definition: fspec.cc:1454
ProtoModel::injectUponReturn
int4 injectUponReturn
Id of injection to perform after a call to this function (-1 means not used)
Definition: fspec.hh:625
EmitXml::openGroup
virtual int4 openGroup(void)
Start a group of things that are printed together.
Definition: prettyprint.hh:131
Translate::initialize
virtual void initialize(DocumentStorage &store)=0
Initialize the translator given XML configuration documents.
TreeHandler::cur
Element * cur
The current XML element being processed by this handler.
Definition: xml.hh:219
ParamEntry::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *manage, bool normalstack)
Restore the entry from an XML stream.
Definition: fspec.cc:302
TokenSplit::op_t
@ op_t
An operator.
Definition: prettyprint.hh:310
TypePointer::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:405
PrintLanguage::escapeCharacterData
bool escapeCharacterData(ostream &s, const uint1 *buf, int4 count, int4 charsize, bool bigend) const
Emit a byte buffer to the stream as unicode characters.
Definition: printlanguage.cc:623
Varnode::indirect_creation
@ indirect_creation
The value in this Varnode is created indirectly.
Definition: varnode.hh:100
RuleCollectTerms::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:150
VarnodeData::restoreXml
void restoreXml(const Element *el, const AddrSpaceManager *manage)
Recover this object from an XML tag.
Definition: pcoderaw.cc:22
Scope::findFunction
virtual Funcdata * findFunction(const Address &addr) const =0
Find the function starting at the given address.
TypeOpIntSless
Information about the INT_SLESS op-code.
Definition: typeop.hh:317
EmitNoXml::beginFunction
virtual int4 beginFunction(const Funcdata *fd)
Begin a whole declaration and body of a function.
Definition: prettyprint.hh:225
OptionCommentHeader::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:481
SegmentOp
The segmented address operator.
Definition: userop.hh:199
PcodeOp::halt
@ halt
instruction causes processor or process to halt
Definition: op.hh:90
TypeChar::TypeChar
TypeChar(const TypeChar &op)
Construct TypeChar copying properties from another data-type.
Definition: type.hh:179
OpBehavior::recoverInputUnary
virtual uintb recoverInputUnary(int4 sizeout, uintb out, int4 sizein) const
Reverse the unary op-code operation, recovering the input value.
Definition: opbehavior.cc:135
RuleSubCancel
Simplify composition of SUBPIECE with INT_ZEXT or INT_SEXT.
Definition: ruleaction.hh:854
PcodeOp::calculated_bool
@ calculated_bool
Output has been determined to be a 1-bit boolean value.
Definition: op.hh:97
TypeFactory::findByName
Datatype * findByName(const string &n)
Return type of given name.
Definition: type.cc:1400
GhidraDecompCapability
The core decompiler commands capability.
Definition: ghidra_process.hh:52
FspecSpace::restoreXml
virtual void restoreXml(const Element *el)
Recover the details of this space from XML.
Definition: fspec.cc:1616
LaneDivide::description
LaneDescription description
Global description of lanes that need to be split.
Definition: subflow.hh:175
FuncCallSpecs::checkInputJoin
bool checkInputJoin(int4 slot1, bool ishislot, Varnode *vn1, Varnode *vn2) const
Check if adjacent parameter trials can be combined into a single logical parameter.
Definition: fspec.cc:4384
OpBehaviorPopcount
CPUI_POPCOUNT behavior.
Definition: opbehavior.hh:506
BfdArchitecture::postSpecFile
virtual void postSpecFile(void)
Let components initialize after Translate is built.
Definition: bfd_arch.cc:111
TypeEnum::saveXml
virtual void saveXml(ostream &s) const
Serialize the data-type to XML.
Definition: type.cc:674
EmulatePcodeOp::setVarnodeValue
virtual void setVarnodeValue(Varnode *vn, uintb val)=0
Given a specific Varnode, set the given value for it in the current machine state.
ParamList::possibleParamWithSlot
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.
RuleSignForm::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:7059
TypeOpInsert::TypeOpInsert
TypeOpInsert(TypeFactory *t)
Constructor.
Definition: typeop.cc:1834
TypeOpPtradd::getOutputToken
virtual Datatype * getOutputToken(const PcodeOp *op, CastStrategy *castStrategy) const
Find the data-type of the output that would be assigned by a compiler.
Definition: typeop.cc:1629
SegmentOp::restoreXml
virtual void restoreXml(const Element *el)
Restore the detailed description from an XML stream.
Definition: userop.cc:163
OptionNoCastPrinting::apply
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:384
TypeOpIntSdiv::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:496
PrintLanguage::ReversePolish::tok
const OpToken * tok
The operator token.
Definition: printlanguage.hh:167
RuleIgnoreNan::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:8150
TokenSplit::ct
const Datatype * ct
Associated Data-type.
Definition: prettyprint.hh:336
RuleSubvarCompZero
Perform SubvariableFlow analysis triggered by testing of a single bit.
Definition: ruleaction.hh:1281
PrintLanguage::mods
uint4 mods
Currently active printing modifications.
Definition: printlanguage.hh:245
JumpValuesRangeDefault::extraop
PcodeOp * extraop
The starting PcodeOp associated with the extra value.
Definition: jumptable.hh:206
ActionMarkIndirectOnly
Mark illegal Varnode inputs used only in CPUI_INDIRECT ops.
Definition: coreaction.hh:338
JumpModel::foldInNormalization
virtual Varnode * foldInNormalization(Funcdata *fd, PcodeOp *indop)=0
Do normalization of the given switch specific to this model.
PrintLanguage::emit
EmitXml * emit
The low-level token emitter.
Definition: printlanguage.hh:244
EmitPrettyPrint::checkbreak
void checkbreak(void)
Enforce whitespace for a line break.
Definition: prettyprint.cc:835
ContextInternal::FreeArray::operator=
FreeArray & operator=(const FreeArray &op2)
Assignment operator.
Definition: globalcontext.cc:296
CommentDatabaseInternal::endComment
virtual CommentSet::const_iterator endComment(const Address &fad) const
Get an iterator to the ending of comments for a single function.
Definition: comment.cc:232
RuleSignShift::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:571
RuleZextEliminate::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:461
PrintC::opFunc
void opFunc(const PcodeOp *op)
Push a functional expression based on the given p-code op to the RPN stack.
Definition: printc.cc:290
XmlArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)
Build an Architecture given a raw file or data.
Definition: xml_arch.cc:27
FlowBlock::restoreNextInEdge
void restoreNextInEdge(const Element *el, BlockMap &resolver)
Restore the next input edge from XML.
Definition: block.cc:73
Varnode::indirectstorage
@ indirectstorage
Is this Varnode storing a pointer to the actual symbol.
Definition: varnode.hh:105
TypeOpFloatFloor
Information about the FLOAT_FLOOR op-code.
Definition: typeop.hh:657
ScopeInternal::removeSymbolMappings
virtual void removeSymbolMappings(Symbol *symbol)
Remove all SymbolEntrys from the given Symbol.
Definition: database.cc:1985
TypeOpNew::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.hh:776
Funcdata::removeDoNothingBlock
void removeDoNothingBlock(BlockBasic *bb)
Remove a basic block from control-flow that performs no operations.
Definition: funcdata_block.cc:322
JumpAssisted
A jump-table model assisted by pseudo-op directives in the code.
Definition: jumptable.hh:472
Element::children
List children
A list of child Element objects.
Definition: xml.hh:157
TraceDAG::BadEdgeScore::distance
int4 distance
Minimum distance crossed by this and any other BlockTrace sharing same exit block.
Definition: blockaction.hh:147
LanguageDescription::compilers
vector< CompilerTag > compilers
List of compiler specifications compatible with this processor.
Definition: sleigh_arch.hh:60
TokenSplit::cpar_t
@ cpar_t
Close parenthesis.
Definition: prettyprint.hh:318
OpBehaviorFloatAbs::evaluateUnary
virtual uintb evaluateUnary(int4 sizeout, int4 sizein, uintb in1) const
Emulate the unary op-code on an input value.
Definition: opbehavior.cc:634
TokenSplit::off
uintb off
Offset associated either with address or field markup.
Definition: prettyprint.hh:340
Database::saveXml
void saveXml(ostream &s) const
Save the whole Database to an XML stream.
Definition: database.cc:3021
Heritage::guardInput
void guardInput(const Address &addr, int4 size, vector< Varnode * > &input)
Make sure existing inputs for the given range fill it entirely.
Definition: heritage.cc:1536
DecompileAt::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:273
FlowBlock::index
int4 index
Reference index for this block (reverse post order)
Definition: block.hh:111
RuleBoolZext::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:2731
ActionLikelyTrash::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:802
CPUI_INT_MULT
@ CPUI_INT_MULT
Integer multiplication, signed and unsigned (*)
Definition: opcodes.hh:73
PrintLanguage::opBoolOr
virtual void opBoolOr(const PcodeOp *op)=0
Emit a BOOL_OR operator.
ValueSet::doesEquationApply
bool doesEquationApply(int4 num, int4 slot) const
Does the indicated equation apply for the given input slot.
Definition: rangeutil.hh:373
TypeOpBranch::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:484
Merge::mergeTestRequired
static bool mergeTestRequired(HighVariable *high_out, HighVariable *high_in)
Required tests to merge HighVariables that are not Cover related.
Definition: merge.cc:72
JumpAssisted::foldInNormalization
virtual Varnode * foldInNormalization(Funcdata *fd, PcodeOp *indop)
Do normalization of the given switch specific to this model.
Definition: jumptable.cc:2051
LaneDivide::buildRightShift
bool buildRightShift(PcodeOp *op, TransformVar *outVars, int4 numLanes, int4 skipLanes)
Check that a CPUI_INT_RIGHT respects the lanes then generate lane placeholders.
Definition: subflow.cc:2259
Merge::snipIndirect
void snipIndirect(PcodeOp *indop)
Snip instances of the input of an INDIRECT op that interfere with its output.
Definition: merge.cc:725
ActionStop
Do any post-processing after decompilation.
Definition: coreaction.hh:44
SubvariableFlow::tryCallReturnPush
bool tryCallReturnPush(PcodeOp *op, ReplaceVarnode *rvn)
Determine if the given subgraph variable can act as a created value for the given INDIRECT op.
Definition: subflow.cc:290
XmlArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const
Determine is this extension can handle this XML document.
Definition: xml_arch.cc:50
RuleConcatShift::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:1959
JumpTable::recoverAddresses
void recoverAddresses(Funcdata *fd)
Recover the raw jump-table addresses (the address table)
Definition: jumptable.cc:2449
AncestorRealistic::State::seen_solid0
@ seen_solid0
Indicates a solid movement into the Varnode occurred on at least one path to MULTIEQUAL.
Definition: funcdata.hh:571
SleighBase::symtab
SymbolTable symtab
The SLEIGH symbol table.
Definition: sleighbase.hh:35
RulePullsubMulti::acceptableSize
static bool acceptableSize(int4 size)
Return true if given size is a suitable truncated size.
Definition: ruleaction.cc:807
CPUI_INT_SLESS
@ CPUI_INT_SLESS
Integer comparison, signed less-than (<)
Definition: opcodes.hh:53
TokenSplit::beginReturnType
int4 beginReturnType(const Varnode *v)
Create a "begin return type declaration" command.
Definition: prettyprint.hh:390
ActionRedundBranch::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.cc:3011
TokenSplit::beginFunction
int4 beginFunction(const Funcdata *f)
Create a "begin function body" command.
Definition: prettyprint.hh:364
Funcdata::overrideFlow
void overrideFlow(const Address &addr, uint4 type)
Override the control-flow p-code for a particular instruction.
Definition: funcdata_op.cc:917
AddrSpace::does_deadcode
@ does_deadcode
Dead-code analysis is done on this space.
Definition: space.hh:79
ActionMergeMultiEntry::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:387
BlockSwitch
A structured switch construction.
Definition: block.hh:630
TypeOpFunc::metaout
type_metatype metaout
The metatype of the output.
Definition: typeop.hh:190
partmap::defaultvalue
_valuetype defaultvalue
The value object before the first split point.
Definition: partmap.hh:55
ActionVarnodeProps::markLanedVarnode
void markLanedVarnode(Funcdata &data, Varnode *vn)
Mark possible laned register storage.
Definition: coreaction.cc:1216
JumpBasic2::recoverModel
virtual bool recoverModel(Funcdata *fd, PcodeOp *indop, uint4 matchsize, uint4 maxtablesize)
Attempt to recover details of the model, given a specific BRANCHIND.
Definition: jumptable.cc:1535
RuleShiftSub
Simplify SUBPIECE applied to INT_LEFT: sub( V << 8*c, c) => sub(V,0)
Definition: ruleaction.hh:864
Translate::getFloatFormat
const FloatFormat * getFloatFormat(int4 size) const
Get format for a particular floating point encoding.
Definition: translate.cc:867
FunctionSymbol::restoreXml
virtual void restoreXml(const Element *el)
Restore this Symbol from an XML stream.
Definition: database.cc:585
LaneDivide::setReplacement
TransformVar * setReplacement(Varnode *vn, int4 numLanes, int4 skipLanes)
Find or build the placeholder objects for a Varnode that needs to be split into lanes.
Definition: subflow.cc:2003
ConditionalExecution::initblock
BlockBasic * initblock
The initial block computing the boolean value.
Definition: condexe.hh:134
TraceDAG::BranchPoint::BranchPoint
BranchPoint(void)
Create the (unique) root branch point.
Definition: blockaction.cc:548
MapIterator::curmap
vector< EntryMap * >::const_iterator curmap
Current EntryMap being iterated.
Definition: database.hh:332
TokenSplit::tokenbreak
@ tokenbreak
White space (where line breaks can be inserted)
Definition: prettyprint.hh:285
Funcdata::checkCallDoubleUse
bool checkCallDoubleUse(const PcodeOp *opmatch, const PcodeOp *op, const Varnode *vn, const ParamTrial &trial) const
Test for legitimate double use of a parameter trial.
Definition: funcdata_varnode.cc:1369
Scope::queryProperties
SymbolEntry * queryProperties(const Address &addr, int4 size, const Address &usepoint, uint4 &flags) const
Find a Symbol or properties at the given address.
Definition: database.cc:1185
TypeOpIntSborrow::push
virtual void push(PrintLanguage *lng, const PcodeOp *op, const PcodeOp *readOp) const
Push the specific PcodeOp to the emitter's RPN stack.
Definition: typeop.hh:402
byte_swap
void byte_swap(intb &val, int4 size)
Swap bytes in the given value.
Definition: address.cc:651
ContextBitRange::startbit
int4 startbit
Starting bit of the value within its word (0=most significant bit 1=least significant)
Definition: globalcontext.hh:32
override.hh
A system for sending override commands to the decompiler.
rangemap.hh
Templates to define interval map containers.
TypeOpLoad::getInputCast
virtual Datatype * getInputCast(const PcodeOp *op, int4 slot, const CastStrategy *castStrategy) const
Find the data-type of the input to a specific PcodeOp.
Definition: typeop.cc:365
RawBinaryArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const
Determine if this extension can handle this file.
Definition: raw_arch.cc:39
ConditionMarker::setupInitOp
void setupInitOp(PcodeOp *op)
Map out the root boolean expression.
Definition: condexe.cc:50
ScopeInternal::processHole
void processHole(const Element *el)
Parse a <hole> XML tag that describes boolean properties of memory range.
Definition: database.cc:2548
TraceDAG::likelygoto
list< FloatingEdge > & likelygoto
A reference to the list of likely goto edges being produced.
Definition: blockaction.hh:154
DeregisterProgram
Command to release all resources associated with a Program (executable) in the decompiler.
Definition: ghidra_process.hh:119
ActionStartCleanUp
Start clean up after main transform phase.
Definition: coreaction.hh:56
TokenSplit::prot_b
@ prot_b
Start of a function prototype.
Definition: prettyprint.hh:307
MapIterator::operator=
MapIterator & operator=(const MapIterator &op2)
Assignment operator.
Definition: database.hh:357
TYPE_FLOAT
@ TYPE_FLOAT
Floating-point.
Definition: type.hh:41
RulePopcountBoolXor::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:8524
TypeStruct::compareDependency
virtual int4 compareDependency(const Datatype &op) const
Compare for storage in tree structure.
Definition: type.cc:836
TYPE_UINT
@ TYPE_UINT
Unsigned integer.
Definition: type.hh:38
UserPcodeOp::restoreXml
virtual void restoreXml(const Element *el)=0
Restore the detailed description from an XML stream.
ArchitectureGhidra::ArchitectureGhidra
ArchitectureGhidra(const string &pspec, const string &cspec, const string &tspec, const string &corespec, istream &i, ostream &o)
Construct given specification files and i/o streams.
Definition: ghidra_arch.cc:710
ProtoStoreInternal::restoreXml
virtual void restoreXml(const Element *el, ProtoModel *model)
Restore any internal parameter descriptions from an XML stream.
Definition: fspec.cc:2749
AliasChecker::addBase
vector< AddBase > addBase
Collection of pointers into the AddressSpace.
Definition: varmap.hh:119
Rule2Comp2Sub
Cleanup: Convert INT_ADD back to INT_SUB: V + -W ==> V - W
Definition: ruleaction.hh:1072
Varnode::addrtied
@ addrtied
High-level variable is tied to address.
Definition: varnode.hh:92
BlockGoto::nextFlowAfter
virtual FlowBlock * nextFlowAfter(const FlowBlock *bl) const
Get the leaf FlowBlock that will execute after the given FlowBlock.
Definition: block.cc:2665
TypeOpMulti::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:1489
RuleAndCompare
Simplify INT_ZEXT and SUBPIECE in masked comparison: zext(V) & c == 0 => V & (c & mask) == 0
Definition: ruleaction.hh:338
EmitPrettyPrint::beginReturnType
virtual int4 beginReturnType(const Varnode *vn)
Begin a return type declaration.
Definition: prettyprint.cc:923
Varnode::setSymbolReference
void setSymbolReference(SymbolEntry *entry, int4 off)
Attach a Symbol reference to this.
Definition: varnode.cc:403
TypeOpIntXor
Information about the INT_XOR op-code.
Definition: typeop.hh:423
OpToken::hiddenfunction
@ hiddenfunction
Operation that isn't explicitly printed.
Definition: printlanguage.hh:90
Funcdata::attemptDynamicMapping
bool attemptDynamicMapping(SymbolEntry *entry, DynamicHash &dhash)
Map properties of a dynamic symbol to a Varnode.
Definition: funcdata_varnode.cc:1124
SleighBase::numSections
uint4 numSections
Number of named sections.
Definition: sleighbase.hh:38
rangemap::linetype
_recordtype::linetype linetype
Integer data-type defining the linear domain.
Definition: rangemap.hh:67
FlushNative::rawAction
virtual void rawAction(void)
Perform the action of the command.
Definition: ghidra_process.cc:240
Funcdata::opInsertBegin
void opInsertBegin(PcodeOp *op, BlockBasic *bl)
Insert given PcodeOp at the beginning of a basic block.
Definition: funcdata_op.cc:383
FloatFormat::extractExponentCode
int4 extractExponentCode(uintb x) const
Extract the exponent from the encoding.
Definition: float.cc:145
BlockGraph::buildDomTree
void buildDomTree(vector< vector< FlowBlock * > > &child) const
Build the dominator tree.
Definition: block.cc:1929
JumpValuesRangeDefault::getStartVarnode
virtual Varnode * getStartVarnode(void) const
Get the Varnode associated with the current value.
Definition: jumptable.cc:356
LoadImageSection::address
Address address
Starting address of section.
Definition: loadimage.hh:53
ActionDatabase::groupmap
map< string, ActionGroupList > groupmap
Map from root Action name to the grouplist it uses.
Definition: action.hh:297
AddTreeState::nonmult
vector< Varnode * > nonmult
Varnodes which are not multiples.
Definition: ruleaction.hh:37
PrintC::boolean_xor
static OpToken boolean_xor
The boolean xor operator.
Definition: printc.hh:96
BlockEdge::point
FlowBlock * point
Other end of the edge.
Definition: block.hh:46
ActionMarkImplied::DescTreeElement::desciter
list< PcodeOp * >::const_iterator desciter
The current edge being traversed.
Definition: coreaction.hh:441
SetOptions::res
bool res
Set to true if the option change succeeded.
Definition: ghidra_process.hh:229
Action::setWarning
bool setWarning(bool val, const string &specify)
Set a warning on this action.
Definition: action.cc:191
FuncProto::setNoReturn
void setNoReturn(bool val)
Toggle the no-return setting for functions with this prototype.
Definition: fspec.hh:1238
LessThreeWay
Definition: double.hh:174
CastStrategy::NO_PROMOTION
@ NO_PROMOTION
There is no integer promotion.
Definition: cast.hh:47
ValueSetRead::slot
int4 slot
The slot being read.
Definition: rangeutil.hh:179
ParamListStandard::assumedExtension
virtual OpCode assumedExtension(const Address &addr, int4 size, VarnodeData &res) const
Get the type of extension and containing parameter for the given storage.
Definition: fspec.cc:995
EmulateMemory::EmulateMemory
EmulateMemory(MemoryState *mem)
Construct given a memory state.
Definition: emulate.hh:264
ProtoStoreInternal::saveXml
virtual void saveXml(ostream &s) const
Save any parameters that are not backed by symbols to an XML stream.
Definition: fspec.cc:2711
FlowInfo::error_outofbounds
@ error_outofbounds
Throw an exception for flow into addresses out of the specified range.
Definition: flow.hh:60
ScopeGhidra::endDynamic
virtual list< SymbolEntry >::const_iterator endDynamic(void) const
Ending iterator to dynamic SymbolEntrys.
Definition: database_ghidra.hh:97
TraceDAG::~TraceDAG
~TraceDAG(void)
Destructor.
Definition: blockaction.cc:951
FlowInfo::toomanyinstructions_present
@ toomanyinstructions_present
Indicate the maximum instruction threshold was reached.
Definition: flow.hh:68
PrintLanguage::opBoolNegate
virtual void opBoolNegate(const PcodeOp *op)=0
Emit a BOOL_NEGATE operator.
FuncProto::returnBytesConsumed
int4 returnBytesConsumed
Number of bytes of return value that are consumed by callers (0 = all bytes)
Definition: fspec.hh:1171
PcodeOpBank::returnlist
list< PcodeOp * > returnlist
List of RETURN PcodeOps.
Definition: op.hh:250
ScopeGhidra::beginDynamic
virtual list< SymbolEntry >::iterator beginDynamic(void)
Beginning iterator to dynamic SymbolEntrys.
Definition: database_ghidra.hh:98
CPUI_CALLOTHER
@ CPUI_CALLOTHER
User-defined operation.
Definition: opcodes.hh:46
AddrSpace::isReverseJustified
bool isReverseJustified(void) const
Return true if alignment justification does not match endianness.
Definition: space.hh:417
Datatype::Datatype
Datatype(int4 s, type_metatype m, const string &n)
Construct the base data-type providing size, meta-type, and name.
Definition: type.hh:94
InjectPayload::incidentalCopy
bool incidentalCopy
True if injected COPYs are considered incidental.
Definition: pcodeinject.hh:90
PcodeOp::splittingbranch
@ splittingbranch
Dead edge cannot be removed as it splits.
Definition: op.hh:88
TypeFactory::cacheCoreTypes
void cacheCoreTypes(void)
Cache common types.
Definition: type.cc:1278
OpBehaviorIntSext::recoverInputUnary
virtual uintb recoverInputUnary(int4 sizeout, uintb out, int4 sizein) const
Reverse the unary op-code operation, recovering the input value.
Definition: opbehavior.cc:257
HeritageInfo::loadGuardSearch
bool loadGuardSearch
true if the search for LOAD ops to guard has been performed
Definition: heritage.hh:91
ActionMergeCopy::apply
virtual int4 apply(Funcdata &data)
Make a single attempt to apply this Action.
Definition: coreaction.hh:380
FlowInfo::checkMultistageJumptables
void checkMultistageJumptables(void)
Look for changes in control-flow near indirect jumps that were discovered after the jumptable recover...
Definition: flow.cc:1382
ActionStartCleanUp::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:59
EmulateSnippet::~EmulateSnippet
virtual ~EmulateSnippet(void)
Destructor.
Definition: emulateutil.cc:293
FspecSpace::printRaw
virtual void printRaw(ostream &s, uintb offset) const
Write an address in this space to a stream.
Definition: fspec.cc:1597
VarnodeBank::uniq_space
AddrSpace * uniq_space
Space to allocate unique varnodes from.
Definition: varnode.hh:327
PrintLanguage::Atom::ptr_second
union PrintLanguage::Atom::@23 ptr_second
Other meta-data associated with the token.
FuncProto::isNoReturn
bool isNoReturn(void) const
Does a function with this prototype never return.
Definition: fspec.hh:1233
RuleLessOne::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:1361
TraceDAG::BlockTrace
A trace of a single path out of a BranchPoint.
Definition: blockaction.hh:121
Merge::buildDominantCopy
void buildDominantCopy(HighVariable *high, vector< PcodeOp * > &copy, int4 pos, int4 size)
Try to replace a set of COPYs from the same Varnode with a single dominant COPY.
Definition: merge.cc:1049
Funcdata::flags
uint4 flags
Boolean properties associated with this function.
Definition: funcdata.hh:62
PrintLanguage::opCallind
virtual void opCallind(const PcodeOp *op)=0
Emit a CALLIND operator.
OptionDatabase
A Dispatcher for possible ArchOption commands.
Definition: options.hh:63
Varnode::operator==
bool operator==(const Varnode &op2) const
Equality operator.
Definition: varnode.cc:501
FuncProto::error_inputparam
@ error_inputparam
Set if the input parameters are not properly represented.
Definition: fspec.hh:1155
ParameterSymbol::overrideSizeLockType
virtual void overrideSizeLockType(Datatype *ct)
Change (override) the data-type of a size-locked parameter.
Definition: fspec.cc:2393
BlockGraph::findIrreducible
bool findIrreducible(const vector< FlowBlock * > &preorder, int4 &irreduciblecount)
Identify irreducible edges.
Definition: block.cc:1073
TypeOpCallind::printRaw
virtual void printRaw(ostream &s, const PcodeOp *op)
Print (for debugging purposes) this specific PcodeOp to the stream.
Definition: typeop.cc:656
TypeOpIntSright
Information about the INT_SRIGHT op-code.
Definition: typeop.hh:466
PrintC::subscript
static OpToken subscript
The array subscript operator.
Definition: printc.hh:69
BlockCopy
This class is used to mirror the BlockBasic objects in the fixed control-flow graph for a function.
Definition: block.hh:417
JumpTable::lastBlock
int4 lastBlock
Block out-edge corresponding to last entry in the address table.
Definition: jumptable.hh:519
ActionLaneDivide::processVarnode
bool processVarnode(Funcdata &data, Varnode *vn, const LanedRegister &lanedRegister, int4 mode)
Search for a likely lane size and try to divide a single Varnode into these lanes.
Definition: coreaction.cc:555
Scope::resetSizeLockType
void resetSizeLockType(Symbol *sym)
Clear a Symbol's size-locked data-type.
Definition: database.cc:1304
FuncProto::isDestructor
bool isDestructor(void) const
Is this prototype for a class destructor method.
Definition: fspec.hh:1257
EmitXml::beginBlock
virtual int4 beginBlock(const FlowBlock *bl)
Begin a control-flow element.
Definition: prettyprint.cc:60
JoinRecord::pieces
vector< VarnodeData > pieces
All the physical pieces of the symbol.
Definition: translate.hh:197
TermOrder::additiveCompare
static bool additiveCompare(const PcodeOpEdge *op1, const PcodeOpEdge *op2)
A comparison operator for ordering terms in a sum.
Definition: coreaction.hh:1076
LaneDivide::buildMultiequal
bool buildMultiequal(PcodeOp *op, TransformVar *outVars, int4 numLanes, int4 skipLanes)
Split a given CPUI_MULTIEQUAL operation into placeholders given the output lanes.
Definition: subflow.cc:2134
ValueSetSolver::generateFalseEquation
void generateFalseEquation(Varnode *vn, PcodeOp *op, int4 slot, int4 type, const CircleRange &range)
Generate the complementary equation given a true constraint and the input/output Varnodes it affects.
Definition: rangeutil.cc:2070
RuleAndMask::applyOp
virtual int4 applyOp(PcodeOp *op, Funcdata &data)
Attempt to apply this Rule.
Definition: ruleaction.cc:359
ConditionalJoin::block1
BlockBasic * block1
Side 1 of the (putative) split.
Definition: blockaction.hh:241
OpBehaviorIntOr
CPUI_INT_OR behavior.
Definition: opbehavior.hh:254
OpBehaviorFloatLessEqual::translate
const Translate * translate
Translate object for recovering float format.
Definition: opbehavior.hh:373
AncestorRealistic::State::slot
int4 slot
vn = op->getIn(slot)
Definition: funcdata.hh:577
EmitXml::startComment
virtual int4 startComment(void)
Start a comment block within the emitted source code.
Definition: prettyprint.hh:160
Architecture::splitrecords
vector< PreferSplitRecord > splitrecords
registers that we would prefer to see split for this processor
Definition: architecture.hh:154
JumpTable::~JumpTable
~JumpTable(void)
Destructor.
Definition: jumptable.cc:2251
TypeStruct::compare
virtual int4 compare(const Datatype &op, int4 level) const
Compare for functional equivalence.
Definition: type.cc:795
ValueSetSolver::ValueSetEdge
An iterator over out-bound edges for a single ValueSet node in a data-flow system.
Definition: rangeutil.hh:279
FlowInfo::possible_unreachable
@ possible_unreachable
Indicate a CALL was converted to a BRANCH and some code may be unreachable.
Definition: flow.hh:69
RuleFloatCast::getOpList
virtual void getOpList(vector< uint4 > &oplist) const
List of op codes this rule operates on.
Definition: ruleaction.cc:8088
FuncProto::setReturnBytesConsumed
bool setReturnBytesConsumed(int4 val)
Set the number of bytes consumed by callers of this.
Definition: fspec.cc:3103
PrintC::opIntAdd
virtual void opIntAdd(const PcodeOp *op)
Emit a INT_ADD operator.
Definition: printc.hh:242
BlockList::getSplitPoint
virtual FlowBlock * getSplitPoint(void)
Get the leaf splitting block.
Definition: block.cc:2742
Architecture::setPrintLanguage
void setPrintLanguage(const string &nm)
Establish a particular output language.
Definition: architecture.cc:340
SubvariableFlow::setReplacement
ReplaceVarnode * setReplacement(Varnode *vn, uintb mask, bool &inworklist)
Add the given Varnode as a new node in the logical subgraph.
Definition: subflow.cc:63
FuncProto::getMaxInputDelay
int4 getMaxInputDelay(void) const
Return the maximum heritage delay across all possible input parameters.
Definition: fspec.hh:1362
CircleRange::step
int4 step
Explicit step size.
Definition: rangeutil.hh:53
AliasChecker::fd
const Funcdata * fd
Function being searched for aliases.
Definition: varmap.hh:117
RuleShift2Mult::clone
virtual Rule * clone(const ActionGroupList &grouplist) const
Clone the Rule.
Definition: ruleaction.hh:602
Rule::resetStats
virtual void resetStats(void)
Reset Rule statistics.
Definition: action.cc:641
BadDataError::BadDataError
BadDataError(const string &s)
Constructor.
Definition: translate.hh:54
RecovError
A generic recoverable error.
Definition: error.hh:55
EffectRecord::restoreXml
void restoreXml(uint4 grouptype, const Element *el, const AddrSpaceManager *manage)
Restore the record from an XML stream.
Definition: fspec.cc:1670
JumpValuesRangeDefault::next
virtual bool next(void) const
Advance the iterator, return true if there is another value.
Definition: jumptable.cc:345
ParamEntry::smallsize_zext
@ smallsize_zext
Assume values that are below the max size are zero extended into this container.
Definition: fspec.hh:53
EmitNoXml::beginDocument
virtual int4 beginDocument(void)
Begin a whole document of output.
Definition: prettyprint.hh:223
PathMeld::set
void set(const PathMeld &op2)
Copy paths from another container.
Definition: jumptable.cc:869
ActionSetCasts
Fill-in CPUI_CAST p-code ops as required by the casting strategy.
Definition: coreaction.hh:314
BlockGraph::switchEdge
void switchEdge(FlowBlock *in, FlowBlock *outbefore, FlowBlock *outafter)
Move an edge from one out FlowBlock to another.
Definition: block.cc:1389
FuncProto::isCompatible
bool isCompatible(const FuncProto &op2) const
Decide if this can be safely restricted to match another prototype.
Definition: fspec.cc:3570
FlowInfo::baddr
Address baddr
Start of range in which we are allowed to flow.
Definition: flow.hh:94
PcodeOp::codeiter
list< PcodeOp * >::iterator codeiter
Position in opcode list.
Definition: op.hh:120
ActionMarkExplicit::baseExplicit
static int4 baseExplicit(Varnode *vn, int4 maxref)
Make initial determination if a Varnode should be explicit.
Definition: coreaction.cc:2535
PrintC::opLoad
virtual void opLoad(const PcodeOp *op)
Emit a LOAD operator.
Definition: printc.cc:345
OpBehaviorFloatEqual::evaluateBinary
virtual uintb evaluateBinary(int4 sizeout, int4 sizein, uintb in1, uintb in2) const
Emulate the binary op-code on input values.
Definition: opbehavior.cc:534
FlowBlock::compareBlockIndex
static bool compareBlockIndex(const FlowBlock *bl1, const FlowBlock *bl2)
Compare FlowBlock by index.
Definition: block.hh:775
OpBehaviorFloatAdd
CPUI_FLOAT_ADD behavior.
Definition: opbehavior.hh:388
OpBehaviorIntRem
CPUI_INT_REM behavior.
Definition: opbehavior.hh:306
HighVariable::getNameRepresentative
Varnode * getNameRepresentative(void) const
Get a member Varnode that dictates the naming of this HighVariable.
Definition: variable.cc:235
rangemap::find_begin
const_iterator find_begin(linetype point) const
Find beginning of sub-ranges that contain the given boundary point.
Definition: rangemap.hh:375
PcodeInjectLibrary::registerInject
virtual void registerInject(int4 injectid)=0
Finalize a payload within the library, once the payload is initialized.
TraceDAG::BlockTrace::edgelump
int4 edgelump
If >1, edge to destnode is "virtual" representing multiple edges coming together.
Definition: blockaction.hh:131
ArchitectureCapability
Abstract extension point for building Architecture objects.
Definition: architecture.hh:70
JumpBasicOverride::JumpBasicOverride
JumpBasicOverride(JumpTable *jt)
Constructor.
Definition: jumptable.cc:1642
BreakTable
A collection of breakpoints for the emulator.
Definition: emulate.hh:37
ActionRestrictLocal::clone
virtual Action * clone(const ActionGroupList &grouplist) const
Clone the Action.
Definition: coreaction.hh:778