From patchwork Sat Jul 21 18:47:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28557 Received: (qmail 19656 invoked by alias); 21 Jul 2018 18:47:29 -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 19543 invoked by uid 89); 21 Jul 2018 18:47:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.150.114) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 21 Jul 2018 18:47:24 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 6304E127855 for ; Sat, 21 Jul 2018 13:47:23 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id gwuZfYBbs79N3gwuZftsiM; Sat, 21 Jul 2018 13:47:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yunvBu9X+0wwB5EplQFT2wqatoXg6W4HpfWb2SicOSY=; b=wwL/6hMDw0mB6qKFSaKin8KBao JQbJE8LSQTqVBzPonAiloA8H6rrDik2C1E37CVb2DS6yG1pszyJTqTXREEsXeI5hov025s4TvG91L JU08Wu4+Plx6+jfbuaLntP2pp; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:44394 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fgwuZ-002Auc-66; Sat, 21 Jul 2018 13:47:23 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA v2 04/13] Use a previously unused variable in bfin-tdep.c Date: Sat, 21 Jul 2018 12:47:11 -0600 Message-Id: <20180721184720.3263-5-tom@tromey.com> In-Reply-To: <20180721184720.3263-1-tom@tromey.com> References: <20180721184720.3263-1-tom@tromey.com> This changes bfin_push_dummy_call to use the result of check_typedef. Calling check_typedef for effect was probably ok as well, but this seemed a little nicer. gdb/ChangeLog 2018-07-21 Tom Tromey * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not value_type. --- gdb/ChangeLog | 5 +++++ gdb/bfin-tdep.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index da62130231b..c84625c8948 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -526,7 +526,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, { struct type *value_type = value_enclosing_type (args[i]); struct type *arg_type = check_typedef (value_type); - int container_len = (TYPE_LENGTH (value_type) + 3) & ~3; + int container_len = (TYPE_LENGTH (arg_type) + 3) & ~3; sp -= container_len; write_memory (sp, value_contents (args[i]), container_len);