[21/40] Use SYMBOL_MATCHES_SEARCH_NAME some more

Message ID 1496406158-12663-22-git-send-email-palves@redhat.com
State New, archived
Headers

Commit Message

Pedro Alves June 2, 2017, 12:22 p.m. UTC
  gdb/ChangeLog:
yyyy-mm-dd  Pedro Alves  <palves@redhat.com>

	* dwarf2read.c (dw2_lookup_symbol): Use
	SYMBOL_MATCHES_SEARCH_NAME.
	* psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
---
 gdb/dwarf2read.c | 4 ++--
 gdb/psymtab.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
  

Comments

Keith Seitz July 17, 2017, 9:39 p.m. UTC | #1
On 06/02/2017 05:22 AM, Pedro Alves wrote:
> gdb/ChangeLog:
> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
> 
> 	* dwarf2read.c (dw2_lookup_symbol): Use
> 	SYMBOL_MATCHES_SEARCH_NAME.
> 	* psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.

I'd say that falls under the "obvious" banner, no? ;-)

Keith
  
Pedro Alves July 20, 2017, 5:08 p.m. UTC | #2
On 07/17/2017 10:39 PM, Keith Seitz wrote:
> On 06/02/2017 05:22 AM, Pedro Alves wrote:
>> gdb/ChangeLog:
>> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
>>
>> 	* dwarf2read.c (dw2_lookup_symbol): Use
>> 	SYMBOL_MATCHES_SEARCH_NAME.
>> 	* psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
> 
> I'd say that falls under the "obvious" banner, no? ;-)

I guess.  :-)  I pushed it in.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 439257f..7fade00 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3850,10 +3850,10 @@  dw2_lookup_symbol (struct objfile *objfile, int block_index,
 	     information (but NAME might contain it).  */
 
 	  if (sym != NULL
-	      && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
+	      && SYMBOL_MATCHES_SEARCH_NAME (sym, name))
 	    return stab;
 	  if (with_opaque != NULL
-	      && strcmp_iw (SYMBOL_SEARCH_NAME (with_opaque), name) == 0)
+	      && SYMBOL_MATCHES_SEARCH_NAME (with_opaque, name))
 	    stab_best = stab;
 
 	  /* Keep looking through other CUs.  */
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index bb482ee..4077fb3 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -529,10 +529,10 @@  psym_lookup_symbol (struct objfile *objfile,
 	   information (but NAME might contain it).  */
 
 	if (sym != NULL
-	    && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
+	    && SYMBOL_MATCHES_SEARCH_NAME (sym, name))
 	  return stab;
 	if (with_opaque != NULL
-	    && strcmp_iw (SYMBOL_SEARCH_NAME (with_opaque), name) == 0)
+	    && SYMBOL_MATCHES_SEARCH_NAME (with_opaque, name))
 	  stab_best = stab;
 
 	/* Keep looking through other psymtabs.  */