This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] psymtab.c (map_symbol_filenames_psymtab): Skip shared psymtabs.
- From: dje at google dot com (Doug Evans)
- To: tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Tue, 10 Jul 2012 13:57:21 -0700 (PDT)
- Subject: [RFC] psymtab.c (map_symbol_filenames_psymtab): Skip shared psymtabs.
Hi.
I don't know if this patch is correct or not.
It looked odd that partial_map_symtabs_matching_filename
and expand_symtabs_matching_via_partial skip shared symtabs but
map_symbol_filenames_psymtab does not.
2012-07-10 Doug Evans <dje@google.com>
* psymtab.c (map_symbol_filenames_psymtab): Skip shared psymtabs.
Index: psymtab.c
===================================================================
RCS file: /cvs/src/src/gdb/psymtab.c,v
retrieving revision 1.50
diff -u -p -r1.50 psymtab.c
--- psymtab.c 10 Jul 2012 20:17:30 -0000 1.50
+++ psymtab.c 10 Jul 2012 20:53:14 -0000
@@ -1159,6 +1159,11 @@ map_symbol_filenames_psymtab (struct obj
if (ps->readin)
continue;
+ /* We can skip shared psymtabs here, because any file name will be
+ attached to the unshared psymtab. */
+ if (ps->user != NULL)
+ continue;
+
/* Anonymous psymtabs don't have a file name. */
if (ps->anonymous)
continue;