From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 0D02F385DC0E for ; Tue, 14 Apr 2020 17:54:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0D02F385DC0E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-377-Y-3Y6c5uOkeXV5Pqk7sdjw-1; Tue, 14 Apr 2020 13:54:37 -0400 X-MC-Unique: Y-3Y6c5uOkeXV5Pqk7sdjw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59E418024D2 for ; Tue, 14 Apr 2020 17:54:36 +0000 (UTC) Received: from cascais.Home (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id E04CA9F99D for ; Tue, 14 Apr 2020 17:54:35 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 01/28] Don't write to inferior_ptid in linux_get_siginfo_data Date: Tue, 14 Apr 2020 18:54:07 +0100 Message-Id: <20200414175434.8047-2-palves@redhat.com> In-Reply-To: <20200414175434.8047-1-palves@redhat.com> References: <20200414175434.8047-1-palves@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-25.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 14 Apr 2020 17:54:40 -0000 gdb/ChangeLog: yyyy-mm-dd Pedro Alves =09* linux-tdep.c (btrace_fetch): Save/restore current thread instead =09of saving/restoring inferior_ptid. --- gdb/linux-tdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index e50946ce37..f204831e39 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -1618,8 +1618,8 @@ linux_get_siginfo_data (thread_info *thread, struct g= dbarch *gdbarch) if (!gdbarch_get_siginfo_type_p (gdbarch)) return gdb::byte_vector (); =20 - scoped_restore save_inferior_ptid =3D make_scoped_restore (&inferior_pti= d); - inferior_ptid =3D thread->ptid; + scoped_restore_current_thread save_current_thread; + switch_to_thread (thread); =20 siginfo_type =3D gdbarch_get_siginfo_type (gdbarch); =20 --=20 2.14.5