This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb: Use string_printf to format int fields instead of a fixed size buffer
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 21 Nov 2018 02:06:28 -0500
- Subject: [binutils-gdb] gdb: Use string_printf to format int fields instead of a fixed size buffer
*** TEST RESULTS FOR COMMIT d63095c426f704f75d943a7481189628403ed58f ***
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: d63095c426f704f75d943a7481189628403ed58f
gdb: Use string_printf to format int fields instead of a fixed size buffer
This patch removes a FIXME comment from cli-out.c, now instead of
formatting integers into a fixed size buffer we build a std::string
and extract the formatted integer from that.
The old code using a fixed size buffer was probably fine (the integer
was not going to overflow it) and probably slightly more efficient
(avoids building a std::string) however, given we already have utility
code in GDB that will allow the 'FIXME' comment to be removed, it
seems like an easy improvement.
gdb/ChangeLog:
* cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
than a fixed size buffer.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master
- Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master