From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fs22HNY8m2HkZgAAWB0awg (envelope-from ) for ; Mon, 22 Nov 2021 01:46:46 -0500 Received: by simark.ca (Postfix, from userid 112) id 637801F0CE; Mon, 22 Nov 2021 01:46:46 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C58AE1ECEB for ; Mon, 22 Nov 2021 01:46:45 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A49E385843F for ; Mon, 22 Nov 2021 06:46:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A49E385843F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637563605; bh=ftXH5XOcz+TxYuTIZogz3neUnmgAfjz1VCucEprS3p4=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JvFdniN6Il3NF1vMUVkxakIe1eWVY0EqZExthsjSde06/O+sEGx23Q1C66RsOIG/7 CwTjNZGEpZ9VN5OaK2oQZUhsRfjhJcpfCIcE3blOU+iHftuZ/IqygvY3dreEgq3s3k C5Mwvq7HmGVValF8rmsM431qBBfkt9KIkt2CkWVI= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 024C43858406 for ; Mon, 22 Nov 2021 06:46:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 024C43858406 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2AD63212C6; Mon, 22 Nov 2021 06:46:26 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0FA9013466; Mon, 22 Nov 2021 06:46:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ldAJAsI8m2HvEQAAMHmgww (envelope-from ); Mon, 22 Nov 2021 06:46:26 +0000 Subject: Re: Build failure on x32 (gdb 11.1) To: Jan Palus , "gdb-patches@sourceware.org" References: <20211121194556.nreowfixabal5ebj@pine> Message-ID: Date: Mon, 22 Nov 2021 07:46:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20211121194556.nreowfixabal5ebj@pine> Content-Type: multipart/mixed; boundary="------------1FA81BE0E84BA7E78A8F7A78" Content-Language: en-US X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This is a multi-part message in MIME format. --------------1FA81BE0E84BA7E78A8F7A78 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 11/21/21 8:45 PM, Jan Palus wrote: > gdb 11.1 fails during compilation on x32 ABI: > > ../.././gdbserver/../gdb/nat/amd64-linux-siginfo.c:280:42: error: 'struct compat_x32_siginfo_t::::' has no member named 'si_addr_bnd' > 280 | #define cpt_si_lower _sifields._sigfault.si_addr_bnd._lower > | ^~~~~~~~~~~ > ../.././gdbserver/../gdb/nat/amd64-linux-siginfo.c:337:38: note: in expansion of macro 'cpt_si_lower' > 337 | to->cpt_si_lower = from_ptrace.cpt_si_lower; > | ^~~~~~~~~~~~ > ../.././gdbserver/../gdb/nat/amd64-linux-siginfo.c:281:42: error: 'struct compat_x32_siginfo_t::::' has no member named 'si_addr_bnd' > 281 | #define cpt_si_upper _sifields._sigfault.si_addr_bnd._upper > | ^~~~~~~~~~~ > ../.././gdbserver/../gdb/nat/amd64-linux-siginfo.c:338:38: note: in expansion of macro 'cpt_si_upper' > 338 | to->cpt_si_upper = from_ptrace.cpt_si_upper; > | ^~~~~~~~~~~~ > > I believe it is caused by https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=d3d7d1b Hi, I've attached a conservative fix, can you check whether that fixes the build breaker? Thanks, - Tom --------------1FA81BE0E84BA7E78A8F7A78 Content-Type: text/x-patch; charset=UTF-8; name="tmp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tmp.patch" diff --git a/gdb/nat/amd64-linux-siginfo.c b/gdb/nat/amd64-linux-siginfo.c index 342840e5085..fc52b5b6056 100644 --- a/gdb/nat/amd64-linux-siginfo.c +++ b/gdb/nat/amd64-linux-siginfo.c @@ -330,6 +330,9 @@ compat_siginfo_from_siginfo (compat_siginfo_t *to, const siginfo_t *from) to->cpt_si_pid = from_ptrace.cpt_si_pid; to->cpt_si_uid = from_ptrace.cpt_si_uid; } +#ifndef __ILP32__ + /* The struct compat_x32_siginfo_t doesn't contain + cpt_si_lower/cpt_si_upper. */ else if (to->si_code == SEGV_BNDERR && to->si_signo == SIGSEGV) { @@ -337,6 +340,7 @@ compat_siginfo_from_siginfo (compat_siginfo_t *to, const siginfo_t *from) to->cpt_si_lower = from_ptrace.cpt_si_lower; to->cpt_si_upper = from_ptrace.cpt_si_upper; } +#endif else if (to->si_code < 0) { to->cpt_si_pid = from_ptrace.cpt_si_pid; --------------1FA81BE0E84BA7E78A8F7A78--