From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] [gdb/symtab] Add maint expand-symtabs -verbose
Date: Sun, 9 Jan 2022 21:34:20 -0500 [thread overview]
Message-ID: <cac21df3-d122-c0e0-802b-a67c80d9a0c6@polymtl.ca> (raw)
In-Reply-To: <20211112171657.7686-2-tdevries@suse.de>
> diff --git a/gdb/symmisc.c b/gdb/symmisc.c
> index e38ceb6bda1..7597487201e 100644
> --- a/gdb/symmisc.c
> +++ b/gdb/symmisc.c
> @@ -904,6 +904,7 @@ maintenance_check_symtabs (const char *ignore, int from_tty)
> static void
> maintenance_expand_symtabs (const char *args, int from_tty)
> {
> + bool verbose = args != nullptr && check_for_argument (&args, "-verbose");
IWBN to use gdb::option::process_options for any new option we add.
> char *regexp = NULL;
>
> /* We use buildargv here so that we handle spaces in the regexp
> @@ -923,6 +924,17 @@ maintenance_expand_symtabs (const char *args, int from_tty)
> if (regexp)
> re_comp (regexp);
>
> + auto on_expansion = [&] (compunit_symtab *symtab)
> + {
> + if (verbose)
> + printf_filtered ("Expanded symtab for file %s at %s\n",
> + symtab_to_fullname (COMPUNIT_FILETABS (symtab)),
> + host_address_to_string (symtab));
> +
> + /* Keep going. */
> + return true;
> + };
I think we usually format them with one more indentation level, as if it was
a control flow structure:
auto on_expansion = [&] (compunit_symtab *symtab)
{
...
}
Simon
next prev parent reply other threads:[~2022-01-10 2:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 17:16 [PATCH 1/2] [gdb/symtab] Fix segfault in search_one_symtab Tom de Vries
2021-11-12 17:16 ` [PATCH 2/2] [gdb/symtab] Add maint expand-symtabs -verbose Tom de Vries
2022-01-03 14:53 ` [PING][PATCH " Tom de Vries
2022-01-08 10:55 ` Joel Brobecker
2022-01-10 2:34 ` Simon Marchi [this message]
2021-11-13 14:51 ` [PATCH 1/2] [gdb/symtab] Fix segfault in search_one_symtab Simon Marchi
2021-11-15 12:58 ` Tom de Vries
2021-11-22 19:29 ` [PING][PATCH " Tom de Vries
2021-11-29 13:51 ` [PATCH " Simon Marchi
2021-11-29 15:22 ` Tom de Vries
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=cac21df3-d122-c0e0-802b-a67c80d9a0c6@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).