[review v2] Replace SYMBOL_*_NAME accessors with member functions

Christian Biesinger (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Fri Nov 22 18:03:00 GMT 2019


Christian Biesinger has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/689
......................................................................


Patch Set 2:

(1 comment)

| --- 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:

OK, will remove this TODO and push this.

| +	  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: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Fri, 22 Nov 2019 18:03:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list