[Bug 1178539] Re: gdb 7.6 can take tens of seconds to resolve symbols in C++
Bug Watch Updater
1178539 at bugs.launchpad.net
Fri May 10 15:13:55 UTC 2013
Launchpad has imported 2 comments from the remote bug at
http://sourceware.org/bugzilla/show_bug.cgi?id=15454.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2013-05-10T05:08:00+00:00 Constantine Sapuntzakis wrote:
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
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1178539/comments/0
------------------------------------------------------------------------
On 2013-05-10T05:49:16+00:00 Constantine Sapuntzakis wrote:
The following diff works around the problem for me by disabling lookup
in base classes:
--- gdb-7.6~20130417/gdb/cp-namespace.c 2013-03-18 02:20:02.000000000 -0700
+++ gdb-7.6-mine/gdb/cp-namespace.c 2013-05-09 22:32:17.907659782 -0700
@@ -808,9 +808,7 @@
if (sym != NULL)
return sym;
- /* If no matching symbols were found, try searching any
- base classes. */
- return find_symbol_in_baseclass (parent_type, nested_name, block);
+ return NULL;
}
case TYPE_CODE_FUNC:
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1178539/comments/3
** Changed in: gdb
Status: Unknown => Confirmed
** Changed in: gdb
Importance: Unknown => Critical
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1178539
Title:
gdb 7.6 can take tens of seconds to resolve symbols in C++
Status in GNU Debugger:
Confirmed
Status in “gdb” package in Ubuntu:
New
Bug description:
See http://sourceware.org/bugzilla/show_bug.cgi?id=15454
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-0ubuntu1
Candidate: 7.6~20130417-0ubuntu1
Version table:
*** 7.6~20130417-0ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1178539/+subscriptions
More information about the foundations-bugs
mailing list