GDB take a while to display variable [message #635755] |
Wed, 27 October 2010 21:24  |
Eclipse User |
|
|
|
Hi all,
When I am debugging my C++ program, sometimes when I want to look at the value of variables (e.g. stl::vector), as soon as I click on the variable in the debug perspective, the gdb process takes 100% cpu for more than 30 seconds and finally come back with a result in the display window underneath.
Someone having similar things happening?
Here is my setup:
Ubuntu 10.04 (gdb and gnu from synaptic)
Eclipse/CDT 3.6 directly from web, no mod
Thanks.
|
|
|
|
Re: GDB take a while to display variable [message #636370 is a reply to message #635786] |
Sun, 31 October 2010 14:39   |
Eclipse User |
|
|
|
Not only for STL types, all variable types were problematic. I can think of boost::shared_ptr, and my own types.
Actually the problem was deeper than only when I tried to look at variables, sometimes, each debug steps were very, very slow with the CPU at 100% (gdb process) between each steps...
However, when I browsed to the Preference page as you suggested, I saw something that caught my attention: under C/C++->Debug->GDB there is a "Use enhanced debug hover" checkbox that was checked. In fact it was the "enhanced" that got me wondering, usually when I see that kind of phrasing, I get suspicious if I am looking for problems. I unchecked it, just to put my assumption to test and guess what: I have no more slow downs between debugging steps or when I try to look at variables (so far)!
Formidable.
|
|
|
Re: GDB take a while to display variable [message #636688 is a reply to message #636370] |
Tue, 02 November 2010 09:25   |
Eclipse User |
|
|
|
Philippe Cayouette wrote on Sun, 31 October 2010 19:39 | Not only for STL types, all variable types were problematic. I can think of boost::shared_ptr, and my own types.
Actually the problem was deeper than only when I tried to look at variables, sometimes, each debug steps were very, very slow with the CPU at 100% (gdb process) between each steps...
However, when I browsed to the Preference page as you suggested, I saw something that caught my attention: under C/C++->Debug->GDB there is a "Use enhanced debug hover" checkbox that was checked. In fact it was the "enhanced" that got me wondering, usually when I see that kind of phrasing, I get suspicious if I am looking for problems. I unchecked it, just to put my assumption to test and guess what: I have no more slow downs between debugging steps or when I try to look at variables (so far)!
Formidable.
|
That's interesting. Do you have a Python pretty printer installed for STL and Boost? Do your variables have a lot of children (the enhanced debug hover will show them)?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29853 seconds