Hi,

I was wondering if it's possible to run MinGW-compiled osg program under gdb? I can run it fine outside of gdb but when I run it in gdb, I get this problem:

(gdb) r
Starting program: /usr/local/build/osg/bin/osglightd.exe

Breakpoint 2, main (argc=1, argv=0x3db140)
at c:/cygwin/usr/local/src/OpenSceneGraph-2.4.0/examples/osglight/osglight.cpp:327
(gdb) c
Continuing.
warning: HEAP[osglightd.exe]:
warning: Invalid Address specified to RtlFreeHeap( 003D0000, 6EA9D540 )

Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c901231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
(gdb) where
#0  0x7c901231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
#1  0x7c96c943 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#2  0x0022ed44 in ?? ()
#3  0x7c96cd80 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#4  0x6ea9d538 in __gnu_cxx::__mt_alloc<wchar_t>::_S_binmap ()
#5  0x003d0000 in ?? ()
#6  0x6ea9d540 in __gnu_cxx::__pool_alloc<wchar_t>::_S_force_new ()
#7  0x0022edb8 in ?? ()
#8  0x7c96df66 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#9  0x003d0000 in ?? ()
#10 0x6ea9d538 in __gnu_cxx::__mt_alloc<wchar_t>::_S_binmap ()
#11 0x7c96e11c in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#12 0x003d0000 in ?? ()
#13 0x6ea9d540 in __gnu_cxx::__pool_alloc<wchar_t>::_S_force_new ()
#14 0x40000060 in ?? ()
#15 0x7c926a44 in ntdll!iswdigit () from ntdll.dll
#16 0x003d0000 in ?? ()
#17 0x7c926abe in ntdll!iswdigit () from ntdll.dll

Above was using Cygwin gdb; below is using MINGW gdb in MSYS:

$ gdb ../bin/osglightd.exe
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
This GDB was configured as "i686-pc-mingw32"...
(gdb) r
Starting program: c:\cygwin\usr\local\build\osg\lib/../bin/osglightd.exe
[New thread 320.0x1cc]

Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c901231 in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
(gdb) warning: HEAP[osglightd.exe]:
warning: Invalid Address specified to RtlFreeHeap( 003D0000, 6EA9D540 )

(gdb) where
#0  0x7c901231 in ntdll!DbgUiConnectToDbg ()
  from C:\WINDOWS\system32\ntdll.dll
#1  0x7c96c943 in ntdll!RtlpNtMakeTemporaryKey ()
  from C:\WINDOWS\system32\ntdll.dll
#2  0x7c96cd80 in ntdll!RtlpNtMakeTemporaryKey ()
  from C:\WINDOWS\system32\ntdll.dll
#3  0x7c96df66 in ntdll!RtlpNtMakeTemporaryKey ()
  from C:\WINDOWS\system32\ntdll.dll
#4  0x7c94a5d0 in ntdll!RtlInsertElementGenericTableAvl ()
  from C:\WINDOWS\system32\ntdll.dll
#5  0x7c9268ad in ntdll!iswdigit () from C:\WINDOWS\system32\ntdll.dll
#6  0x77c2c2de in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll

Thank you,

Linh


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to