Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » GDB take a while to display variable
GDB take a while to display variable [message #635755] Wed, 27 October 2010 21:24 Go to next message
Eclipse UserFriend
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 #635786 is a reply to message #635755] Thu, 28 October 2010 02:38 Go to previous messageGo to next message
Eclipse UserFriend
Does it happen all the time for all types of variables? Or only for STL types?
What is printed in the GDB console during this time? You can activate the GDB traces in Preferences->C/C++->Debug->GDB

Re: GDB take a while to display variable [message #636370 is a reply to message #635786] Sun, 31 October 2010 14:39 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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)?
Re: GDB take a while to display variable [message #637618 is a reply to message #636688] Sun, 07 November 2010 17:15 Go to previous messageGo to next message
Eclipse UserFriend
Sorry for the delay.

Yes I have pretty printers for STL only. But I installed them a week or 2 ago and the problem occurred before.

FYI, I have this in the gdb output when I try to look at a variable :
warning: can't find linker symbol for virtual table for `boost::detail::shared_count' value

Does it ring a bell?

Thanks.
Re: GDB take a while to display variable [message #640462 is a reply to message #637618] Mon, 22 November 2010 03:40 Go to previous messageGo to next message
Eclipse UserFriend
Philippe Cayouette wrote on Sun, 07 November 2010 23:15
Sorry for the delay.

Yes I have pretty printers for STL only. But I installed them a week or 2 ago and the problem occurred before.

FYI, I have this in the gdb output when I try to look at a variable :
warning: can't find linker symbol for virtual table for `boost::detail::shared_count' value

Does it ring a bell?

Thanks.

I see something similar sometimes when I debug an application that uses Qt. The gdb output shows several warnings about not finding linker symbol for virtual table. gdb CPU usage then goes up to 100% and debugging gets very slow. At the moment I don't how to fix the problem but I have found the following bug reports. Perhaps it will help you (and me).
http://sourceware.org/bugzilla/show_bug.cgi?id=11990
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=188627
Re: GDB take a while to display variable [message #641447 is a reply to message #640462] Thu, 25 November 2010 09:29 Go to previous messageGo to next message
Eclipse UserFriend
Well, I have installed GDB 7.2 and the problem is completely gone! So if anyone encouter that kind of problem, try to update!
Re: GDB take a while to display variable [message #997716 is a reply to message #641447] Tue, 08 January 2013 10:40 Go to previous message
Eclipse UserFriend
Hello guys

I'm using GDB 7.4 with STL python pretty printers, and have disabled the "Use enhanced debug hover" option. But I still have the same problem, seems to be with STL types. My CPUs (I have 8 cores) are so overloaded that its a complete crash of the system. Disabling the pretty printers solves it, but... I need them Razz.

What do you think I should try ? I doubt to be the only one here to suffer from that.

Cheers
Previous Topic:how to install gcc in eclipse on windows 7
Next Topic:debugContextEvent information
Goto Forum:
  


Current Time: Mon Jun 30 23:15:38 EDT 2025

Powered by FUDForum. Page generated in 0.29853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top