snapshot: don't need any snapshotting space for fork-based
[model-checker.git] / common.cc
index 8cb649bbb10db23b0cb2b4cd2e374e294e73390c..b274989f48bc4d885f6976b596139b1e5bde42ed 100644 (file)
--- a/common.cc
+++ b/common.cc
@@ -3,12 +3,18 @@
 #include <stdlib.h>
 
 #include "common.h"
+#include "model.h"
+#include "stacktrace.h"
 
 #define MAX_TRACE_LEN 100
 
+#define CONFIG_STACKTRACE
 /** Print a backtrace of the current program state. */
 void print_trace(void)
 {
+#ifdef CONFIG_STACKTRACE
+       print_stacktrace(stdout);
+#else
        void *array[MAX_TRACE_LEN];
        char **strings;
        int size, i;
@@ -22,4 +28,15 @@ void print_trace(void)
                printf("\t%s\n", strings[i]);
 
        free(strings);
+#endif /* CONFIG_STACKTRACE */
+}
+
+void model_print_summary(void)
+{
+       model->print_summary();
+}
+
+void assert_hook(void)
+{
+       printf("Add breakpoint to line %u in file %s.\n",__LINE__,__FILE__);
 }