summaryrefslogtreecommitdiff
path: root/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'debug.cc')
-rw-r--r--debug.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/debug.cc b/debug.cc
index 34859a3c9f..d55c901945 100644
--- a/debug.cc
+++ b/debug.cc
@@ -1,12 +1,27 @@
#include <fstream.h>
+#include <std/new.h>
#include "debug.hh"
#include "dstream.hh"
#include "vector.hh"
Dstream monitor(&cout,".dstreamrc");
ostream * nulldev = new ofstream("/dev/null");
+
+
+/*
+ want to do a stacktrace .
+ */
+void
+mynewhandler()
+{
+ cerr << "Out of free store memory. Aborting.. "<< flush;
+ assert(false);
+}
+
+
void
debug_init()
{
+ set_new_handler(&mynewhandler);
set_matrix_debug(monitor);
}