From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway34.websitewelcome.com (gateway34.websitewelcome.com [192.185.149.77]) by sourceware.org (Postfix) with ESMTPS id 100D23851C31 for ; Sun, 7 Jun 2020 14:25:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 100D23851C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 77DFF41FA3 for ; Sun, 7 Jun 2020 09:24:59 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id hwENjo6TmVQh0hwENjmS9A; Sun, 07 Jun 2020 09:24:59 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mYRomdoMZMWBYg2nobWyrLViEm6dJ5941FSNPEXaIIs=; b=ZahsnXzkaG3C33q0tak7VUG1w7 /ETzq7tjibFZvErr6il6nXWi4gdspt6EzUnbUV7Soy6dxJZuwJDZM38k9F2+strRMBBmA1pQ+Ec6i hOv15fmvJkI2FsFD9t7fub8Nl; Received: from 174-16-104-48.hlrn.qwest.net ([174.16.104.48]:57132 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jhwEN-002jel-7a; Sun, 07 Jun 2020 08:24:59 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Remove unused parameter from generic_val_print_float Date: Sun, 7 Jun 2020 08:24:54 -0600 Message-Id: <20200607142454.26910-1-tom@tromey.com> X-Mailer: git-send-email 2.17.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.104.48 X-Source-L: No X-Exim-ID: 1jhwEN-002jel-7a X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-104-48.hlrn.qwest.net (bapiya.Home) [174.16.104.48]:57132 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS, URIBL_CSS_A autolearn=no 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: Sun, 07 Jun 2020 14:25:02 -0000 generic_val_print_float has an "embedded_offset" parameter, but it can only ever be 0. I believe it is a leftover from the val_print removal. This patch removes this parameter. gdb/ChangeLog 2020-06-07 Tom Tromey * valprint.c (generic_val_print_float): Remove "embedded_offset" parameter. (generic_value_print): Update. --- gdb/ChangeLog | 6 ++++++ gdb/valprint.c | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gdb/valprint.c b/gdb/valprint.c index d678ad3091a..ca7dab680ae 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -781,19 +781,15 @@ generic_value_print_char (struct value *value, struct ui_file *stream, /* generic_val_print helper for TYPE_CODE_FLT and TYPE_CODE_DECFLOAT. */ static void -generic_val_print_float (struct type *type, - int embedded_offset, struct ui_file *stream, +generic_val_print_float (struct type *type, struct ui_file *stream, struct value *original_value, const struct value_print_options *options) { - struct gdbarch *gdbarch = get_type_arch (type); - int unit_size = gdbarch_addressable_memory_unit_size (gdbarch); - gdb_assert (!options->format); const gdb_byte *valaddr = value_contents_for_printing (original_value); - print_floating (valaddr + embedded_offset * unit_size, type, stream); + print_floating (valaddr, type, stream); } /* generic_value_print helper for TYPE_CODE_COMPLEX. */ @@ -896,8 +892,7 @@ generic_value_print (struct value *val, struct ui_file *stream, int recurse, if (options->format) value_print_scalar_formatted (val, options, 0, stream); else - generic_val_print_float (type, 0, stream, - val, options); + generic_val_print_float (type, stream, val, options); break; case TYPE_CODE_VOID: -- 2.17.2