public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Simplify generic_val_print_float Date: Fri, 27 Mar 2020 02:54:18 -0400 [thread overview] Message-ID: <f5354008862defe83fc6d3620d51da52f860f5bf@gdb-build> (raw) *** TEST RESULTS FOR COMMIT f5354008862defe83fc6d3620d51da52f860f5bf *** commit f5354008862defe83fc6d3620d51da52f860f5bf Author: Tom Tromey <tom@tromey.com> AuthorDate: Fri Mar 13 17:39:52 2020 -0600 Commit: Tom Tromey <tom@tromey.com> CommitDate: Fri Mar 13 18:03:41 2020 -0600 Simplify generic_val_print_float This changes generic_val_print_float not to call val_print_scalar_formatted. This lets generic_value_print then use value_print_scalar_formatted instead. gdb/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * valprint.c (generic_val_print_float): Don't call val_print_scalar_formatted. (generic_val_print, generic_value_print): Update. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ccf0d1e421..c2b0550420 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 Tom Tromey <tom@tromey.com> + + * valprint.c (generic_val_print_float): Don't call + val_print_scalar_formatted. + (generic_val_print, generic_value_print): Update. + 2020-03-13 Tom Tromey <tom@tromey.com> * valprint.c (generic_value_print_char): New function diff --git a/gdb/valprint.c b/gdb/valprint.c index 8c2d1aa195..f759e0aacb 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -924,17 +924,11 @@ generic_val_print_float (struct type *type, struct gdbarch *gdbarch = get_type_arch (type); int unit_size = gdbarch_addressable_memory_unit_size (gdbarch); - if (options->format) - { - val_print_scalar_formatted (type, embedded_offset, - original_value, options, 0, stream); - } - else - { - const gdb_byte *valaddr = value_contents_for_printing (original_value); + gdb_assert (!options->format); - print_floating (valaddr + embedded_offset * unit_size, type, stream); - } + const gdb_byte *valaddr = value_contents_for_printing (original_value); + + print_floating (valaddr + embedded_offset * unit_size, type, stream); } /* generic_val_print helper for TYPE_CODE_COMPLEX. */ @@ -1073,8 +1067,12 @@ generic_val_print (struct type *type, case TYPE_CODE_FLT: case TYPE_CODE_DECFLOAT: - generic_val_print_float (type, embedded_offset, stream, - original_value, options); + if (options->format) + val_print_scalar_formatted (type, embedded_offset, + original_value, options, 0, stream); + else + generic_val_print_float (type, embedded_offset, stream, + original_value, options); break; case TYPE_CODE_VOID: @@ -1185,8 +1183,11 @@ generic_value_print (struct value *val, struct ui_file *stream, int recurse, case TYPE_CODE_FLT: case TYPE_CODE_DECFLOAT: - generic_val_print_float (type, 0, stream, - val, options); + if (options->format) + value_print_scalar_formatted (val, options, 0, stream); + else + generic_val_print_float (type, 0, stream, + val, options); break; case TYPE_CODE_VOID:
next reply other threads:[~2020-03-27 6:54 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-27 6:54 gdb-buildbot [this message] 2020-03-27 6:54 ` Failures on Fedora-i686, branch master gdb-buildbot 2020-03-27 7:25 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2020-03-27 7:29 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2020-03-27 7:57 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-03-27 8:24 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-03-27 8:39 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-03-30 14:51 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot 2020-03-30 17:40 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot 2020-03-31 6:52 ` Failures on Ubuntu-Aarch64-m64, " gdb-buildbot 2020-03-31 7:09 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=f5354008862defe83fc6d3620d51da52f860f5bf@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).