aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-02 09:13:53 -0600
committerTom Tromey <tromey@adacore.com>2019-07-15 09:31:19 -0600
commit07128006d6caec5df31a960b131d2026f35ed948 (patch)
treec8f06d2bb93cd386f789ab9f0759ad6e29d8000a /gdb/mi
parent1f77b012e61ec11c92a35223fdfed598c6d2f4e9 (diff)
downloadgdb-07128006d6caec5df31a960b131d2026f35ed948.zip
gdb-07128006d6caec5df31a960b131d2026f35ed948.tar.gz
gdb-07128006d6caec5df31a960b131d2026f35ed948.tar.bz2
Fix a FIXME in mi-out.c
This removes a FIXME comment from mi_ui_out::do_field_int, by replacing a printf with a use of plongest. 2019-07-15 Tom Tromey <tromey@adacore.com> * mi/mi-out.c (mi_ui_out::do_field_int): Use plongest.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-out.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index dd99a2b..75e3f03 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -98,10 +98,7 @@ void
mi_ui_out::do_field_int (int fldno, int width, ui_align alignment,
const char *fldname, int value)
{
- char buffer[20]; /* FIXME: how many chars long a %d can become? */
-
- xsnprintf (buffer, sizeof (buffer), "%d", value);
- do_field_string (fldno, width, alignment, fldname, buffer,
+ do_field_string (fldno, width, alignment, fldname, plongest (value),
ui_out_style_kind::DEFAULT);
}