Index: src/Common/Assert.cc
===================================================================
--- src/Common/Assert.cc	(revision 8b7ee0974cc08327cc6c696da347e0f8d3d1f50c)
+++ src/Common/Assert.cc	(revision e6955b1a44ef79f7fd4b73e0cb17574f4a867207)
@@ -10,12 +10,12 @@
 // Created On       : Thu Aug 18 13:26:59 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 18 23:40:29 2016
-// Update Count     : 8
+// Last Modified On : Fri Aug 19 17:07:08 2016
+// Update Count     : 10
 // 
 
 #include <assert.h>
-#include <cstdarg>
-#include <cstdio>
-#include <cstdlib>
+#include <cstdarg>										// varargs
+#include <cstdio>										// fprintf
+#include <cstdlib>										// abort
 
 extern const char * __progname;							// global name of running executable (argv[0])
@@ -26,5 +26,5 @@
 void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
 	fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );
-	exit( EXIT_FAILURE );
+	abort();
 }
 
@@ -35,5 +35,5 @@
 	va_start( args, fmt );
 	vfprintf( stderr, fmt, args );
-	exit( EXIT_FAILURE );
+	abort();
 }
 
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 8b7ee0974cc08327cc6c696da347e0f8d3d1f50c)
+++ src/Makefile.am	(revision e6955b1a44ef79f7fd4b73e0cb17574f4a867207)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 08:51:46 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Thu Aug 18 17:47:06 2016
-## Update Count     : 70
+## Last Modified On : Sat Aug 20 11:13:12 2016
+## Update Count     : 71
 ###############################################################################
 
@@ -43,5 +43,5 @@
 driver_cfa_cpp_SOURCES = ${SRC}
 driver_cfa_cpp_LDADD = ${LEXLIB}			# yywrap
-driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -I${abs_top_srcdir}/src/include
+driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -rdynamic -I${abs_top_srcdir}/src/include
 
 MAINTAINERCLEANFILES += ${libdir}/${notdir ${cfa_cpplib_PROGRAMS}}
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 8b7ee0974cc08327cc6c696da347e0f8d3d1f50c)
+++ src/Makefile.in	(revision e6955b1a44ef79f7fd4b73e0cb17574f4a867207)
@@ -427,5 +427,5 @@
 driver_cfa_cpp_SOURCES = ${SRC}
 driver_cfa_cpp_LDADD = ${LEXLIB}			# yywrap
-driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -I${abs_top_srcdir}/src/include
+driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -rdynamic -I${abs_top_srcdir}/src/include
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 8b7ee0974cc08327cc6c696da347e0f8d3d1f50c)
+++ src/main.cc	(revision e6955b1a44ef79f7fd4b73e0cb17574f4a867207)
@@ -10,11 +10,17 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Aug 19 08:31:22 2016
-// Update Count     : 350
+// Last Modified On : Sat Aug 20 12:52:22 2016
+// Update Count     : 403
 //
 
 #include <iostream>
 #include <fstream>
-#include <getopt.h>
+#include <signal.h>										// signal
+#include <getopt.h>										// getopt
+#include <execinfo.h>									// backtrace, backtrace_symbols_fd
+#include <cxxabi.h>										// __cxa_demangle
+
+using namespace std;
+
 #include "Parser/lex.h"
 #include "Parser/parser.h"
@@ -35,10 +41,9 @@
 #include "InitTweak/FixInit.h"
 #include "Common/UnimplementedError.h"
-
 #include "../config.h"
 
 using namespace std;
 
-#define OPTPRINT(x) if ( errorp ) std::cerr << x << std::endl;
+#define OPTPRINT(x) if ( errorp ) cerr << x << endl;
 
 
@@ -68,11 +73,64 @@
 static void parse_cmdline( int argc, char *argv[], const char *& filename );
 static void parse( FILE * input, LinkageSpec::Spec linkage, bool shouldExit = false );
-static void dump( std::list< Declaration * > & translationUnit, std::ostream & out = std::cout );
+static void dump( list< Declaration * > & translationUnit, ostream & out = cout );
+
+void sigSegvBusHandler( int sig_num ) {
+	enum { Frames = 50 };
+	void * array[Frames];
+	int size = backtrace( array, Frames );
+
+	cerr << "*CFA runtime error* program cfa-cpp terminated with "
+		 <<	(sig_num == SIGSEGV ? "segment fault" : "bus error")
+		 << " backtrace:" << endl;
+
+	char ** messages = backtrace_symbols( array, size );    
+
+	// skip first stack frame (points here)
+	for ( int i = 2; i < size - 2 && messages != nullptr; i += 1 ) {
+		char * mangled_name = nullptr, * offset_begin = nullptr, * offset_end = nullptr;
+		for ( char *p = messages[i]; *p; ++p ) {        // find parantheses and +offset
+			if (*p == '(') {
+				mangled_name = p; 
+			} else if (*p == '+') {
+				offset_begin = p;
+			} else if (*p == ')') {
+				offset_end = p;
+				break;
+			} // if
+		} // for
+
+		// if line contains symbol, attempt to demangle
+		if ( mangled_name && offset_begin && offset_end && mangled_name < offset_begin ) {
+			*mangled_name++ = '\0';
+			*offset_begin++ = '\0';
+			*offset_end++ = '\0';
+
+			int status;
+			char * real_name = __cxxabiv1::__cxa_demangle( mangled_name, 0, 0, &status );
+			if ( status == 0 ) {						// demangling successful ?
+				cerr << "(" << i - 2 << ") " << messages[i] << " : " 
+					 << real_name << "+" << offset_begin << offset_end << endl;
+
+			} else {									// otherwise, output mangled name
+				cerr << "(" << i - 2 << ") " << messages[i] << " : " 
+					 << mangled_name << "+" << offset_begin << offset_end << endl;
+			} // if
+			free( real_name );
+		} else {										// otherwise, print the whole line
+			cerr << "(" << i - 2 << ") " << messages[i] << endl;
+		} // if
+	} // for
+	free( messages );
+	exit( EXIT_FAILURE );
+} // sigSegvBusHandler
 
 int main( int argc, char * argv[] ) {
 	FILE * input;										// use FILE rather than istream because yyin is FILE
-	std::ostream *output = & std::cout;
-	std::list< Declaration * > translationUnit;
+	ostream *output = & cout;
 	const char *filename = nullptr;
+	list< Declaration * > translationUnit;
+
+	signal( SIGSEGV, sigSegvBusHandler );
+	signal( SIGBUS, sigSegvBusHandler );
 
 	parse_cmdline( argc, argv, filename );				// process command-line arguments
@@ -122,5 +180,5 @@
 
 		if ( parsep ) {
-			parseTree->printList( std::cout );
+			parseTree->printList( cout );
 			delete parseTree;
 			return 0;
@@ -144,5 +202,5 @@
 
 		if ( expraltp ) {
-			ResolvExpr::AlternativePrinter printer( std::cout );
+			ResolvExpr::AlternativePrinter printer( cout );
 			acceptAll( translationUnit, printer );
 			return 0;
@@ -210,28 +268,28 @@
 		CodeGen::generate( translationUnit, *output, ! noprotop );
 
-		if ( output != &std::cout ) {
+		if ( output != &cout ) {
 			delete output;
 		} // if
 	} catch ( SemanticError &e ) {
 		if ( errorp ) {
-			std::cerr << "---AST at error:---" << std::endl;
-			dump( translationUnit, std::cerr );
-			std::cerr << std::endl << "---End of AST, begin error message:---\n" << std::endl;
-		} // if
-		e.print( std::cerr );
-		if ( output != &std::cout ) {
+			cerr << "---AST at error:---" << endl;
+			dump( translationUnit, cerr );
+			cerr << endl << "---End of AST, begin error message:---\n" << endl;
+		} // if
+		e.print( cerr );
+		if ( output != &cout ) {
 			delete output;
 		} // if
 		return 1;
 	} catch ( UnimplementedError &e ) {
-		std::cout << "Sorry, " << e.get_what() << " is not currently implemented" << std::endl;
-		if ( output != &std::cout ) {
+		cout << "Sorry, " << e.get_what() << " is not currently implemented" << endl;
+		if ( output != &cout ) {
 			delete output;
 		} // if
 		return 1;
 	} catch ( CompilerError &e ) {
-		std::cerr << "Compiler Error: " << e.get_what() << std::endl;
-		std::cerr << "(please report bugs to " << std::endl;
-		if ( output != &std::cout ) {
+		cerr << "Compiler Error: " << e.get_what() << endl;
+		cerr << "(please report bugs to " << endl;
+		if ( output != &cout ) {
 			delete output;
 		} // if
@@ -369,9 +427,9 @@
 } // notPrelude
 
-static void dump( std::list< Declaration * > & translationUnit, std::ostream & out ) {
-	std::list< Declaration * > decls;
+static void dump( list< Declaration * > & translationUnit, ostream & out ) {
+	list< Declaration * > decls;
 
 	if ( noprotop ) {
-		filter( translationUnit.begin(), translationUnit.end(), std::back_inserter( decls ), notPrelude );
+		filter( translationUnit.begin(), translationUnit.end(), back_inserter( decls ), notPrelude );
 	} else {
 		decls = translationUnit;
