From: "Simon Marchi (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>,
Tom Tromey <tromey@sourceware.org>
Subject: [review v7] gdb/mi: Add new commands -symbol-info-{functions,variables,types}
Date: Wed, 27 Nov 2019 04:11:00 -0000 [thread overview]
Message-ID: <20191127041113.AC97420AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1571909344000.Ic2fc6a6750bbce91cdde2344791014e5ef45642d@gnutoolchain-gerrit.osci.io>
Simon Marchi has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/266
......................................................................
Patch Set 7: Code-Review+1
(2 comments)
Sorry about my previous message, operator error.
This LGTM with the nits I pointed out addressed.
| --- gdb/mi/mi-symbol-cmds.c
| +++ gdb/mi/mi-symbol-cmds.c
| @@ -62,0 +79,19 @@ output_debug_symbol (ui_out *uiout, enum search_domain kind,
| + uiout->field_string ("name", sym->print_name ());
| +
| + if (kind == FUNCTIONS_DOMAIN || kind == VARIABLES_DOMAIN)
| + {
| + string_file tmp_stream;
| + type_print (SYMBOL_TYPE (sym), "", &tmp_stream, -1);
| + uiout->field_string ("type", tmp_stream.string ());
| +
| + std::string str = symbol_to_info_string (sym, block, kind);
| + uiout->field_string ("description", str.c_str ());
PS7, Line 88:
There's an overload of field_string that takes an std::string
directly. Might as well use that.
| + }
| +}
| +
| +/* Actually output one nondebug symbol, puts a tuple emitter in place
| + and then outputs the fields for this msymbol. */
| +
| +static void
| +output_nondebug_symbol (ui_out *uiout,
| + const struct bound_minimal_symbol &msymbol)
...
| @@ -62,0 +155,19 @@ mi_symbol_info (enum search_domain kind, const char *regexp,
| + /* Non-debug symbols are placed after. */
| + if (i < symbols.size ())
| + {
| + ui_out_emit_list nondebug_symbols_list_emitter (uiout, "nondebug");
| +
| + /* As long as we have nondebug symbols... */
| + for (; i < symbols.size (); i++)
| + {
| + gdb_assert (symbols[i].msymbol.minsym != nullptr);
| + output_nondebug_symbol(uiout, symbols[i].msymbol);
PS7, Line 164:
Missing space here too.
| + }
| + }
| +}
| +
| +/* Helper for mi_cmd_symbol_info_{functions,variables} - depending on KIND.
| + Processes command line options from ARGV and ARGC. */
| +
| +static void
| +mi_info_functions_or_variables (enum search_domain kind, char **argv, int argc)
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ic2fc6a6750bbce91cdde2344791014e5ef45642d
Gerrit-Change-Number: 266
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Joel Brobecker <brobecker@adacore.com>
Gerrit-Comment-Date: Wed, 27 Nov 2019 04:11:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
next prev parent reply other threads:[~2019-11-27 4:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <gerrit.1571909344000.Ic2fc6a6750bbce91cdde2344791014e5ef45642d@gnutoolchain-gerrit.osci.io>
2019-10-30 15:02 ` [review] " Tom Tromey (Code Review)
2019-11-01 1:28 ` [review v2] " Andrew Burgess (Code Review)
2019-11-01 1:36 ` Andrew Burgess (Code Review)
2019-11-08 0:50 ` [review v3] " Andrew Burgess (Code Review)
2019-11-08 10:10 ` Eli Zaretskii
2019-11-21 5:39 ` Simon Marchi (Code Review)
2019-11-22 16:42 ` [review v4] " Andrew Burgess (Code Review)
2019-11-22 19:29 ` Eli Zaretskii
2019-11-22 17:32 ` [review v5] " Andrew Burgess (Code Review)
2019-11-26 23:26 ` [review v6] " Andrew Burgess (Code Review)
2019-11-26 23:46 ` [review v7] " Andrew Burgess (Code Review)
2019-11-27 4:08 ` Simon Marchi (Code Review)
2019-11-27 4:11 ` Simon Marchi (Code Review) [this message]
2019-11-27 13:03 ` [pushed] " Sourceware to Gerrit sync (Code Review)
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=20191127041113.AC97420AF6@gnutoolchain-gerrit.osci.io \
--to=gerrit@gnutoolchain-gerrit.osci.io \
--cc=andrew.burgess@embecosm.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=gnutoolchain-gerrit@osci.io \
--cc=tromey@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