From patchwork Fri Jul 11 16:37:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 2036 Received: (qmail 22330 invoked by alias); 11 Jul 2014 16:38:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 22152 invoked by uid 89); 11 Jul 2014 16:38:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham 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; Fri, 11 Jul 2014 16:38:02 +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 s6BGc0B9026557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 11 Jul 2014 12:38:00 -0400 Received: from barimba.redhat.com (ovpn-113-95.phx2.redhat.com [10.3.113.95]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6BGbwgT030792; Fri, 11 Jul 2014 12:38:00 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 3/3] fix calls to find_target_beneath Date: Fri, 11 Jul 2014 10:37:56 -0600 Message-Id: <1405096676-22681-4-git-send-email-tromey@redhat.com> In-Reply-To: <1405096676-22681-1-git-send-email-tromey@redhat.com> References: <1405096676-22681-1-git-send-email-tromey@redhat.com> A long time ago Pedro pointed out that there are some calls to find_target_beneath that pass in an explicit target_ops; but which should instead use the ops provided to the method in question. See: https://sourceware.org/ml/gdb-patches/2014-01/msg00429.html This patch is just a minor cleanup to fix all such calls. There were only three. 2014-07-11 Tom Tromey * spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Pass "self" to find_target_beneath. * ravenscar-thread.c (ravenscar_prepare_to_store): Pass "ops" to find_target_beneath. (ravenscar_mourn_inferior): Pass "self" to find_target_beneath. --- gdb/ChangeLog | 8 ++++++++ gdb/ravenscar-thread.c | 4 ++-- gdb/spu-multiarch.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c index 060d5ce..c4a01a5 100644 --- a/gdb/ravenscar-thread.c +++ b/gdb/ravenscar-thread.c @@ -308,7 +308,7 @@ static void ravenscar_prepare_to_store (struct target_ops *self, struct regcache *regcache) { - struct target_ops *beneath = find_target_beneath (&ravenscar_ops); + struct target_ops *beneath = find_target_beneath (self); if (!ravenscar_runtime_initialized () || ptid_equal (inferior_ptid, base_magic_null_ptid) @@ -327,7 +327,7 @@ ravenscar_prepare_to_store (struct target_ops *self, static void ravenscar_mourn_inferior (struct target_ops *ops) { - struct target_ops *beneath = find_target_beneath (&ravenscar_ops); + struct target_ops *beneath = find_target_beneath (ops); base_ptid = null_ptid; beneath->to_mourn_inferior (beneath); diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c index a22cc1b..e3285d0 100644 --- a/gdb/spu-multiarch.c +++ b/gdb/spu-multiarch.c @@ -121,7 +121,7 @@ static int spu_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR addr, int len) { - struct target_ops *ops_beneath = find_target_beneath (&spu_ops); + struct target_ops *ops_beneath = find_target_beneath (self); /* We cannot watch SPU local store. */ if (SPUADDR_SPU (addr) != -1)