Boost logo

Ublas :

Subject: Re: [ublas] newbie question: toolchain eclipse/mingw/g++ debug checks as errors.
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2010-03-29 16:12:41

Hello Jeremiah,

uBLAS uses standard C++ exceptions to report such errors.

Am Saturday 27 March 2010 schrieb Jeremiah Rounds:
>  When NDEBUG is not defined I get various bounds checks and that is
> great (eg Check failed in file
> ./boost/numeric/ublas/matrix_sparse.hpp at line 347: !preserve etc).
>  What I would like is for these checks to create an error before they
> terminate the program in this tool chain. Because at the moment
> eclipse/ mingw/ gdb won't catch them as errors in debugging, so
> essentially to track down the last call before the termination
> message by hand.  I would really like to step into this though at the
> time of the failed check so I can look at the call stack..Honestly, I
> am not sure what side of the problem I should work this on: is there
> a #define that will help me, is there a tweak to eclipse/gdb that
> will help me.  Any comment in this direction would be great.   Gist:
> I want the program to fault instead of terminate so that eclipse/gdb
> will be spring into action without any more effort.

Are you sure that neither BOOST_NO_EXCEPTIONS nor

According to exception.hpp any internal_error and external_error aborts
the program with a
throw *this;
// the type of *this is the exception class that inherits from
// std::runtime_error or similar classes.

Are you able to enable core dumps? (command "ulimit -c" on unix)