From: Jan Kratochvil Date: Thu, 28 Apr 2011 17:37:06 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=165195f46ba47b0019806c1cd15e80862e5f89cd;p=binutils-gdb.git gdb/ * symtab.c (expand_partial_symbol_name): New variable NCMP. Support case insensitive comparison. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bcbff9e58e6..96e27346e8a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-04-28 Jan Kratochvil + + * symtab.c (expand_partial_symbol_name): New variable NCMP. Support + case insensitive comparison. + 2011-04-28 Ulrich Weigand * infrun.c (proceed): Revert previous change. diff --git a/gdb/symtab.c b/gdb/symtab.c index f9e2bca8dbc..d98ac5720e6 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -3707,8 +3707,11 @@ static int expand_partial_symbol_name (const char *name, void *user_data) { struct add_name_data *datum = (struct add_name_data *) user_data; + int (*ncmp) (const char *, const char *, size_t); + + ncmp = (case_sensitivity == case_sensitive_on ? strncmp : strncasecmp); - return strncmp (name, datum->sym_text, datum->sym_text_len) == 0; + return ncmp (name, datum->sym_text, datum->sym_text_len) == 0; } char **