Predator
[unstable] git snapshot
|
a layer on top of SymHeap, providing some higher-level operations More...
#include <symproc.hh>
Public Member Functions | |
SymProc (SymHeap &heap, const SymBackTrace *bt) | |
creation of the symbolic heap processor is a really cheap operation | |
virtual | ~SymProc () |
SymHeap & | sh () |
const SymBackTrace * | bt () |
struct cl_loc * | lw () |
void | setLocation (const struct cl_loc *lw) |
update location info | |
FldHandle | fldByOperand (const struct cl_operand &op) |
obtain a heap object corresponding to the given operand | |
TValId | valFromOperand (const struct cl_operand &op) |
obtain a heap value corresponding to the given operand | |
bool | fncFromOperand (int *pUid, const struct cl_operand &op) |
resolve Fnc uid from the given operand, return true on success | |
void | setValueOf (const FldHandle &lhs, TValId rhs) |
high-level interface to FldHandle::setValue() | |
void | objDestroy (TObjId obj) |
high-level interface to SymHeap::objInvalidate() | |
void | killInsn (const CodeStorage::Insn &) |
invalidate all variables that are killed by the given instruction | |
void | killPerTarget (const CodeStorage::Insn &, unsigned target) |
invalidate all variables killed by the given instruction per target | |
bool | checkForInvalidDeref (TValId val, TSizeOf sizeOfTarget) |
check whether we can safely access sizeOfTarget at the given address | |
void | printBackTrace (EMsgLevel level, bool forcePtrace=false) |
print backtrace and update the current error level correspondingly | |
bool | hasFatalError () const |
if true, the current state is not going to be inserted into dst |
Protected Member Functions | |
TObjId | objByVar (const CVar &cv, bool initOnly=false) |
TObjId | objByVar (const struct cl_operand &op) |
TValId | targetAt (const struct cl_operand &op) |
virtual void | varInit (TObjId reg) |
Protected Attributes | |
SymHeap & | sh_ |
const SymBackTrace * | bt_ |
struct cl_loc * | lw_ |
bool | errorDetected_ |
Private Member Functions | |
TValId | valFromObj (const struct cl_operand &op) |
TValId | valFromCst (const struct cl_operand &op) |
void | killVar (const CodeStorage::KillVar &kv) |
Friends | |
void | initGlVar (SymHeap &sh, const CVar &cv) |
a layer on top of SymHeap, providing some higher-level operations
Definition at line 94 of file symproc.hh.
|
inline |
creation of the symbolic heap processor is a really cheap operation
heap | an instance of SymHeap to operate on |
bt | an instance of symbolic backtrace used to distinguish among instances of automatic variables and to print backtraces when necessary/suitable |
Definition at line 103 of file symproc.hh.
|
inlinevirtual |
Definition at line 111 of file symproc.hh.
|
inline |
Definition at line 114 of file symproc.hh.
References bt_.
check whether we can safely access sizeOfTarget at the given address
FldHandle fldByOperand | ( | const struct cl_operand & | op | ) |
obtain a heap object corresponding to the given operand
bool fncFromOperand | ( | int * | pUid, |
const struct cl_operand & | op | ||
) |
resolve Fnc uid from the given operand, return true on success
bool hasFatalError | ( | ) | const |
if true, the current state is not going to be inserted into dst
void killInsn | ( | const CodeStorage::Insn & | ) |
invalidate all variables that are killed by the given instruction
void killPerTarget | ( | const CodeStorage::Insn & | , |
unsigned | target | ||
) |
invalidate all variables killed by the given instruction per target
|
private |
|
inlineread |
|
protected |
void objDestroy | ( | TObjId | obj | ) |
high-level interface to SymHeap::objInvalidate()
void printBackTrace | ( | EMsgLevel | level, |
bool | forcePtrace = false |
||
) |
print backtrace and update the current error level correspondingly
|
inline |
update location info
lw | where to retrieve the location info from |
Definition at line 123 of file symproc.hh.
high-level interface to FldHandle::setValue()
|
inline |
|
protected |
|
private |
|
private |
TValId valFromOperand | ( | const struct cl_operand & | op | ) |
obtain a heap value corresponding to the given operand
|
protectedvirtual |
Reimplemented in SymExecCore.
|
protected |
Definition at line 172 of file symproc.hh.
Referenced by bt().
|
protected |
Definition at line 174 of file symproc.hh.
|
protected |
Definition at line 173 of file symproc.hh.
Referenced by lw(), and setLocation().
|
protected |
Definition at line 171 of file symproc.hh.
Referenced by sh().