Predator
[unstable] git snapshot
|
some generic utilities operating on list segments (SLS, DLS, Linux lists) More...
Go to the source code of this file.
Functions | |
bool | haveSeg (const SymHeap &sh, TValId atAddr, TValId pointingTo, EObjKind kind) |
return true if there is a list segment among the given pair of values | |
bool | haveDlSegAt (const SymHeap &sh, TValId atAddr, TValId peerAddr) |
return true if there is a DLS (Doubly-linked List Segment) among the given pair of values | |
PtrHandle | nextPtrFromSeg (const SymHeap &sh, TObjId seg) |
return 'next' pointer in the given segment | |
PtrHandle | prevPtrFromSeg (const SymHeap &sh, TObjId seg) |
return 'prev' pointer in the given segment | |
TValId | nextValFromSeg (const SymHeap &sh, TObjId seg) |
return the value of 'next' in the given segment | |
TValId | nextValFromSegAddr (const SymHeap &sh, TValId addr) |
TValId | prevValFromSegAddr (const SymHeap &sh, TValId addr) |
TOffset | headOffset (const SymHeap &sh, const TObjId seg) |
TValId | segHeadAt (SymHeap &sh, TObjId seg, ETargetSpecifier ts) |
return address of segment's head (useful mainly for Linux lists) | |
TMinLen | objMinLength (const SymHeap &sh, TObjId obj) |
bool | segProveNeq (const SymHeap &sh, TValId v1, TValId v2) |
return true if the given pair of values is proven to be non-equal | |
void | segIncreaseMinLength (SymHeap &sh, const TObjId seg, TMinLen len) |
if the current segment min length is lower than the given one, update it! | |
bool | segApplyNeq (SymHeap &sh, TValId v1, TValId v2) |
we know (v1 != v2), update related segments in the given heap accordingly! | |
bool | isObjWithBinding (const EObjKind kind) |
void | buildIgnoreList (TFldSet &ignoreList, const SymHeap &sh, const TObjId obj) |
void | buildIgnoreList (TFldSet &ignoreList, SymHeap &sh, const TObjId obj, const BindingOff &bf) |
TValId | lookThrough (const SymHeap &sh, TValId val, TValSet *pSeen=0) |
look through possibly empty objects and return the value seen | |
bool | segCheckConsistency (const SymHeap &sh) |
true if all segments have populated next/prev pointers |
some generic utilities operating on list segments (SLS, DLS, Linux lists)
Definition in file symseg.hh.
Definition at line 151 of file symseg.hh.
References BindingOff::next, SymHeap::objKind(), OK_DLS, OK_OBJ_OR_NULL, OK_REGION, OK_SEE_THROUGH, OK_SEE_THROUGH_2N, OK_SLS, BindingOff::prev, and SymHeap::segBinding().
|
inline |
Definition at line 183 of file symseg.hh.
References FldHandle::isValidHandle(), BindingOff::next, and BindingOff::prev.
return true if there is a DLS (Doubly-linked List Segment) among the given pair of values
sh | an instance of symbolic heap |
atAddr | address of the heap object for consideration |
peerAddr | potential address of DLS peer object |
return true if there is a list segment among the given pair of values
sh | an instance of symbolic heap |
atAddr | address of the heap object for consideration |
pointingTo | target address of the given potential list segment |
kind | kind of list segment to look for |
Definition at line 86 of file symseg.hh.
References CL_BREAK_IF, BindingOff::head, SymHeap::objKind(), OK_OBJ_OR_NULL, OK_REGION, and SymHeap::segBinding().
|
inline |
Definition at line 134 of file symseg.hh.
References OK_DLS, OK_OBJ_OR_NULL, OK_REGION, OK_SEE_THROUGH, OK_SEE_THROUGH_2N, and OK_SLS.
look through possibly empty objects and return the value seen
return 'next' pointer in the given segment
Definition at line 55 of file symseg.hh.
References CL_BREAK_IF, SymHeap::objKind(), OK_REGION, and SymHeap::segBinding().
Referenced by nextValFromSeg().
return the value of 'next' in the given segment
Definition at line 73 of file symseg.hh.
References nextPtrFromSeg(), SymHeap::objKind(), OK_OBJ_OR_NULL, VAL_NULL, and FldHandle::value().
Definition at line 107 of file symseg.hh.
References SymHeapCore::isValid(), SymHeap::objKind(), OK_REGION, and SymHeap::segMinLength().
return 'prev' pointer in the given segment
Definition at line 64 of file symseg.hh.
References CL_BREAK_IF, SymHeap::objKind(), OK_REGION, and SymHeap::segBinding().
we know (v1 != v2), update related segments in the given heap accordingly!
bool segCheckConsistency | ( | const SymHeap & | sh | ) |
true if all segments have populated next/prev pointers
|
inline |
return address of segment's head (useful mainly for Linux lists)
Definition at line 97 of file symseg.hh.
References SymHeapCore::addrOfTarget(), CL_BREAK_IF, SymHeap::objKind(), OK_REGION, and SymHeap::segBinding().
if the current segment min length is lower than the given one, update it!
Definition at line 123 of file symseg.hh.
References CL_BREAK_IF, SymHeap::segMinLength(), and SymHeap::segSetMinLength().