User forums > Using Code::Blocks
Very slow stepping while debugging on Linux
bsccara:
I'm running Code::Blocks svn-r13284, compiled with GCC 11.3.0, and using GDB 12.1 to debug a program compiled to Linux 64 bits. The OS is Kubuntu 22.04 and is running on a AMD Phenom(tm) II X4 955 with 6 GB of RAM.
Stepping through my program's C++ code is very slow, taking up to several seconds to update the UI after a single step and hanging the debugging session if F7 is pressed multiples times without waiting for the UI to refresh, requiring killing the GDB process. If the machine is loaded with other real-time tasks I may even get an error message shown on a dialog box complaining about pipe problems.
This happens even without any watches setup but is clearly worse the more / bigger watches there are.
Are there any known mitigations for this ? I've found other posts reporting the same issue but no real answers.
ollydbg:
--- Quote from: bsccara on October 22, 2023, 01:37:49 am ---This happens even without any watches setup but is clearly worse the more / bigger watches there are.
--- End quote ---
Do you have enable the option: "Watch function arguments" and "Watch local variables"? Those options are in the Settings->Debugger setting dialog.
I normally disable those two options. Because when you run each step command, C::B(GDB debugger plugin) will ask GDB to fetch all the function arguments and local variables, and refresh the watch window.
If you have many function arguments and local variables, the communication will be slow. There are several reasons, one big reason is currently GDB debugger plugin is not using the MI interface, but Using the old (deprecated) annotations mechanism (please fix them!), I see Code::Blocks listed in that wiki. :(
Note that I think parsing the text returned by GDB CLI is slow. The more watches you add, the slower it will become.
I think if we switch to MI, the speed will be improved, but maybe, there are modern interfaces such as: Debug Adapter Protocol (DAP) for communication between debuggers and IDEs , maybe it is faster and better.
Pecan:
There are plans to develop a debugger DAP client to GDB.
It'll take quite awhile.
It will not be in the coming release.
bsccara:
ollydbg, this happens even with an empty watch list.
ollydbg:
--- Quote from: bsccara on October 22, 2023, 01:27:24 pm ---ollydbg, this happens even with an empty watch list.
--- End quote ---
That's strange, I don't have slow debugging issue, maybe you can share the debugger plugin log?
Navigation
[0] Message Index
[#] Next page
Go to full version