From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20361 invoked by alias); 12 Feb 2014 20:10:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20350 invoked by uid 89); 12 Feb 2014 20:10:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Feb 2014 20:10:43 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1CKAeOE010638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Feb 2014 15:10:41 -0500 Received: from barimba (ovpn-113-148.phx2.redhat.com [10.3.113.148]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s1CKAdZ2013051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 12 Feb 2014 15:10:40 -0500 From: Tom Tromey To: Gary Benson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] Add expansion_notify callback to expand_symtabs_matching References: <20140212115548.GA2866@blade.nx> <20140212115641.GB2866@blade.nx> Date: Wed, 12 Feb 2014 20:10:00 -0000 In-Reply-To: <20140212115641.GB2866@blade.nx> (Gary Benson's message of "Wed, 12 Feb 2014 11:56:41 +0000") Message-ID: <878utgt7ls.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-02/txt/msg00437.txt.bz2 >>>>> "Gary" == Gary Benson writes: Gary> This patch adds a new callback parameter, "expansion_notify", to the Gary> top-level expand_symtabs_matching function and to all the vectorized Gary> functions it defers to. If expansion_notify is non-NULL, it will be Gary> called every time a psymtab is expanded to a symtab. Gary> * symfile.h (struct partial_symtab): New forward declaration. Gary> (expand_symtabs_exp_notify_ftype): New typedef. Gary> (struct quick_symbol_functions) : New Gary> parameter "expansion_notify". All uses updated. Gary> (expand_symtabs_matching): Likewise. Gary> * psymtab.c (expand_symtabs_matching_via_partial): New Gary> parameter "expansion_notify". If non-NULL, call it prior Gary> to calling psymtab_to_symtab. The ChangeLog doesn't mention the dwarf2read change. Gary> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c Gary> index 54c538a..f9da5db 100644 Gary> --- a/gdb/dwarf2read.c Gary> +++ b/gdb/dwarf2read.c Gary> @@ -3773,6 +3773,7 @@ dw2_expand_symtabs_matching Gary> (struct objfile *objfile, Gary> expand_symtabs_file_matcher_ftype *file_matcher, Gary> expand_symtabs_symbol_matcher_ftype *symbol_matcher, Gary> + expand_symtabs_exp_notify_ftype *expansion_notify, Gary> enum search_domain kind, Gary> void *data) Gary> { I think this ought to call the callback after it calls dw2_instantiate_symtab. Otherwise you will miss some symtab expansions if your program is using .gdb_index. Tom