Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sourceware.org
Subject: [RFA] Pre-expand psymtabs for STATIC_BLOCK types
Date: Thu, 22 Jul 2010 22:11:00 -0000	[thread overview]
Message-ID: <4C48C209.10708@redhat.com> (raw)

[-- 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);
+	  }
       }
   }
 

             reply	other threads:[~2010-07-22 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 22:11 Keith Seitz [this message]
2010-07-23 17:21 ` Tom Tromey
2010-07-23 17:43   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C48C209.10708@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox