gdb 7.6 can take tens of seconds to resolve symbols in C++
Bug #1178539 reported by
Constantine Sapuntzakis
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdb |
Unknown
|
Unknown
|
|||
gdb (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
See http://
filed by me.
Reverting 677b1bf from the gdb git repository fixes the problem.
In this revision, gdb started searching the base classes for the symbol too. The algorithm seems to require optimization.
Meanwhile, the problem can be worked with a one-line diff that reverts the behavior to the pre-677b1bf. Attaching the patch
lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04
gdb:
Installed: 7.6~20130417-
Candidate: 7.6~20130417-
Version table:
*** 7.6~20130417-
500 http://
100 /var/lib/
tags: | added: raring |
Changed in gdb: | |
importance: | Unknown → Critical |
status: | Unknown → Confirmed |
To post a comment you must log in.
Created attachment 7020
breakpoint trace
It takes minutes for GDB to find a symbol (vol::content_ lh_key in this case) defined in a global namespace unless I prefix the symbol with ::
It seems to search for vol in the namespaces of all classes that the current class inherits from. This is ok, but it seems to repeat the search on the same symbol many times over.
I ran gdb against gdb and capture a bunch of stack traces during the symbol lookup. The file is attached.
break cp_lookup_ symbol_ in_namespace
silent
bt 4
print "\n\n"
cont
end