From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95886 invoked by alias); 1 Apr 2015 22:14:24 -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 95638 invoked by uid 89); 1 Apr 2015 22:14:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 01 Apr 2015 22:14:20 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t31MEJcF023873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 1 Apr 2015 18:14:19 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t31MEEtm009701 for ; Wed, 1 Apr 2015 18:14:18 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 03/17] Displaced stepping debug: fetch the right regcache Date: Wed, 01 Apr 2015 22:14:00 -0000 Message-Id: <1427926454-16431-4-git-send-email-palves@redhat.com> In-Reply-To: <1427926454-16431-1-git-send-email-palves@redhat.com> References: <1427926454-16431-1-git-send-email-palves@redhat.com> X-SW-Source: 2015-04/txt/msg00082.txt.bz2 Although not currently possible in practice when we get here, 'resume_ptid' can also be a wildcard throughout this function. It's clearer to fetch the regcache using the thread's ptid. gdb/ChangeLog: 2015-04-01 Pedro Alves * infrun.c (resume) : Get the leader thread's regcache, not resume_ptid's. --- gdb/infrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index cf0ef32..f23e76e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2374,7 +2374,7 @@ resume (enum gdb_signal sig) && tp->control.trap_expected && use_displaced_stepping_now_p (gdbarch, sig)) { - struct regcache *resume_regcache = get_thread_regcache (resume_ptid); + struct regcache *resume_regcache = get_thread_regcache (tp->ptid); struct gdbarch *resume_gdbarch = get_regcache_arch (resume_regcache); CORE_ADDR actual_pc = regcache_read_pc (resume_regcache); gdb_byte buf[4]; -- 1.9.3