From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WPIqNXjOal8VMgAAWB0awg (envelope-from ) for ; Wed, 23 Sep 2020 00:26:32 -0400 Received: by simark.ca (Postfix, from userid 112) id 317851EDF4; Wed, 23 Sep 2020 00:26:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,FREEMAIL_FROM, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable 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 680E41EF4B for ; Wed, 23 Sep 2020 00:26:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A9F7398D012; Wed, 23 Sep 2020 04:26:04 +0000 (GMT) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id E1396398D014 for ; Wed, 23 Sep 2020 04:25:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E1396398D014 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=n54@gmx.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600835157; bh=jE1K/d7BB4bw4+FzcaUUeizTS9mIjBL/VYL9/SXkZXc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Na8rh0ORlZQt82RSId06sAY5+dyDrOuU0srVsNcW6FiY0d3qWopdFuiJumUAUwBvS wiUsXGnjpqym0oLgbGFfaSNKF/yq0g2k16zQK8lRrmMYOPdymyhSqSTeQOgFuT970G u1LltGB8s2/n4omktSuS69IcjAtAl4um3DLIBYD4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([89.79.191.25]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MQe5k-1k8EU63AgQ-00NgqG; Wed, 23 Sep 2020 06:25:56 +0200 From: Kamil Rytarowski To: gdb-patches@sourceware.org Subject: [PATCH 5/5] Remove the old sanity check of sigcontext offsets for NetBSD/i386 Date: Wed, 23 Sep 2020 06:25:15 +0200 Message-Id: <20200923042515.28245-6-n54@gmx.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200923042515.28245-1-n54@gmx.com> References: <20200923042515.28245-1-n54@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qWJ0p3PpWizKFqn4tC0J40kTVlr22iiVWyfR/C1cvCSjeCn6DZy T0aoZMooj4B8kg2umDcv4WP+MpseYzkGjdz9iWj1hXfNkvcIO3BJeevJXYU5NUcehh9zrOa WJutM/3r2BE2n6FgOsdgQX0JLhFirXCPKqCsiVoXbRsiFzlYh9eIt4j4qTLIDP1fDNlkjAq EVq+cgN06NKZhEyH0Pjdg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZtFtny96VfE=:w+UEpC1qoBDBdCPWbqAR/y mDFS+M1parjV25BYW8g86SVUbSfM/Kccmf5xHPd30ii1X5oY6sMrxcOnj7LC79B9l2X+qpVzg DJ7g17iwAdRxdoa1iLyMB6lER1gTK+Egp5Ap51leb7S6FShsJyZkLi7J3+Gn9IdrVcj9bXN1F fVzdfn5UpSTqplP8xGMx0cGmNpKqEqpJfuZBJKUQKhDQjBzbq3hGgARfIHyq9JIpVU3v931+V O5WnP4LR44XMXfHAsoxeMl0/TZdArOgKKPORJFF6GgVJXghXwFAMjKrKV2s+tEnQp43C1Xc3k 7fc112p6ZPihLI1NgbfbfVPPX5HANWfIi1QXdJvZSysutUHbObNfVRDmZwtReu8y3mKyfXDrZ aWZJP0z2l7TTBf6tuG5ebXW4W8J+BZuosP7cSZv3mFl/5kgkT+JeMLsFpju++ig52f8G2fZgN 7F68E/a3N8qiwoab6BSYWRVBl5yLJs7oVX4xCsC3DUnYaaS+7qW9EuIVq1j5xK/MY5zphy6Vt uSiI0ZEBmyZLOWMZnTcU1pID76/rkk6+pp15jNMFpNcKYW62UjASykwCcg/qOiC/YOspvZJQx F+h35126Fwxdmc9sSl1i+NUrW6Jah1qSB785uAjMa1SXE2qpy7tKmaRe8740pfm5SaAcgob8a mh/dU4hVC7wIvmj6QQgLL4+eXAlBnBatbZoWHI7hDmXurQdLF6GqePTfGgYOj3opY9bCyMy3j jxx9VMdCinRFKKp7Zt3mMawsC/aJwhiSAuVFYglINCmWY592wON3G+hRtZFfGvQB0d6w4oG4i G2JyeVUPC77JBeRSNXaLioBd/laotLxvXJgUZd5P3bdtWB60tY/Reed+upjFI4tFwMSTl50XC z5lPWKNA4AMFscvKu+/wppGx+zI5XsNzyk714vPC0nboszkzrrtFV5WAAHdCneosGh3KQtbEe 9lxWsN+WMlFGh7EmF7h7iBXvIdFek4LCtTQiEr/OSF/L4RAKfO8AYdYIJBDFKevgVd3nGmCGb 6Gyjxce+zF2vjPHCT72Jort5zzCdwVTMuQaX8Mm0ebaO+MEotQ1UJYYAKFJfqqzSP66iW9EGk +hGcV6W4JK/syvv4jV77NuH3ZBpgTiwXtzmA2Otqh0rTK0gtC+xcbL6R9FooC3YCDJ7sQs4cq N/RcI5+T2TygHRXMgSlUSLu84fAy3hgKMvVp07suR4d8cTLkoslrDMFktq3SAYSU51S+sHI0W lgbIHCA2CYh0PH6EU 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" NetBSD switched to ucontext, back in 2003 and the sigcontext code is no longer available for users, except for legacy compat layers. This code was not available anyway as the pre-processor check was probably never operational and buildable on NetBSD. The code inside it does not compile. Meanwhile, move the offset variable into the ifdef goards and avoid the error about unused variable. ../../gdb/i386-bsd-nat.c: In function 'void _initialize_i386bsd_nat()': ../../gdb/i386-bsd-nat.c:347:7: error: unused variable 'offset' [-Werror= =3Dunused-variable] 347 | int offset; | ^~~~~~ cc1plus: all warnings being treated as errors gdb/ChangeLog: * i386-bsd-nat.c (_initialize_i386bsd_nat): Update. =2D-- gdb/ChangeLog | 4 ++++ gdb/i386-bsd-nat.c | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c95e681b4a8..716df36fdd2 100644 =2D-- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-09-23 Kamil Rytarowski + + * i386-bsd-nat.c (_initialize_i386bsd_nat): Update. + 2020-09-23 Kamil Rytarowski * i386-nbsd-nat.c: Include "x86-bsd-nat.h". diff --git a/gdb/i386-bsd-nat.c b/gdb/i386-bsd-nat.c index 4e8693246c8..12b45efb465 100644 =2D-- a/gdb/i386-bsd-nat.c +++ b/gdb/i386-bsd-nat.c @@ -344,8 +344,6 @@ void _initialize_i386bsd_nat (); void _initialize_i386bsd_nat () { - int offset; - /* To support the recognition of signal handlers, i386-bsd-tdep.c hardcodes some constants. Inclusion of this file means that we are compiling a native debugger, which means that we can use the @@ -356,8 +354,6 @@ _initialize_i386bsd_nat () #define SC_REG_OFFSET i386fbsd4_sc_reg_offset #elif defined (__FreeBSD_version) && __FreeBSD_version >=3D 300005 #define SC_REG_OFFSET i386fbsd_sc_reg_offset -#elif defined (NetBSD) || defined (__NetBSD_Version__) -#define SC_REG_OFFSET i386nbsd_sc_reg_offset #elif defined (OpenBSD) #define SC_REG_OFFSET i386obsd_sc_reg_offset #endif @@ -376,7 +372,7 @@ _initialize_i386bsd_nat () /* Override the default value for the offset of the program counter in the sigcontext structure. */ - offset =3D offsetof (struct sigcontext, sc_pc); + int offset =3D offsetof (struct sigcontext, sc_pc); if (SC_PC_OFFSET !=3D offset) { =2D- 2.28.0