Hi!
I faced a several problems while trying to debug my code in C::B 16.01 (there was no such problems in 15.12 and pre-16.01 nightlies). I`m not sure if all this problems are C::B related, so I post it here instead of bugtarcker.
My system:
C::B: Release 16.01 rev 10702, windows unicode 32-bit.
OS: Windwos 7 Pro (x64)
GCC: tdm64-1 5.1.0
GDB: GNU gdb (GDB) 7.9.1 (x64)
Problem #1:
While debugging multi-threaded application, when switching stack frame "Threads" window suddenly shows call stack information, and "call stack" window becomes empty. Click on such "threads" actually do switches threads and updates call stack. I mean, if I have 5 threads, I still could switch it clicking on first 5 lines of text (call stack) and other lines do nothing. Just like Threads window works fine but it contents displayed incorrectly.
Sometimes repeated switch of stack frame restores threads list. But, on the other hand, rarely some actions makes "Watches" window show call stack contents as well.
From the debugger log it looks like C::B asks GDB for threads list before previous command output completes. Here is partial log:
-----------------------------------------
[debug]> info args
[debug]>>>>>>cb_gdb:this = 0x1e067b8
[debug]> bt 30
[debug]__in_chrg = <optimized out>
[debug]>>>>>>cb_gdb:
[debug]> info threads
[debug]#0 0x000007fefe945b80 in strlen () from C:\Windows\system32\msvcrt.dll
[debug]#1 0x000000006e519a4e in __pformat_puts (stream=<optimized out>, s=<optimized out>) at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/stdio/mingw_pformat.c:560
[debug]#2 __mingw_pformat (flags=0, dest=<optimized out>, max=<optimized out>, fmt=0x4a810f <std::ignore+146> "\" at [%d;%d]\n", argv=0x22f840 "") at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/stdio/mingw_pformat.c:2394
[debug]#3 0x000000006e514aa7 in __mingw_vsnprintf (buf=0x22f3f0 "Destroying texture in Atlas \"\a", length=1023, fmt=<optimized out>, argv=<optimized out>) at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/stdio/mingw_vsnprintf.c:47
[debug]#4 0x000000006e524d56 in vsnprintf (__stream=0x22f3f0 "Destroying texture in Atlas \"\a", __n=1024, __format=0x4a80f0 <std::ignore+115> "Destroying texture in Atlas \"%s\" at [%d;%d]\n", __local_argv=0x22f838 "оюоюоюою") at D:/gcc/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:352
[debug]#5 0x000000006e502e90 in SE2D::Logger::Printf (this=0x6e5e0040 <SE2D::LOG>, nLevel=5, pFormat=0x4a80f0 <std::ignore+115> "Destroying texture in Atlas \"%s\" at [%d;%d]\n") at R:\SE2D\src\logger.cpp:387
[debug]#6 0x00000000004249f4 in SE2D::Texture::~Texture (this=0x1e067b8, __in_chrg=<optimized out>) at ../include/texture.h:50
[debug]#7 0x000000000049fbf5 in std::_Destroy<SE2D::Texture> (__pointer=0x1e067b8) at D:/gcc/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/stl_construct.h:93
[debug]#8 0x000000000047515b in std::_Destroy_aux<false>::__destroy<SE2D::Texture*> (__first=0x1e067b8, __last=0x1e06860) at D:/gcc/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/stl_construct.h:103
[debug]#9 0x000000000049fc80 in std::_Destroy<SE2D::Texture*> (__first=0x1e06780, __last=0x1e06860) at D:/gcc/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/stl_construct.h:126
[debug]#10 0x000000000049fcb4 in std::_Destroy<SE2D::Texture*, SE2D::Texture> (__first=0x1e06780, __last=0x1e06860) at D:/gcc/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/stl_construct.h:151
[debug]#11 0x000000000048f135 in std::vector<SE2D::Texture, std::allocator<SE2D::Texture> >::~vector (this=0x22fa10, __in_chrg=<optimized out>) at D:/gcc/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/stl_vector.h:424
[debug]#12 0x00000000004035e9 in TEST_Sprites () at R:\SE2D\test\main.cpp:401
[debug]#13 0x00000000004038fc in SDL_main (argc=1, argv=0x2f0010) at R:\SE2D\test\main.cpp:587
[debug]#14 0x00000000004050fa in main_utf8 (argv=0x2f0010, argc=<optimized out>) at ../src/main/windows/SDL_windows_main.c:126
[debug]#15 WinMain (hInst=<optimized out>, hPrev=hPrev@entry=0x0, szCmdLine=<optimized out>, sw=<optimized out>) at ../src/main/windows/SDL_windows_main.c:189
[debug]#16 0x00000000004a5112 in main (flags=<optimized out>, cmdline=<optimized out>, inst=<optimized out>) at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crt0_c.c:18
[debug]#17 0x00000000004013e8 in __tmainCRTStartup () at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crtexe.c:332
[debug]#18 0x000000000040151b in mainCRTStartup () at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crtexe.c:212
[debug]>>>>>>cb_gdb:
[debug] Id Target Id Frame
[debug] 5 Thread 4540.0x1180 0x000000007778fefa in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll
[debug] 4 Thread 4540.0x428 0x000000007778fefa in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll
[debug] 3 Thread 4540.0xb78 0x000000007779046a in ntdll!ZwWaitForMultipleObjects () from C:\Windows\SYSTEM32\ntdll.dll
[debug] 2 Thread 4540.0xdb0 0x000000007778fefa in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll
[debug]* 1 Thread 4540.0x1040 0x000007fefe945b80 in strlen () from C:\Windows\system32\msvcrt.dll
[debug]>>>>>>cb_gdb:
-----------------------------------------
Problem #2:
When console process is running, it could not be stopped nor paused. If I run it free (no debugger) - "Abort" button just hides its window, but all processes continue to run in background (conhost.exe, cb_console_runner.exe and test.exe).
It I run it under debugger, both "Pause" and "Stop" buttons does nothing. Only message "Trying to interrupt process with pid: 1596; child pid: 1596 gdb pid: 3112" appears. Process tree looks like that:
csrss.exe
conhost.exe [2976]
conhost.exe [3156]
codeblocks.exe
gdb.exe [3112]
gdb.exe [4872]
test.exe [1596]
Problem #3:
After debugee stopped on breakpoint and then terminated using stop button, if I run another debug session, it starts with the "Call stack" filled with information from the point it was terminated last time. Note that I use "Do *not* run debugee" setting enabled. After I run it to the some breakpoint in main() call stack refreshed with correct actual data.
Also, may be related: after I close workspace and open another one, "Build log" and "Build messages" not cleared and still contains old logs.
Is all this problems could be a C::B bugs or could be solved somehow? Thanks for your time and help!