This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix thinko in forget_cached_source_info_for_objfile
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Sat, 5 Nov 2011 21:31:10 -0700 (PDT)
- Subject: [commit] Fix thinko in forget_cached_source_info_for_objfile
Hi.
A "dir" command was taking too long and I traced it to this.
Committed.
2011-11-05 Doug Evans <dje@google.com>
* source.c (forget_cached_source_info_for_objfile): Move call to
objfile->sf->qf->forget_cached_source_info outside of
ALL_OBJFILE_SYMTABS loop.
(forget_cached_source_info): Delete unused variable `s'.
Index: source.c
===================================================================
RCS file: /cvs/src/src/gdb/source.c,v
retrieving revision 1.124
diff -u -p -r1.124 source.c
--- source.c 4 Aug 2011 19:10:12 -0000 1.124
+++ source.c 6 Nov 2011 03:49:11 -0000
@@ -355,10 +355,10 @@ forget_cached_source_info_for_objfile (s
xfree (s->fullname);
s->fullname = NULL;
}
-
- if (objfile->sf)
- objfile->sf->qf->forget_cached_source_info (objfile);
}
+
+ if (objfile->sf)
+ objfile->sf->qf->forget_cached_source_info (objfile);
}
/* Forget what we learned about line positions in source files, and
@@ -369,7 +369,6 @@ void
forget_cached_source_info (void)
{
struct program_space *pspace;
- struct symtab *s;
struct objfile *objfile;
ALL_PSPACES (pspace)