projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nodestack: print extra backtracking info
[model-checker.git]
/
common.cc
diff --git
a/common.cc
b/common.cc
index f8df1335b00cbe57001d4efacea2191134a4653c..e6c6cce60ccd2e2b73bc22d5ae48129a37c307b1 100644
(file)
--- a/
common.cc
+++ b/
common.cc
@@
-14,15
+14,15
@@
#define MAX_TRACE_LEN 100
#define MAX_TRACE_LEN 100
-FILE *model_out;
-int fd_user_out; /**< @brief File descriptor from which to read user program output */
+/** @brief Model-checker output stream; default to stdout until redirected */
+FILE *model_out = stdout;
#define CONFIG_STACKTRACE
/** Print a backtrace of the current program state. */
void print_trace(void)
{
#ifdef CONFIG_STACKTRACE
#define CONFIG_STACKTRACE
/** Print a backtrace of the current program state. */
void print_trace(void)
{
#ifdef CONFIG_STACKTRACE
- print_stacktrace(
std
out);
+ print_stacktrace(
model_
out);
#else
void *array[MAX_TRACE_LEN];
char **strings;
#else
void *array[MAX_TRACE_LEN];
char **strings;
@@
-60,6
+60,10
@@
void model_assert(bool expr, const char *file, int line)
}
}
}
}
+#ifndef CONFIG_DEBUG
+
+static int fd_user_out; /**< @brief File descriptor from which to read user program output */
+
/**
* @brief Setup output redirecting
*
/**
* @brief Setup output redirecting
*
@@
-161,3
+165,4
@@
void print_program_output()
}
}
}
}
}
}
+#endif /* ! CONFIG_DEBUG */