diff options
Diffstat (limited to 'lib/Core/AddressSpace.cpp')
-rw-r--r-- | lib/Core/AddressSpace.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Core/AddressSpace.cpp b/lib/Core/AddressSpace.cpp index 5b73a6f6..1e683e34 100644 --- a/lib/Core/AddressSpace.cpp +++ b/lib/Core/AddressSpace.cpp @@ -51,8 +51,9 @@ ObjectState *AddressSpace::getWriteable(const MemoryObject *mo, /// -bool AddressSpace::resolveOne(uint64_t addr64, ObjectPair &result) { - unsigned address = (unsigned) addr64; +bool AddressSpace::resolveOne(const ref<ConstantExpr> &addr, + ObjectPair &result) { + uint64_t address = addr->getZExtValue(); MemoryObject hack(address); if (const MemoryMap::value_type *res = objects.lookup_previous(&hack)) { @@ -73,7 +74,7 @@ bool AddressSpace::resolveOne(ExecutionState &state, ObjectPair &result, bool &success) { if (ConstantExpr *CE = dyn_cast<ConstantExpr>(address)) { - success = resolveOne(CE->getConstantValue(), result); + success = resolveOne(CE, result); return true; } else { TimerStatIncrementer timer(stats::resolveTime); @@ -165,7 +166,7 @@ bool AddressSpace::resolve(ExecutionState &state, double timeout) { if (ConstantExpr *CE = dyn_cast<ConstantExpr>(p)) { ObjectPair res; - if (resolveOne(CE->getConstantValue(), res)) + if (resolveOne(CE, res)) rl.push_back(res); return false; } else { |