From patchwork Sun Dec 8 18:29:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36595 Received: (qmail 101420 invoked by alias); 8 Dec 2019 18:30:25 -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 101159 invoked by uid 89); 8 Dec 2019 18:30:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.3 required=5.0 tests=AWL, BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=sk:value_p, H*r:esmtpa, HX-Spam-Relays-External:esmtpa, H*RU:esmtpa X-HELO: gateway22.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Dec 2019 18:30:13 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 8506B5817 for ; Sun, 8 Dec 2019 12:30:03 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e1JjiY9GOiJ43e1JjizFA8; Sun, 08 Dec 2019 12:30:03 -0600 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=OntgoWLT7R8ah3VcJr2V6HKZS29f1MDnGlyXWmVsrZo=; b=tAVxwdgpfSg3UvqGVvCvTXJSxC 7KsZG0FiBFWctjvIFPFKgD/fKGYJPGDRdBLPOdoVc26w/UnyLaU7LIAb62h29WsLcdUlbMX9PB9Kc 422RVPJtMIul5DFc8szAylBKL; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:53620 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1ie1Jj-0045Dk-Bw; Sun, 08 Dec 2019 11:30:03 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 13/55] Two simple uses of value_print_scalar_formatted Date: Sun, 8 Dec 2019 11:29:16 -0700 Message-Id: <20191208182958.10181-14-tom@tromey.com> In-Reply-To: <20191208182958.10181-1-tom@tromey.com> References: <20191208182958.10181-1-tom@tromey.com> A couple of spots could be easily converted to use value_print_scalar_formatted. This patch makes this change. gdb/ChangeLog 2019-12-08 Tom Tromey * printcmd.c (print_formatted): Use value_print_scalar_formatted. * mips-tdep.c (mips_print_register): Use value_print_scalar_formatted. Change-Id: Icb05b23148a13cf4257b8c7c05796389566f217d --- gdb/ChangeLog | 6 ++++++ gdb/mips-tdep.c | 5 +---- gdb/printcmd.c | 5 +---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 0852851595f..721c030b44b 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -6373,10 +6373,7 @@ mips_print_register (struct ui_file *file, struct frame_info *frame, fprintf_filtered (file, ": "); get_formatted_print_options (&opts, 'x'); - val_print_scalar_formatted (value_type (val), - value_embedded_offset (val), - val, - &opts, 0, file); + value_print_scalar_formatted (val, &opts, 0, file); } /* Print IEEE exception condition bits in FLAGS. */ diff --git a/gdb/printcmd.c b/gdb/printcmd.c index f7674cf1d01..9071a796c0e 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -321,10 +321,7 @@ print_formatted (struct value *val, int size, else /* User specified format, so don't look to the type to tell us what to do. */ - val_print_scalar_formatted (type, - value_embedded_offset (val), - val, - options, size, stream); + value_print_scalar_formatted (val, options, size, stream); } /* Return builtin floating point type of same length as TYPE.