diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-11-20 13:36:49 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-11-20 23:01:42 +0000 |
commit | d63095c426f704f75d943a7481189628403ed58f (patch) | |
tree | e3974ee4d9d3fa46da651e1de06834fba41f3fbd /gdb/eval.c | |
parent | 1871a62daf0561da0880ba1ad39e8191bc3cf1ac (diff) | |
download | gdb-d63095c426f704f75d943a7481189628403ed58f.zip gdb-d63095c426f704f75d943a7481189628403ed58f.tar.gz gdb-d63095c426f704f75d943a7481189628403ed58f.tar.bz2 |
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.
Diffstat (limited to 'gdb/eval.c')
0 files changed, 0 insertions, 0 deletions