GDB debug very slow with big variables [message #1767833] |
Tue, 11 July 2017 09:07  |
Eclipse User |
|
|
|
Hi everyone,
I have the issue that debugging with GDB in eclipse CDT gets extremely slow when large lists/variables/vectors are involved. When I hover over a large variable or have the "Variables" view open it takes sometimes 5-10 minutes to show the values.
In that time I can not continue stepping through the program.
When the variables are shown finally and I step forward I have to wait again more than 5 minutes until it shows the updated variables. I tried everything I found on the internet to speed up, but nothing worked.
Please see my eclipse GDB config below.
I'm running ubuntu 14.04 with Eclipse Oxygen and GDB 7.7.1.
I activated the GDB traces view and it gets stuck at
805,391 (gdb)
805,398 103-stack-list-locals --thread 1 --frame 0 1
805,400 104-stack-list-frames --thread 1
before finally showing the content of the huge variables and then:
219,344 (gdb)
219,345 104^done,stack=[frame={level="0",addr="0x00000000004072b0",func="sfm_reconstruct",file="sfmr\
econ.cc",fullname="/home/john/development/mve/apps/sfmrecon/sfmrecon.cc",line="233"},frame={level\
="1",addr="0x0000000000409d3a",func="main",file="sfmrecon.cc",fullname="/home/john/development/mv\
e/apps/sfmrecon/sfmrecon.cc",line="635"}]
219,345 (gdb)
When debugging with GDB in the terminal and print "p bigVariable" it shows immediately only a small fraction without any delay. Then I can show more or quit showing the variable. I think that must also be possible with Eclipse, otherwise I can't debug big programs with Eclipse.
Do you have any idea how can I configure Eclipse/GDB to show only a fraction of the variables??? The config below doesn't seem to work though. I am quite desperate at the moment.
Thank you very much,
John
|
|
|
|
|
|
|
|
|
|
|
Re: GDB debug very slow with big variables [message #1771972 is a reply to message #1767833] |
Fri, 01 September 2017 18:37  |
Eclipse User |
|
|
|
First, I would like to thank everyone for their efforts to diagnose and resolve these problems.
I have also had very serious Eclipse (Oxygen/CDT 4.7.0) problems with GDB. Single-step performance (F5/F6) has been terrible (several seconds per step with 100% GDB CPU usage). My GDB version is 8.0.
I was able to get around these problems in a trivial way that actually worked. I clicked on the Breakpoints tab and made sure that the Variables tab was in the background. This absurdly simple change improved performance drastically.
|
|
|
Powered by
FUDForum. Page generated in 0.07596 seconds