Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Pre-expand psymtabs for STATIC_BLOCK types
@ 2010-07-22 22:11 Keith Seitz
  2010-07-23 17:21 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2010-07-22 22:11 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

Hi,

In basic_lookup_transparent_type, we call the pre-expand psymtabs hook 
for the GLOBAL_BLOCK but not for the STATIC_BLOCK. I believe this was a 
simple omission (as opposed to intentional).

Ok?

Keith

ChangeLog
  2010-07-22  Keith Seitz  <keiths@redhat.com>

	* symtab.c (basic_lookup_transparent_type): Call pre-expand
	hook for STATIC_BLOCK types, too.

[-- Attachment #2: pre-expand-static.patch --]
[-- Type: text/plain, Size: 1100 bytes --]

Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.245
diff -u -p -r1.245 symtab.c
--- symtab.c	16 Jul 2010 19:23:56 -0000	1.245
+++ symtab.c	22 Jul 2010 22:03:05 -0000
@@ -1642,14 +1642,21 @@ basic_lookup_transparent_type (const cha
      conversion on the fly and return the found symbol.
    */
 
-  ALL_PRIMARY_SYMTABS (objfile, s)
+  ALL_OBJFILES (objfile)
   {
-    bv = BLOCKVECTOR (s);
-    block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
-    sym = lookup_block_symbol (block, name, STRUCT_DOMAIN);
-    if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
+    if (objfile->sf)
+      objfile->sf->qf->pre_expand_symtabs_matching (objfile, STATIC_BLOCK,
+						    name, STRUCT_DOMAIN);
+
+    ALL_OBJFILE_SYMTABS (objfile, s)
       {
-	return SYMBOL_TYPE (sym);
+	bv = BLOCKVECTOR (s);
+	block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+	sym = lookup_block_symbol (block, name, STRUCT_DOMAIN);
+	if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
+	  {
+	    return SYMBOL_TYPE (sym);
+	  }
       }
   }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-23 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 22:11 [RFA] Pre-expand psymtabs for STATIC_BLOCK types Keith Seitz
2010-07-23 17:21 ` Tom Tromey
2010-07-23 17:43   ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox