aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-01 12:08:15 -0600
committerTom Tromey <tromey@adacore.com>2019-07-15 09:31:18 -0600
commit33eca68072e73d984fc139dde45b8140b94757cb (patch)
treefebcb3372032352babcf541f9bcb11f45eb771f3 /gdb/mi
parentca8d69beb1024316af8dec571584437d613f40d2 (diff)
downloadgdb-33eca68072e73d984fc139dde45b8140b94757cb.zip
gdb-33eca68072e73d984fc139dde45b8140b94757cb.tar.gz
gdb-33eca68072e73d984fc139dde45b8140b94757cb.tar.bz2
Use field_string in more places
This replaces uses of field_fmt with a "%s" format string to use field_string instead. Also, one use of "%9lx" is replaced with a call to phex_nz; the '9' is dropped as it is implicit in the field width. 2019-07-15 Tom Tromey <tromey@adacore.com> * mi/mi-main.c (list_available_thread_groups): Use field_string. * mi/mi-interp.c (mi_memory_changed): Use field_string. * target.c (flash_erase_command): Use field_string. * infrun.c (print_signal_received_reason): Use field_string. * i386-tdep.c (i386_mpx_print_bounds): Use field_string. * breakpoint.c (maybe_print_thread_hit_breakpoint): Use field_string. * ada-tasks.c (print_ada_task_info): Use field_string.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-interp.c2
-rw-r--r--gdb/mi/mi-main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index ab1f913..03ab169 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -1172,7 +1172,7 @@ mi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr,
mi_uiout->field_fmt ("thread-group", "i%d", inferior->num);
mi_uiout->field_core_addr ("addr", target_gdbarch (), memaddr);
- mi_uiout->field_fmt ("len", "%s", hex_string (len));
+ mi_uiout->field_string ("len", hex_string (len));
/* Append 'type=code' into notification if MEMADDR falls in the range of
sections contain code. */
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index da8c81f..26ffeb07 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -746,7 +746,7 @@ list_available_thread_groups (const std::set<int> &ids, int recurse)
ui_out_emit_tuple tuple_emitter (uiout, NULL);
- uiout->field_fmt ("id", "%s", pid->c_str ());
+ uiout->field_string ("id", pid->c_str ());
uiout->field_string ("type", "process");
if (cmd)
uiout->field_string ("description", cmd->c_str ());