diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2010-06-24 22:12:20 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2010-06-24 22:12:20 +0000 |
commit | b2f49b6d8578e4df8d33933fbe5b6c951f9150f1 (patch) | |
tree | 2c1eecceb63c693271d5cc71f100fa959f80afff /lib | |
parent | 27f3bf04b53a96f101633037cedda014d759594f (diff) | |
download | klee-b2f49b6d8578e4df8d33933fbe5b6c951f9150f1.tar.gz |
Implement klee_stack_trace function
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@106799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Core/SpecialFunctionHandler.cpp | 7 | ||||
-rw-r--r-- | lib/Core/SpecialFunctionHandler.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index 1b96d5f1..d3a86aac 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -80,6 +80,7 @@ HandlerInfo handlerInfo[] = { add("klee_print_expr", handlePrintExpr, false), add("klee_print_range", handlePrintRange, false), add("klee_set_forking", handleSetForking, false), + add("klee_stack_trace", handleStackTrace, false), add("klee_warning", handleWarning, false), add("klee_warning_once", handleWarningOnce, false), add("klee_alias_function", handleAliasFunction, false), @@ -428,6 +429,12 @@ void SpecialFunctionHandler::handleSetForking(ExecutionState &state, } } +void SpecialFunctionHandler::handleStackTrace(ExecutionState &state, + KInstruction *target, + std::vector<ref<Expr> > &arguments) { + state.dumpStack(std::cout); +} + void SpecialFunctionHandler::handleWarning(ExecutionState &state, KInstruction *target, std::vector<ref<Expr> > &arguments) { diff --git a/lib/Core/SpecialFunctionHandler.h b/lib/Core/SpecialFunctionHandler.h index 37792faf..e8c2eedf 100644 --- a/lib/Core/SpecialFunctionHandler.h +++ b/lib/Core/SpecialFunctionHandler.h @@ -95,6 +95,7 @@ namespace klee { HANDLER(handleRevirtObjects); HANDLER(handleSetForking); HANDLER(handleSilentExit); + HANDLER(handleStackTrace); HANDLER(handleUnderConstrained); HANDLER(handleWarning); HANDLER(handleWarningOnce); |