"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Rose/BinaryAnalysis/Concolic/SystemCall.C" between
rose-0.11.49.0.tar.gz and rose-0.11.50.0.tar.gz

About: ROSE is a compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C, C++, UPC, Fortran, OpenMP, Java, Python and PHP applications.

SystemCall.C  (rose-0.11.49.0):SystemCall.C  (rose-0.11.50.0)
#include <featureTests.h> #include <featureTests.h>
#ifdef ROSE_ENABLE_CONCOLIC_TESTING #ifdef ROSE_ENABLE_CONCOLIC_TESTING
#include <sage3basic.h> #include <sage3basic.h>
#include <Rose/BinaryAnalysis/Concolic/SystemCall.h> #include <Rose/BinaryAnalysis/Concolic/SystemCall.h>
#include <Rose/BinaryAnalysis/Concolic/Architecture.h> #include <Rose/BinaryAnalysis/Concolic/Architecture.h>
#include <Rose/BinaryAnalysis/Concolic/ConcolicExecutor.h>
#include <Rose/BinaryAnalysis/Concolic/ExecutionEvent.h> #include <Rose/BinaryAnalysis/Concolic/ExecutionEvent.h>
using namespace Sawyer::Message::Common;
namespace Rose { namespace Rose {
namespace BinaryAnalysis { namespace BinaryAnalysis {
namespace Concolic { namespace Concolic {
//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////
// SyscallContext // SyscallContext
//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////
SyscallContext::~SyscallContext() {} SyscallContext::SyscallContext(const Architecture::Ptr &architecture, const Exec
utionEvent::Ptr &syscallEvent,
//////////////////////////////////////////////////////////////////////////////// const std::vector<ExecutionEvent::Ptr> &relatedEv
//////////////////////////////////////////////// ents)
// SystemCall : phase(ConcolicPhase::REPLAY), architecture(architecture), ip(syscallEvent-
//////////////////////////////////////////////////////////////////////////////// >instructionPointer()),
//////////////////////////////////////////////// argsConcrete(syscallEvent->words()), syscallEvent(syscallEvent), relatedEv
ents(relatedEvents) {
SystemCall::SystemCall() {} ASSERT_not_null(architecture);
ASSERT_not_null(syscallEvent);
SystemCall::~SystemCall() {}
SystemCallPtr
SystemCall::instance() {
return Ptr(new SystemCall);
} }
const Sawyer::Optional<uint64_t>& SyscallContext::SyscallContext(const Architecture::Ptr &architecture, const Emul
SystemCall::previousReturnConcrete() const { ation::RiscOperators::Ptr &ops,
return prevReturnConcrete_; const ExecutionEvent::Ptr &syscallEvent)
: phase(ConcolicPhase::EMULATION), architecture(architecture), ops(ops), ip(
syscallEvent->instructionPointer()),
argsConcrete(syscallEvent->words()), syscallEvent(syscallEvent) {
ASSERT_not_null(architecture);
ASSERT_not_null(ops);
ASSERT_not_null(syscallEvent);
} }
void SyscallContext::~SyscallContext() {}
SystemCall::previousReturnConcrete(uint64_t value) {
prevReturnConcrete_ = value;
}
SymbolicExpr::Ptr ////////////////////////////////////////////////////////////////////////////////
SystemCall::previousReturnSymbolic() const { ////////////////////////////////////////////////
return prevReturnSymbolic_; // SyscallCallback
} ////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////
void void
SystemCall::previousReturnSymbolic(const SymbolicExpr::Ptr &value) { SyscallCallback::hello(const std::string &myName, const SyscallContext &ctx) con
prevReturnSymbolic_ = value; st {
} Sawyer::Message::Stream out = mlog[WHERE] ? mlog[WHERE] : mlog[DEBUG];
if (out) {
const SystemCall::Callbacks& switch (ctx.phase) {
SystemCall::callbacks() const { case ConcolicPhase::REPLAY:
return callbacks_; out <<"replay ";
} break;
case ConcolicPhase::EMULATION:
SystemCall::Callbacks& out <<"called ";
SystemCall::callbacks() { break;
return callbacks_; case ConcolicPhase::POST_EMULATION:
ASSERT_not_implemented("should be called here");
}
out <<(myName.empty() ? ctx.syscallEvent->name() + " system call" : myNa
me)
<<" at instruction " <<StringUtility::addrToString(ctx.ip) <<"\n";
}
} }
} // namespace } // namespace
} // namespace } // namespace
} // namespace } // namespace
#endif #endif
 End of changes. 7 change blocks. 
38 lines changed or deleted 46 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)