[review v2] Replace SYMBOL_*_NAME accessors with member functions
Simon Marchi (Code Review)
gerrit@gnutoolchain-gerrit.osci.io
Fri Nov 22 01:21:00 GMT 2019
Simon Marchi has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/689
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Thanks, that LGTM.
| --- gdb/symtab.c
| +++ gdb/symtab.c
| @@ -6366,16 +6364,18 @@ search_module_symbols (const char *module_regexp, const char *regexp,
| + std::string prefix = p.symbol->print_name ();
| prefix += "::";
|
| for (const symbol_search &q : symbols)
| {
| if (q.symbol == nullptr)
| continue;
|
| - if (strncmp (SYMBOL_PRINT_NAME (q.symbol), prefix.c_str (),
| + /* TODO: should this use startswith()? */
PS2, Line 6372:
Maybe? That's orthogonal to this patch though, feel free to send a
patch on top to change it.
| + if (strncmp (q.symbol->print_name (), prefix.c_str (),
| prefix.size ()) != 0)
| continue;
|
| results.push_back ({p, q});
| }
| }
|
| return results;
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I76bdc8b44eea6876bf03af9d351f8e90cc0154b2
Gerrit-Change-Number: 689
Gerrit-PatchSet: 2
Gerrit-Owner: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Fri, 22 Nov 2019 01:21:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
More information about the Gdb-patches
mailing list