mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
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.
This commit is contained in:
@@ -1089,7 +1089,8 @@ print_ada_task_info (struct ui_out *uiout,
|
||||
uiout->field_int ("id", taskno);
|
||||
|
||||
/* Print the Task ID. */
|
||||
uiout->field_fmt ("task-id", "%9lx", (long) task_info->task_id);
|
||||
uiout->field_string ("task-id", phex_nz (task_info->task_id,
|
||||
sizeof (CORE_ADDR)));
|
||||
|
||||
/* Print the associated Thread ID. */
|
||||
if (uiout->is_mi_like_p ())
|
||||
@@ -1129,10 +1130,9 @@ print_ada_task_info (struct ui_out *uiout,
|
||||
uiout->field_string ("state", task_states[task_info->state]);
|
||||
|
||||
/* Finally, print the task name. */
|
||||
uiout->field_fmt ("name",
|
||||
"%s",
|
||||
task_info->name[0] != '\0' ? task_info->name
|
||||
: _("<no name>"));
|
||||
uiout->field_string ("name",
|
||||
task_info->name[0] != '\0' ? task_info->name
|
||||
: _("<no name>"));
|
||||
|
||||
uiout->text ("\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user