The debuggee and the CB debugging interface freeze when setting/removing breakpoint while the debuggee is already loaded/running.
Environment
Ubuntu 23.10
gdb --version:
GNU gdb (Ubuntu 14.0.50.20230907-0ubuntu1) 14.0.50.20230907-git
CodeBlocks version:
svn build rev 13447 (2024-02-10 09:51:21) gcc 13.2.0 Linux/unicode - 64 bit
pkg-config --modversion gtk+-3.0
3.24.38
ame : Code::Blocks
Version : svn-r13447
SDK Version : 2.25.0
Scintilla Version : 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : https://www.codeblocks.org
OS : Linux 6.5.0-17-generic x86_64
Desktop environment : GNOME
Scaling factor : 1.000000
Detected scaling factor: 1.000000
Display PPI : 96x96
Display count : 1
Display 0 : XY=[0,0]; Size=[1854,1066]; Primary
wxWidgets Library (wxGTK port)
Version 3.2.2 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.38.
It looks like CB debugger plugin fails to set/unset the breakpoint
or is no longer understanding GDB responses.
Ubuntu CB Debugger log:
rying to interrupt process with pid: 3266; child pid: 3266 gdb pid: 3256
Continuing...
[debug]38 ./misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.
[debug]Thread 2 "pool-spawner" received signal SIGINT, Interrupt.
[debug][Switching to Thread 0x7ffff39ff6c0 (LWP 3266)]
[debug]syscall () at ./misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
[debug]>>>>>>cb_gdb:
It should look like: (from LinuxMint 21.2, gtk 3.0
Trying to interrupt process with pid: 2665; child pid: 2665 gdb pid: 2654
Continuing...
[debug]>>>>>>cb_gdb:
[debug]> break "/home/pecan/proj/cbDevel/trunk/src/sdk/wxscintilla/src/PlatWX.cpp:2133"
[debug]Breakpoint 2 at 0x7ffff6d935fe: file /home/pecan/proj/cbDevel/trunk/src/sdk/wxscintilla/src/PlatWX.cpp, line 2133.
[debug]>>>>>>cb_gdb:
[debug]> cont
[debug]Continuing.
IIRC there is a previous ticket where somebody found the origin of the problem: the plugin sends some commands concatenated in one line, but later expects a separate response to each command. I will try to find it.
User @tigerbeard published this about a similar issue in ticket [#174].
Related
Tickets: #174
@Miguel Gimenez
Thanks, that will be a good start to explore a fix.
Also: the forum discussion:
Discussion
Last edit: pecan 2024-02-23
@precan
the issue I found does not cause feezing of the interface and also the specific piece of code is not called when adding or removing a breakpoint during debug. Its only called when starting the debugger.
This has been fixed by dusting off and updating a previous version of CodeBlocks debuggerGDBmi plugin.
The combination of Ubuntu 23.10 and gttk3 is too complicated for the current version of CB debuggerGDB. The current version just cannot keep track of which output response goes with which input request and the possible error/info msgs in between.
GDBmi returns an id for each input command id, so responses can be matched with requests and error msgs and non-essential info can be printed, but ignored.