From: Tom Tromey <tromey@redhat.com>
To: Gary Benson <gbenson@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Add expansion_notify callback to expand_symtabs_matching
Date: Wed, 12 Feb 2014 20:10:00 -0000 [thread overview]
Message-ID: <878utgt7ls.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20140212115641.GB2866@blade.nx> (Gary Benson's message of "Wed, 12 Feb 2014 11:56:41 +0000")
>>>>> "Gary" == Gary Benson <gbenson@redhat.com> 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) <expand_symtabs_matching>: 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
next prev parent reply other threads:[~2014-02-12 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 11:55 [PATCH 0/2] Limit tab-completion result when list is large Gary Benson
2014-02-12 11:56 ` [PATCH 1/2] Add expansion_notify callback to expand_symtabs_matching Gary Benson
2014-02-12 20:10 ` Tom Tromey [this message]
2014-02-12 11:58 ` [PATCH 2/2] Implement completion limiting Gary Benson
2014-02-12 16:27 ` Eli Zaretskii
2014-02-12 16:41 ` Pedro Alves
2014-02-12 20:53 ` Gary Benson
2014-02-12 21:41 ` Pedro Alves
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=878utgt7ls.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gbenson@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