Boost logo

Ublas :

Subject: Re: [ublas] debugging in MSVC 2005
From: John McDonald (johnmcd_at_[hidden])
Date: 2009-10-06 10:59:34


Hi Jesse,

Thanks for the help. I added the code to AutoExp.dat but it didn't seem
to change the debuggers behaviour.

However on looking through the code I figured out how to dereference
correctly into the data_ members (e.g. v(0).data_.data_[1], etc.), which
is in fact what I needed (i.e. some way of checking values without a
bunch of std::cout's).

Regards,
John.

Jesse Perla wrote:
>
> On Tue, Oct 6, 2009 at 8:07 AM, John McDonald <johnmcd_at_[hidden]
> <mailto:johnmcd_at_[hidden]>> wrote:
>
> Hi,
> The code compiles and executes without a problem. However if I
> step into
> this code, and for example stop at the sixth line, and then try to
> inspect a variable I can only get limited information on its state.
> Specifically if I open an "immediate" window and try
> v(0)
> I get the following error
> CXX0059: Error: left operand is class not a function name
> If I try
> v[0]
> CXX0058: Error: overloaded operator not found
>
>
> A few things:
> 1) I haven't tried to do what you are trying exactly but: Make sure
> you have made the debugging extensions described at the bottom of:
> http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS
>
> 2) Also, don't forget that ublas is using expression templates, so
> things like "-v" are going to be complicated to step through. It will
> generate a strange intermediate object without actually changing the
> sign of anything or executing any code. Only when the cout <<
> serialization begins would it start going through the vector and doing
> the negation. If you want to look at intermediates, you should assign
> expressions to temporary classes of type ublas::vector<> etc.
>
> 3) Last, I have often thought that the "debug" build doesn't
> necessarily change all of the preprocessor definitions that change
> debugging, see the bottom of:
> http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS
> and if there was any inlining in a build, etc. you would definetely be
> confused when stepping through.
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: johnmcd_at_[hidden]

-- 
==================================
John Mc Donald,
Dept. of Computer Science,
National University of Ireland,
Maynooth,
Co. Kildare,
Ireland.
Email : johnmcd_at_[hidden]
Tel: +353-1-7084589
Fax: +353-1-7083848
Web: http://www.cs.nuim.ie/~johnmcd
GnuPG Key: http://www.cs.nuim.ie/~johnmcd/public_key.asc
==================================