Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb: Use string_printf to format int fields instead of a fixed size buffer
Date: Tue, 20 Nov 2018 22:18:00 -0000	[thread overview]
Message-ID: <87muq3o0ko.fsf@tromey.com> (raw)
In-Reply-To: <81914f01b8c70c20744c2960c4a71136bcb6e913.1542745482.git.andrew.burgess@embecosm.com>	(Andrew Burgess's message of "Tue, 20 Nov 2018 20:30:06 +0000")

>>>>> "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


      reply	other threads:[~2018-11-20 22:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 20:30 [PATCH 0/2] Changes to cli-out.c for field alignment and formatting Andrew Burgess
2018-11-20 20:30 ` [PATCH 1/2] gdb: Respect field width and alignment for 'fmt' fields in CLI output Andrew Burgess
2018-11-20 22:17   ` Tom Tromey
2018-11-20 20:30 ` [PATCH 2/2] gdb: Use string_printf to format int fields instead of a fixed size buffer Andrew Burgess
2018-11-20 22:18   ` Tom Tromey [this message]

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=87muq3o0ko.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@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: link
Be 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