[Insight-users] problem with running gdb on cygwin
Thielemans, Kris
kris.thielemans at csc.mrc.ac.uk
Wed Sep 21 07:01:45 EDT 2005
Hi
I am trying to run gdb on Examples/Registration/DeformableRegistration7, but gdb gets stuck quickly (even before reading any data). This happens even on data for which the program runs fine if I don't use gdb.
My configuration:
ITK 2.2 on a fairly recent cygwin installation (cygwin 1.5.18-1, gcc 3.4.4-1, binutils 20050610-1, cmake 2.0.6-1, gdb 6.3.50_2004-12-28-cvs; none of which have any updates available via cygwin's setup) running on top of XP sp2. I've used ccmake to do the configuration with selecting the Debug build-type.
What I do is:
break main
run
next a few times
gdb/the program then hangs in the line
TransformType::Pointer transform = TransformType::New();
If I single step through that one I end up in KERNEL32!IsBadWritePtr (see reproducible debugging session below).
Ok, the program does seem to work fine, but this makes me feel uncomfortable, and I'd like to be able to use gdb. It could of course be a cygwin-gdb problem.
Any suggestions?
Kris Thielemans
Hammersmith Imanet Ltd
part of GE Healthcare
London, UK
PS: debugging session:
(gdb) r
Starting program: /home/kris/MyDocuments/devel/ITK/ITK-bin-debug/bin/DeformableRegistration7.exe largervox_atn_2.mha largervox_atn_1.mha largervox_atn_2_to_1.mha
Breakpoint 1, main (argc=4, argv=0x1332878)
at /home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Examples/Registration/DeformableRegistration7.cxx:119
119 {
(gdb) n 12
195 TransformType::Pointer transform = TransformType::New();
(gdb) s 29
itk::LightObject::operator new (n=272)
at /home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkLightObject.cxx:78
78 return new char[n];
(gdb) backtrace
#0 itk::LightObject::operator new (n=272)
at /home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkLightObject.cxx:78
#1 0x00636fc9 in itk::BSplineDeformableTransform<double, 3u, 3u>::New ()
at /home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkBSplineDeformableTransform.h:121
#2 0x00401391 in main (argc=4, argv=0x1332878)
at /home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Examples/Registration/DeformableRegistration7.cxx:195
(gdb) s
0x005bb3d6 in operator new[] ()
at /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream:77
77 static ios_base::Init __ioinit;
(gdb)
0x6109dbe0 in pthread_getspecific () from /usr/bin/cygwin1.dll
(gdb)
Single stepping until exit from function pthread_getspecific,
which has no line number information.
0x6109d010 in cygwin1!__getreent () from /usr/bin/cygwin1.dll
(gdb)
Single stepping until exit from function cygwin1!__getreent,
which has no line number information.
0x610e0bb0 in cygwin1!_alloca () from /usr/bin/cygwin1.dll
(gdb)
Single stepping until exit from function cygwin1!_alloca,
which has no line number information.
0x7c809f29 in KERNEL32!IsBadWritePtr () from /c/WINDOWS/system32/kernel32.dll
(gdb)
Single stepping until exit from function KERNEL32!IsBadWritePtr,
(It never gets out of here).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050921/08f89b55/attachment-0001.html
More information about the Insight-users
mailing list