<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Re: [Insight-users] problem with running gdb on cygwin</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText41418 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hi Luis</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>unfortunately, it's a single processor
pentium 4.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Kris</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Luis Ibanez
[mailto:luis.ibanez@kitware.com]<BR><B>Sent:</B> Sun 25/09/2005
13:10<BR><B>To:</B> Thielemans, Kris<BR><B>Cc:</B>
insight-users@itk.org<BR><B>Subject:</B> Re: [Insight-users] problem with
running gdb on cygwin<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2>Hi Kris,<BR><BR>This seems to be a threading problem...<BR>are
you running in a dual processor machine ?<BR><BR><BR>Please let us
know,<BR><BR><BR> Thanks<BR><BR><BR>
Luis<BR><BR><BR><BR>------------------------<BR>Thielemans, Kris wrote:<BR>>
Hi<BR>> <BR>> <BR>> I am trying to run gdb on
Examples/Registration/DeformableRegistration7,<BR>> but gdb gets stuck
quickly (even before reading any data). This happens<BR>> even on data for
which the program runs fine if I don't use gdb.<BR>> <BR>> My
configuration:<BR>><BR>> ITK 2.2 on a fairly recent cygwin
installation (cygwin 1.5.18-1, gcc<BR>> 3.4.4-1, binutils 20050610-1,
cmake 2.0.6-1, gdb 6.3.50_2004-12-28-cvs;<BR>> none of which have any
updates available via cygwin's setup) running on<BR>> top of XP sp2.
I've used ccmake to do the configuration with selecting<BR>> the Debug
build-type.<BR>><BR>> <BR>><BR>> What I do is:<BR>><BR>>
break main<BR>> run<BR>> next a few times<BR>><BR>> gdb/the program
then hangs in the line<BR>><BR>> TransformType::Pointer
transform = TransformType::New();<BR>><BR>> If I single step through that
one I end up in KERNEL32!IsBadWritePtr<BR>> (see reproducible debugging
session below).<BR>><BR>> Ok, the program does seem to work fine, but this
makes me feel<BR>> uncomfortable, and I'd like to be able to use gdb. It
could of course be<BR>> a cygwin-gdb
problem.<BR>><BR>> <BR>><BR>> Any
suggestions?<BR>><BR>> <BR>><BR>> Kris Thielemans<BR>>
Hammersmith Imanet Ltd<BR>> part of GE Healthcare<BR>> London,
UK<BR>><BR>> <BR>><BR>> PS: debugging session:<BR>><BR>>
(gdb) r<BR>> Starting program:<BR>>
/home/kris/MyDocuments/devel/ITK/ITK-bin-debug/bin/DeformableRegistration7.exe<BR>>
largervox_atn_2.mha largervox_atn_1.mha largervox_atn_2_to_1.mha<BR>><BR>>
Breakpoint 1, main (argc=4, argv=0x1332878)<BR>>
at<BR>>
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Examples/Registration/DeformableRegistration7.cxx:119<BR>>
119 {<BR>> (gdb) n 12<BR>> 195 TransformType::Pointer
transform = TransformType::New();<BR>> (gdb) s 29<BR>>
itk::LightObject::operator new (n=272)<BR>>
at<BR>>
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkLightObject.cxx:78<BR>>
78 return new char[n];<BR>> (gdb) backtrace<BR>> #0
itk::LightObject::operator new (n=272)<BR>>
at<BR>>
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkLightObject.cxx:78<BR>>
#1 0x00636fc9 in itk::BSplineDeformableTransform<double, 3u,
3u>::New ()<BR>> at<BR>>
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkBSplineDeformableTransform.h:121<BR>>
#2 0x00401391 in main (argc=4,
argv=0x1332878)<BR>> at<BR>>
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Examples/Registration/DeformableRegistration7.cxx:195<BR>>
(gdb) s<BR>> 0x005bb3d6 in operator new[] ()<BR>>
at /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream:77<BR>>
77 static ios_base::Init __ioinit;<BR>> (gdb)<BR>> 0x6109dbe0
in pthread_getspecific () from /usr/bin/cygwin1.dll<BR>> (gdb)<BR>> Single
stepping until exit from function pthread_getspecific,<BR>> which has no line
number information.<BR>> 0x6109d010 in cygwin1!__getreent () from
/usr/bin/cygwin1.dll<BR>> (gdb)<BR>> Single stepping until exit from
function cygwin1!__getreent,<BR>> which has no line number
information.<BR>> 0x610e0bb0 in cygwin1!_alloca () from
/usr/bin/cygwin1.dll<BR>> (gdb)<BR>> Single stepping until exit from
function cygwin1!_alloca,<BR>> which has no line number information.<BR>>
0x7c809f29 in KERNEL32!IsBadWritePtr () from<BR>>
/c/WINDOWS/system32/kernel32.dll<BR>> (gdb)<BR>> Single stepping until
exit from function KERNEL32!IsBadWritePtr,<BR>><BR>> (It never gets out of
here).<BR>><BR>><BR>>
------------------------------------------------------------------------<BR>><BR>>
_______________________________________________<BR>> Insight-users mailing
list<BR>> Insight-users@itk.org<BR>> <A
href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR><BR><BR></FONT></P></DIV>
</BODY>
</HTML>