This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] gdb: Use string_printf to format int fields instead of a fixed size buffer


>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> This patch removes a FIXME comment from cli-out.c, now instead of
Andrew> formatting integers into a fixed size buffer we build a std::string
Andrew> and extract the formatted integer from that.

Andrew> The old code using a fixed size buffer was probably fine (the integer
Andrew> was not going to overflow it) and probably slightly more efficient
Andrew> (avoids building a std::string) however, given we already have utility
Andrew> code in GDB that will allow the 'FIXME' comment to be removed, it
Andrew> seems like an easy improvement.

Andrew> gdb/ChangeLog:

Andrew> 	* cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
Andrew> 	than a fixed size buffer.

Thanks.  This is ok.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]