Code::Blocks Forums
User forums => Help => Topic started by: Hellhound on December 17, 2010, 01:42:39 pm
-
I've some issues with the gdb 6.3 debugger after update to the newes MinGW version. Debugging starts correctly
but dies at first breakpoint in endless loop. Any debugging icon and menu entry to step forward is disabled.
I've allready checked any of these instructions: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks#Path_with_spaces
Anything looks like corret to me. Here is my debug log:
PATH=.;C:\binrev\development\mingw\lib;C:\binrev\development\mingw\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Binary-Revolution\Development\doxygen\bin;C:\binrev\development\cmake\bin;C:\binrev\development\tortoisesvn\bin;C:\binrev\development\doxygen\bin;C:\binrev\development\graphviz\bin;C:\binrev\development\mingw\libexec\gcc\mingw32\3.4.5;C:\Program Files\NVIDIA Corporation\Cg\bin;C:\binrev\development\java5\bin
Command-line: C:\binrev\development\mingw\bin\gdb.exe -nx -fullname -quiet -args ../../binrevengine/branches/hellhound-dev/lib/brDemoOpenGL.exe
Working dir : C:\binrev\repository\codeblocks\brDemoOpenGL\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source C:\binrev\development\codeblocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/binrev/repository/codeblocks/brDemoOpenGL/
>>>>>>cb_gdb:
> directory C:/binrev/repository/
>>>>>>cb_gdb:
> break "C:/binrev/repository/binrevengine/branches/hellhound-dev/src/brRenderer/openGL/demos/Win32/demo_win32Texture.cpp:270"
Breakpoint 2 at 0x40168e: file C:/binrev/repository/binrevengine/branches/hellhound-dev/src/brRenderer/openGL/demos/Win32/demo_win32Texture.cpp, line 270.
>>>>>>cb_gdb:
> run
216 ./boost/system/error_code.hpp: No such file or directory.
Catchpoint 1 (exception thrown)
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ./boost/system/error_code.hpp:216
in ./boost/system/error_code.hpp
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> cont
Breakpoint 2, main () at C:/binrev/repository/binrevengine/branches/hellhound-dev/src/brRenderer/openGL/demos/Win32/demo_win32Texture.cpp:270
C:/binrev/repository/binrevengine/branches/hellhound-dev/src/brRenderer/openGL/demos/Win32/demo_win32Texture.cpp:270:9810:beg:0x40168e
>>>>>>cb_gdb:
> info locals
log = (brLog::brLogger &) @0x411686: {
static m_NUMBER_OF_MODES = <optimized out>,
static m_LOGFILEDIR = {
m_path = {
static npos = 4294967295,
_M_dataplus = {
<allocator<char>> = {
<new_allocator<char>> = {<No data fields>}, <No data fields>},
members of basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider:
_M_p = 0x23b290c "logs/"
}
}
},
static m_LOGFILENAME = {
static npos = 4294967295,
_M_dataplus = {
<allocator<char>> = {
<new_allocator<char>> = {<No data fields>}, <No data fields>},
members of basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider:
_M_p = 0x23b293c "log.txt"
}
},
static m_CHATFILENAME = {
static npos = 4294967295,
_M_dataplus = {
<allocator<char>> = {
<new_allocator<char>> = {<No data fields>}, <No data fields>},
members of basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider:
_M_p = 0x23b28b4 "chat.txt"
}
},
m_streamState = {
m_usibrLogMode = 50307,
m_uiPriority = 2378390878,
m_uiMessagePriority = 3677421686,
m_uiOutputType = 3280536299,
m_uiMessageType = 2332115853
},
m_logMode = 34068,
m_priority = 3531931716,
m_messagePriority = 3186356341,
m_outputType = 2365617805,
m_messageType = 10172,
m_poFile = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
<basic_ofstream<char,std::char_traits<char> >> = {
The last line <basic_ofstream<char,std::char_traits<char> >> = { is logged endless.
The stop command is ignored, i've to kill the gdb process hardly from windows task to
stop the deadlock.
Any suggestions?
-
216 ./boost/system/error_code.hpp: No such file or directory.
Catchpoint 1 (exception thrown)
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ./boost/system/error_code.hpp:216
in ./boost/system/error_code.hpp
It looks like to me that the gdb is missing the includes of the used boost libraries located in mingw/include
subfolder. I've try to set them explicitly as search directory in global Compiler & Debugger settings but this
have no effect.
-
Have you considered gdb upgrade? Especially if you're using gcc-4+.
-
Im using the last MinGW GDB installer Version 6.3.2 downloaded from here: http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/Release%20Candidate_%20gdb-6.3/gdb-6.3-2.exe/download.
I've changed the version of GDB to the actual 7.2 binary for windows downloaded here: http://www.equation.com/servlet/equation.cmd?fa=gdb
Here is the new debug log:
PATH=.;C:\binrev\development\mingw\lib;C:\binrev\development\mingw\include;C:\binrev\development\mingw\bin;C:\binrev\development\mingw\include;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Binary-Revolution\Development\doxygen\bin;C:\binrev\development\cmake\bin;C:\binrev\development\tortoisesvn\bin;C:\binrev\development\doxygen\bin;C:\binrev\development\graphviz\bin;C:\binrev\development\mingw\libexec\gcc\mingw32\3.4.5;C:\Program Files\NVIDIA Corporation\Cg\bin;C:\binrev\development\java5\bin
Command-line: C:\binrev\development\mingw\bin\gdb.exe -nx -fullname -quiet -args ../../binrevengine/branches/hellhound-dev/lib/brDemoOpenGL.exe
Working dir : C:\binrev\repository\codeblocks\brDemoOpenGL\
> set prompt >>>>>>cb_gdb:
Reading symbols from C:\binrev\repository\codeblocks\brDemoOpenGL/../../binrevengine/branches/hellhound-dev/lib/brDemoOpenGL.exe...
done.
(gdb)
>>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
This binary was built by Equation Solution <http://www.Equation.com>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source C:\binrev\development\codeblocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/binrev/repository/codeblocks/brDemoOpenGL/
>>>>>>cb_gdb:
> directory C:/binrev/repository/
>>>>>>cb_gdb:
> break "C:/binrev/repository/binrevengine/branches/hellhound-dev/src/brRenderer/openGL/demos/Win32/demo_win32Texture.cpp:270"
Breakpoint 2 at 0x40168e: file C:/binrev/repository/binrevengine/branches/hellhound-dev/src/brRenderer/openGL/demos/Win32/demo_win32Texture.cpp, line 270.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 5420.0x1110]
2a985d\msvcp80.dll" at 0x72520000.
216 ./boost/system/error_code.hpp: No such file or directory.
Catchpoint 1 (exception thrown), __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ./boost/system/error_code.hpp:216
in ./boost/system/error_code.hpp
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> cont
216 ./boost/system/error_code.hpp: No such file or directory.
Catchpoint 1 (exception thrown), __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ./boost/system/error_code.hpp:216
in ./boost/system/error_code.hpp
>>>>>>cb_gdb:
> quit
Looks better and i could stop the debugger from Codeblocks without killing the process. But the failure seems to be the same, the boost system
includes located in MinGW root under includes/boost folder could't be found ...
-
Hm, is this boost code header only or it was build as a library.
If it was the latter there is a problem with the library's symbols.
-
Boost 1.43 was build as library by me and added to MinGW root. I could build and run anything with MSYS and MingW also by Codeblocks,
only debugging fails.
-
1. Some boost parts are header only, so the symbols are in the your application
2. Moving a library after it was build will render the symbol paths invalid (I think)
Does setting breakpoints in you application work?
-
Issues solved, GDB is working fine now. Regarding your hints to the boost library i've updated boost to new version 1.45 and replace
all dependencies in MinGW. Now everything is working fine! Thanks for your help :D
-
Boost 1.43 was build as library by me and added to MinGW root. I could build and run anything with MSYS and MingW also by Codeblocks,
only debugging fails.
Did you try to explicitely set the boost-sources root-directory in "Settings -> Compiler and debugger... -> Debugger settings -> Debugger initialization commands" with "directory [/path/to/the/sources]" ?
EDIT:
too late.