From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 0563D3AAA07A; Sat, 14 Mar 2020 00:05:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0563D3AAA07A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1584144326; bh=+bAwyvA2PZkXCGaxgaBeGSBF7bOtUmobJWofui2ZX0Q=; h=From:To:Subject:Date:From; b=frjKbtW/Tu3uaCXNsYLoX9lvUOBukH+7ieVEuj0cJj8vcZj63ScwCQo1blWEYvcEl Bu4j4dkGc6C7dDgL/pJXfThWB4T1fRO8LX8dQyF+XR68k/E1rGMkNLTd3/DC88oXO0 6c2Bn4LTdCywxbsLA023Q7R+lVP0Wn7EDMPDkWlQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Two simple uses of value_print_scalar_formatted X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 4f9ae810130bc4202ec1c5eae934900c542a9016 X-Git-Newrev: 4dba70eee1fadcb3c1bb50ba17e0fe3512c84180 Message-Id: <20200314000526.0563D3AAA07A@sourceware.org> Date: Sat, 14 Mar 2020 00:05:26 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 00:05:26 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4dba70eee1fadcb3c1bb50ba17e0fe3512c84180 commit 4dba70eee1fadcb3c1bb50ba17e0fe3512c84180 Author: Tom Tromey Date: Fri Mar 13 17:39:52 2020 -0600 Two simple uses of value_print_scalar_formatted A couple of spots could be easily converted to use value_print_scalar_formatted. This patch makes this change. gdb/ChangeLog 2020-03-13 Tom Tromey * printcmd.c (print_formatted): Use value_print_scalar_formatted. * mips-tdep.c (mips_print_register): Use value_print_scalar_formatted. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/mips-tdep.c | 5 +---- gdb/printcmd.c | 5 +---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 264565edf19..2c97ac85a46 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 Tom Tromey + + * printcmd.c (print_formatted): Use value_print_scalar_formatted. + * mips-tdep.c (mips_print_register): Use + value_print_scalar_formatted. + 2020-03-13 Tom Tromey * valprint.h (value_print_scalar_formatted): Declare. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 2599f825e83..c6952a5ba3f 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 78d8d3d81e1..645ac4da9a4 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.