[Insight-developers] Debugging difficulties.

Turek, Matthew W (Research) turek@crd.ge.com
Thu, 16 Jan 2003 18:36:50 -0500


Mark,

I've had this problem, but I haven't paid attention to whether it was in virtual functions or not.

I believe that you can compile an application with Debug and link against RelWithDebInfo libraries
without a problem.  However, this wouldn't fix the problem you are seeing if you are inside a
RelWithDebInfo library.  I believe that some of the call stack information is being optimized out in
the RelWithDebInfo mode.

Compiling an application with Release and linking with Debug libraries will immediately cause a
problem because there will be two different versions of the C run time library linked (msvcrt.lib,
msvcrtd.lib). 

Matt


-----Original Message-----
From: Mark Foskey [mailto:mark_foskey@unc.edu]
Sent: Thursday, January 16, 2003 5:35 PM
To: insight-developers@public.kitware.com
Subject: [Insight-developers] Debugging difficulties.


In the mode RelWithDebInfo, under VC6.0, I'm finding that local 
variables sometimes don't appear under the variables panel when I 
debug.  I conjecture that this happens inside virtual member functions, 
but I'm not sure.  Has anybody else had this problem?  Also, 
frequently, the call stack is incomplete.

Assuming that this problem has to do with "RelWithDebInfo", is there 
any way to compile an application in Debug mode while linking to ITK 
in, say, Release (or RelWithDebInfo) mode?  I tried to do that by 
placing copies of all the ITK libraries in a folder called Debug, but 
when I ran the program I got a fatal exception right at the beginning.

-- 
Mark Foskey    (919) 843-5436  Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu            Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey  Chapel Hill, NC  27599-7515

_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers