From 165195f46ba47b0019806c1cd15e80862e5f89cd Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 28 Apr 2011 17:37:06 +0000 Subject: [PATCH] gdb/ * symtab.c (expand_partial_symbol_name): New variable NCMP. Support case insensitive comparison. --- gdb/ChangeLog | 5 +++++ gdb/symtab.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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 ** -- 2.30.2