This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[delayed-symfile] [commit] Fix a regression on forgotten delayedread of a type info.


commit 0b71a223391a3f8304943b24956b1a6fcaba2a16

There was a regression on gdb.base/type-opaque.exp.

Currently the delayed reading is determined according to `.debug_aranges'.  But
in this case Archer needs to read-in type information - it has no associated
address range.  In the case of this testcase it could be fixed by reading in
also the indexing section `.debug_pubnames'.  Still it does not solve `static'
names which are not contained in `.debug_pubnames' - GCC should produce also
(currently not present in the DWARF standard) `.debug_privnames' suggested by
Tom Tromey on <archer@sourceware.org> before for this purpose.

Assuming (did not measure it so far) this patch will nullify any performance
effect of this archer-tromey-delayed-symfile branch.

	* symtab.c (basic_lookup_transparent_type): Call ALL_PSYMTABS_REQUIRED
	instead of ALL_PSYMTABS.  New comment.
---
 gdb/symtab.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5160eb4..25c0a81 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1829,7 +1829,11 @@ basic_lookup_transparent_type (const char *name)
       }
   }
 
-  ALL_PSYMTABS (objfile, ps)
+  /* FIXME: .debug_pubnames should be read in.
+     
+     One may also try to the first pass without the require_partial_symbols
+     call but that would behave nondeterministically.  */
+  ALL_PSYMTABS_REQUIRED (objfile, ps)
   {
     if (!ps->readin && lookup_partial_symbol (ps, name, NULL,
 					      1, STRUCT_DOMAIN))
@@ -1877,7 +1881,12 @@ basic_lookup_transparent_type (const char *name)
       }
   }
 
-  ALL_PSYMTABS (objfile, ps)
+  /* FIXME: Something like .debug_pubnames containing also static symbols
+     should be read in.  Compiler needs to be taught to generate it first.
+     
+     One may also try to the first pass without the require_partial_symbols
+     call but that would behave nondeterministically.  */
+  ALL_PSYMTABS_REQUIRED (objfile, ps)
   {
     if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN))
       {
-- 
1.6.0.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]