This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/11198] New: Performance problem in find_minsym_and_objfile
- From: "andre dot poenitz at nokia dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 20 Jan 2010 16:10:16 -0000
- Subject: [Bug symtab/11198] New: Performance problem in find_minsym_and_objfile
- Reply-to: sourceware-bugzilla at sourceware dot org
Each time I step the first time into code belonging to some library like QtCore
or QtGui, gdb goes to 100% CPU for 10-20 seconds. That time is spent almost
entirely in find_minsym_and_objfile (char *name, struct objfile **objfile_p) in
glibc-tdep.c. The change below removes the delay and does not seem to have ill
side-effects for me.
--- glibc-tdep.c.orig 2010-01-20 16:00:22.000000000 +0100
+++ glibc-tdep.c 2010-01-20 17:04:41.000000000 +0100
@@ -41,15 +41,12 @@
ALL_OBJFILES (objfile)
{
struct minimal_symbol *msym;
- ALL_OBJFILE_MSYMBOLS (objfile, msym)
- {
- if (SYMBOL_LINKAGE_NAME (msym)
- && strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
- {
+ msym = lookup_minimal_symbol (name, NULL, objfile);
+ if ( msym )
+ {
*objfile_p = objfile;
return msym;
- }
- }
+ }
}
--
Summary: Performance problem in find_minsym_and_objfile
Product: gdb
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: symtab
AssignedTo: unassigned at sourceware dot org
ReportedBy: andre dot poenitz at nokia dot com
CC: gdb-prs at sourceware dot org
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=11198
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.