Subject: Re: [ublas] improved debug support
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 2010-07-07 10:12:44
This would be useful,
the problem would be that the when the assertion fails, and provided that the reporting comes from within that function, the code (currently in exception.hpp):
std::cerr << "Check failed in file " << __FILE__ << " at line " << __LINE__ << ":" << std::endl;
would always show the file this function is in and not from where it is called. i.e. it would be always reporting something like:
Check failed in file boost/numeric/ublas/exception.hpp at line xxx: ......... Maybe an ublas_raise function that accepts __FILE__ and __LINE__ would work.
Furthermore, using a function call may make the debug mode in ublas much much faster (because inlining the std::cerr io may be avoided), so an investigation of that matter becomes very interesting.
Another matter is that this function should either: be inlined, be a member function of a class, be a template class, otherwise the exception.hpp would not link between two referencing compilation units.
> To: ublas_at_[hidden]
> From: ndbecker2_at_[hidden]
> Date: Tue, 15 Jun 2010 21:16:39 -0400
> Subject: [ublas] improved debug support
> It's helpful that indexes are checked in debug mode. Unfortunately, I find
> it impossible to get gdb to set a breakpoint on the exception being raised,
> probably due to the use of a macro for BOOST_UBLAS_CHECK.
> Perhaps if a function was called to raise the exception, say
> boost_raise (exception e) ...
> Then it would be easier to put a breakpoint on this function.
> ublas mailing list
> Sent to: nasos_i_at_[hidden]
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail.