|Re: [eigen] plea for a new feature to help debugging|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] plea for a new feature to help debugging
- From: Matthieu Brucher <matthieu.brucher@xxxxxxxxx>
- Date: Fri, 4 Feb 2011 12:07:47 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=kmMMOTVzoV5F6enQQK1eOQMa46FhWuEwoRagaosTGrs=; b=SZWZC37pcohVxKsrM/KdyNpy9P8n0eTEsu3nYwaQEAzmnEhkESso8pdihrautA7Sr8 m14xEMsrhcCvh1CaHZJG4LyHsjJ5TX1swCic01n8747iz+MwI39lA4YcxHSGtu8Hu19t Xq2qkqXuTgyuo1larhIYo9dh8uO4+ejB44mBs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BimrXUSjZGSLgQKrV44mUIxRF/HYsAT8Iz6AuHvHG0olnwO1m4ap6AVZqRXR0o5T9c 5mOJabpVgcFl5Fl2w9ph61VgpDOwxFCoVs5twko3ydJJtQve8V/o2Gbc4mWxi6QwQOGh 8X2tGLG283VvBkW0LvJzQilcLCUQpUiwUHxqY=
This is correct, as macro expension occurs before the code is compiled and this before the function is inlined.
Current debuggers can stop when an exception is raised/..., and in this case, you would have a complete traceback of what actually happened. So I suggest you try those tools, because there are far better than logs.
2011/2/4 Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>
I know all developers of Eigen are busy due to bug fixing for Eigen3.
Still I want to start a discussion about a new feature for Eigen.
If an index to a matrix is out-of-range, one doesn't get any
information where this occurred. This is a restriction of C++
since it seems impossible to get the value of the __LINE__ macro at the
line where an inline function is expanded.
But it would be helpful to know the name of the matrix whose index was
out-of-range. To do this one needs an additional constructor parameter
'Name' which is defaulted to say 'NoName'. The matrix class would have
an additional string variable 'ID' which can be used for the error
message given to the exception object.
Of course, this additional variable ID would be present in the
DEBUG case (i.e. EIGEN_NO_DEBUG is undefined), only.
VectorXi T(5,"T"); // second parameter is ignored if EIGEN_NO_DEBUG
This would be very help, esp. for beginners.
Information System Engineer, Ph.D.