From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110899 invoked by alias); 20 Jun 2019 09:33:08 -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 110890 invoked by uid 89); 20 Jun 2019 09:33:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Jun 2019 09:33:06 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 67476AE2E; Thu, 20 Jun 2019 09:33:04 +0000 (UTC) Date: Thu, 20 Jun 2019 09:33:00 -0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Andreas Arnez Subject: [committed][gdbserver] Fix s390x -m31 gdbserver build Message-ID: <20190620093300.GA6338@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00400.txt.bz2 Hi, When building gdb on s390x with -m31, we run into this error: ... gdb/gdbserver/linux-s390-ipa.c: \ In function 'const target_desc* get_ipa_tdesc(int)': gdb/gdbserver/linux-s390-ipa.c:371:18: error: 's390_te_ft_collect_regmap' \ was not declared in this scope SET_REGMAP(s390_te_ft_collect_regmap, 0); The offending line is part of this code snippet: ... case S390_TDESC_GS: SET_REGMAP(s390_te_ft_collect_regmap, 0); return tdesc_s390_gs_linux64; ... introduced in commit ce29f8439f "S390: Make IPA recognize tdescs with guarded storage". The snippet is part of an #ifdef __s390x__ construct, in the false branch, and in the true branch we find a snippet introduced by the same commit: ... case S390_TDESC_GS: SET_REGMAP(s390x_te_ft_collect_regmap, 0); return tdesc_s390x_gs_linux64; ... which is paired with a comment update for s390x_te_ft_collect_regmap: ... -/* Used for s390x-te-linux64, s390x-tevx-linux64. */ +/* Used for s390x-te-linux64, s390x-tevx-linux64, and + s390x-gs-linux64. */ static const int s390x_te_ft_collect_regmap[] = { ... A similar comment update is added in the same commit for s390_te_linux64_ft_collect_regmap: ... -/* Used for s390-te-linux64, s390-tevx-linux64. */ +/* Used for s390-te-linux64, s390-tevx-linux64, and s390-gs-linux64. */ static const int s390_te_linux64_ft_collect_regmap[] = { ... but not paired with any update. Fix the build breaker by making the offending SET_REGMAP use the regmap indicated by the comment. ... - SET_REGMAP(s390_te_ft_collect_regmap, 0); + SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0); ... Build on s390x-linux with -m31. Committed to trunk. Thanks, - Tom [gdbserver] Fix s390x -m31 gdbserver build gdb/gdbserver/ChangeLog: 2019-06-20 Tom de Vries * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use s390_te_linux64_ft_collect_regmap for S390_TDESC_GS. --- gdb/gdbserver/linux-s390-ipa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/gdbserver/linux-s390-ipa.c b/gdb/gdbserver/linux-s390-ipa.c index 7697cd9cbd..d01f5c4109 100644 --- a/gdb/gdbserver/linux-s390-ipa.c +++ b/gdb/gdbserver/linux-s390-ipa.c @@ -368,7 +368,7 @@ get_ipa_tdesc (int idx) SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0); return tdesc_s390_tevx_linux64; case S390_TDESC_GS: - SET_REGMAP(s390_te_ft_collect_regmap, 0); + SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0); return tdesc_s390_gs_linux64; #endif default: