From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2485 invoked by alias); 2 Jun 2017 12:23:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2423 invoked by uid 89); 2 Jun 2017 12:23:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Jun 2017 12:23:20 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9E48C04B93B for ; Fri, 2 Jun 2017 12:23:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C9E48C04B93B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C9E48C04B93B Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 556255C54A for ; Fri, 2 Jun 2017 12:23:19 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 38/40] Use TOLOWER in SYMBOL_HASH_NEXT Date: Fri, 02 Jun 2017 12:23:00 -0000 Message-Id: <1496406158-12663-39-git-send-email-palves@redhat.com> In-Reply-To: <1496406158-12663-1-git-send-email-palves@redhat.com> References: <1496406158-12663-1-git-send-email-palves@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-06/txt/msg00022.txt.bz2 The ABI tags patch will add a use of SYMBOL_HASH_NEXT in cp-support.c, which fails to compile with: src/gdb/cp-support.c:38:0: src/gdb/cp-support.c: In function ‘unsigned int cp_search_name_hash(const char*)’: src/gdb/../include/safe-ctype.h:148:20: error: ‘do_not_use_tolower_with_safe_ctype’ was not declared in this scope #define tolower(c) do_not_use_tolower_with_safe_ctype ^ src/gdb/minsyms.h:174:18: note: in expansion of macro ‘tolower’ ((hash) * 67 + tolower ((unsigned char) (c)) - 113) ^ src/gdb/cp-support.c:1677:14: note: in expansion of macro ‘SYMBOL_HASH_NEXT’ hash = SYMBOL_HASH_NEXT (hash, *string); ^ This fixes the problem before it happens. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * dictionary.c: Include "safe-ctype.h". * minsyms.c: Include "safe-ctype.h". * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower. --- gdb/dictionary.c | 1 + gdb/minsyms.c | 1 + gdb/minsyms.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/dictionary.c b/gdb/dictionary.c index 87e05d6..079bb04 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -26,6 +26,7 @@ #include "symtab.h" #include "buildsym.h" #include "dictionary.h" +#include "safe-ctype.h" /* This file implements dictionaries, which are tables that associate symbols to names. They are represented by an opaque type 'struct diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 842ae07..9751321 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -52,6 +52,7 @@ #include "cli/cli-utils.h" #include "symbol.h" #include +#include "safe-ctype.h" /* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE. At the end, copy them all into one newly allocated location on an objfile's diff --git a/gdb/minsyms.h b/gdb/minsyms.h index c4a1d21..faff881 100644 --- a/gdb/minsyms.h +++ b/gdb/minsyms.h @@ -171,7 +171,7 @@ unsigned int msymbol_hash_iw (const char *); requirements. */ #define SYMBOL_HASH_NEXT(hash, c) \ - ((hash) * 67 + tolower ((unsigned char) (c)) - 113) + ((hash) * 67 + TOLOWER ((unsigned char) (c)) - 113) -- 2.5.5