+2019-07-17 Tom Tromey <tromey@adacore.com>
+
+ * ui-out.h (class ui_out) <field_signed, field_fmt_signed,
+ do_field_signed>: Rename. Change type of "value".
+ * ui-out.c (ui_out::field_signed): Rename from field_int.
+ Change type of "value".
+ (ui_out::field_fmt_signed): Rename from field_fmt_int. Change
+ type of "value".
+ * tui/tui-out.h (class tui_ui_out) <do_field_signed>: Rename from
+ do_field_int. Change type of "value".
+ * tui/tui-out.c (tui_ui_out::do_field_signed): Rename from
+ do_field_int. Change type of "value".
+ * tracepoint.c (trace_status_mi, tfind_1)
+ (print_one_static_tracepoint_marker): Update.
+ * thread.c (print_thread_info_1, print_selected_thread_frame):
+ Update.
+ * stack.c (print_frame, print_frame_info): Update.
+ * spu-tdep.c (info_spu_signal_command, info_spu_dma_cmdlist):
+ Update.
+ * source.c (print_source_lines_base): Update.
+ * skip.c (info_skip_command): Update.
+ * record-btrace.c (btrace_ui_out_decode_error)
+ (btrace_call_history_src_line): Update.
+ * python/py-framefilter.c (py_print_single_arg, py_print_frame):
+ Update.
+ * progspace.c (print_program_space): Update.
+ * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Update.
+ * mi/mi-out.h (class mi_ui_out) <do_field_signed>: Rename from
+ do_field_int. Change type of "value".
+ * mi/mi-out.c (mi_ui_out::do_table_begin)
+ (mi_ui_out::do_table_header): Update.
+ (mi_ui_out::do_field_signed): Rename from do_field_int. Change
+ type of "value".
+ * mi/mi-main.c (mi_cmd_thread_list_ids, print_one_inferior)
+ (mi_cmd_data_list_changed_registers, output_register)
+ (mi_cmd_data_read_memory, mi_load_progress)
+ (mi_cmd_trace_frame_collected): Update.
+ * mi/mi-interp.c (mi_on_normal_stop_1, mi_output_solib_attribs):
+ Update.
+ * mi/mi-cmd-var.c (print_varobj, mi_cmd_var_create)
+ (mi_cmd_var_delete, mi_cmd_var_info_num_children)
+ (mi_cmd_var_list_children, varobj_update_one): Update.
+ * mi/mi-cmd-stack.c (mi_cmd_stack_info_depth)
+ (mi_cmd_stack_list_args, list_arg_or_local): Update.
+ * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Update.
+ * inferior.c (print_inferior): Update.
+ * gdb_bfd.c (print_one_bfd): Update.
+ * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
+ Update.
+ * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
+ * cli-out.h (class cli_ui_out) <do_field_signed>: Rename from
+ do_field_int. Change type of "value".
+ * cli-out.c (cli_ui_out::do_field_signed): Rename from
+ do_field_int. Change type of "value".
+ * breakpoint.c (watchpoint_check, print_breakpoint_location)
+ (print_one_breakpoint_location, print_it_catch_fork)
+ (print_one_catch_fork, print_it_catch_vfork)
+ (print_one_catch_vfork, print_it_catch_solib)
+ (print_it_catch_exec, print_it_ranged_breakpoint)
+ (print_mention_watchpoint, print_mention_masked_watchpoint)
+ (bkpt_print_it, update_static_tracepoint): Update.
+ * break-catch-throw.c (print_it_exception_catchpoint): Update.
+ * break-catch-syscall.c (print_it_catch_syscall): Update.
+ * ada-tasks.c (print_ada_task_info): Update.
+ * ada-lang.c (print_it_exception, print_mention_exception):
+ Update.
+
2019-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
PR breakpoints/24541
uiout->text (b->disposition == disp_del
? "\nTemporary catchpoint " : "\nCatchpoint ");
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (", ");
/* ada_exception_name_addr relies on the selected frame being the
uiout->text (b->disposition == disp_del ? _("Temporary catchpoint ")
: _("Catchpoint "));
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (": ");
switch (ex)
uiout->field_skip ("current");
/* Print the task number. */
- uiout->field_int ("id", taskno);
+ uiout->field_signed ("id", taskno);
/* Print the Task ID. */
uiout->field_string ("task-id", phex_nz (task_info->task_id,
thread_info *thread = find_thread_ptid (task_info->ptid);
if (thread != NULL)
- uiout->field_int ("thread-id", thread->global_num);
+ uiout->field_signed ("thread-id", thread->global_num);
else
/* This should never happen unless there is a bug somewhere,
but be resilient when that happens. */
/* Print the ID of the parent task. */
parent_id = get_task_number_from_id (task_info->parent, inf);
if (parent_id)
- uiout->field_int ("parent-id", parent_id);
+ uiout->field_signed ("parent-id", parent_id);
else
uiout->field_skip ("parent-id");
/* Print the base priority of the task. */
- uiout->field_int ("priority", task_info->priority);
+ uiout->field_signed ("priority", task_info->priority);
/* Print the task current state. */
if (task_info->caller_task)
: EXEC_ASYNC_SYSCALL_RETURN));
uiout->field_string ("disp", bpdisp_text (b->disposition));
}
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
if (last.kind == TARGET_WAITKIND_SYSCALL_ENTRY)
uiout->text (" (call to syscall ");
uiout->text (" (returned from syscall ");
if (s.name == NULL || uiout->is_mi_like_p ())
- uiout->field_int ("syscall-number", last.value.syscall_number);
+ uiout->field_signed ("syscall-number", last.value.syscall_number);
if (s.name != NULL)
uiout->field_string ("syscall-name", s.name);
bp_temp = b->disposition == disp_del;
uiout->text (bp_temp ? "Temporary catchpoint "
: "Catchpoint ");
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text ((kind == EX_EVENT_THROW ? " (exception thrown), "
: (kind == EX_EVENT_CATCH ? " (exception caught), "
: " (exception rethrown), ")));
uiout->field_string
("reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_SCOPE));
uiout->text ("\nWatchpoint ");
- uiout->field_int ("wpnum", b->number);
+ uiout->field_signed ("wpnum", b->number);
uiout->text (" deleted because the program has left the block in\n"
"which its expression is valid.\n");
}
if (uiout->is_mi_like_p ())
uiout->field_string ("fullname", symtab_to_fullname (loc->symtab));
- uiout->field_int ("line", loc->line_number);
+ uiout->field_signed ("line", loc->line_number);
}
else if (loc)
{
if (part_of_multiple)
uiout->field_fmt ("number", "%d.%d", b->number, loc_number);
else
- uiout->field_int ("number", b->number);
+ uiout->field_signed ("number", b->number);
/* 2 */
annotate_field (1);
/* FIXME: This seems to be redundant and lost here; see the
"stop only in" line a little further down. */
uiout->text (" thread ");
- uiout->field_int ("thread", b->thread);
+ uiout->field_signed ("thread", b->thread);
}
else if (b->task != 0)
{
uiout->text (" task ");
- uiout->field_int ("task", b->task);
+ uiout->field_signed ("task", b->task);
}
}
/* FIXME should make an annotation for this. */
uiout->text ("\tstop only in thread ");
if (uiout->is_mi_like_p ())
- uiout->field_int ("thread", b->thread);
+ uiout->field_signed ("thread", b->thread);
else
{
struct thread_info *thr = find_thread_global_id (b->thread);
else
uiout->text ("\tbreakpoint");
uiout->text (" already hit ");
- uiout->field_int ("times", b->hit_count);
+ uiout->field_signed ("times", b->hit_count);
if (b->hit_count == 1)
uiout->text (" time\n");
else
{
/* Output the count also if it is zero, but only if this is mi. */
if (uiout->is_mi_like_p ())
- uiout->field_int ("times", b->hit_count);
+ uiout->field_signed ("times", b->hit_count);
}
}
{
annotate_field (8);
uiout->text ("\tignore next ");
- uiout->field_int ("ignore", b->ignore_count);
+ uiout->field_signed ("ignore", b->ignore_count);
uiout->text (" hits\n");
}
uiout->text ("additional ");
else
uiout->text ("next ");
- uiout->field_int ("enable", b->enable_count);
+ uiout->field_signed ("enable", b->enable_count);
uiout->text (" hits\n");
}
if (tp->traceframe_usage)
{
uiout->text ("\ttrace buffer usage ");
- uiout->field_int ("traceframe-usage", tp->traceframe_usage);
+ uiout->field_signed ("traceframe-usage", tp->traceframe_usage);
uiout->text (" bytes\n");
}
}
{
annotate_field (10);
uiout->text ("\tpass count ");
- uiout->field_int ("pass", t->pass_count);
+ uiout->field_signed ("pass", t->pass_count);
uiout->text (" \n");
}
uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_FORK));
uiout->field_string ("disp", bpdisp_text (b->disposition));
}
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (" (forked process ");
- uiout->field_int ("newpid", c->forked_inferior_pid.pid ());
+ uiout->field_signed ("newpid", c->forked_inferior_pid.pid ());
uiout->text ("), ");
return PRINT_SRC_AND_LOC;
}
if (c->forked_inferior_pid != null_ptid)
{
uiout->text (", process ");
- uiout->field_int ("what", c->forked_inferior_pid.pid ());
+ uiout->field_signed ("what", c->forked_inferior_pid.pid ());
uiout->spaces (1);
}
uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_VFORK));
uiout->field_string ("disp", bpdisp_text (b->disposition));
}
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (" (vforked process ");
- uiout->field_int ("newpid", c->forked_inferior_pid.pid ());
+ uiout->field_signed ("newpid", c->forked_inferior_pid.pid ());
uiout->text ("), ");
return PRINT_SRC_AND_LOC;
}
if (c->forked_inferior_pid != null_ptid)
{
uiout->text (", process ");
- uiout->field_int ("what", c->forked_inferior_pid.pid ());
+ uiout->field_signed ("what", c->forked_inferior_pid.pid ());
uiout->spaces (1);
}
uiout->text ("Temporary catchpoint ");
else
uiout->text ("Catchpoint ");
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text ("\n");
if (uiout->is_mi_like_p ())
uiout->field_string ("disp", bpdisp_text (b->disposition));
uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_EXEC));
uiout->field_string ("disp", bpdisp_text (b->disposition));
}
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (" (exec'd ");
uiout->field_string ("new-exec", c->exec_pathname);
uiout->text ("), ");
async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
uiout->field_string ("disp", bpdisp_text (b->disposition));
}
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (", ");
return PRINT_SRC_AND_LOC;
}
ui_out_emit_tuple tuple_emitter (uiout, tuple_name);
- uiout->field_int ("number", b->number);
+ uiout->field_signed ("number", b->number);
uiout->text (": ");
uiout->field_string ("exp", w->exp_string);
}
}
ui_out_emit_tuple tuple_emitter (uiout, tuple_name);
- uiout->field_int ("number", b->number);
+ uiout->field_signed ("number", b->number);
uiout->text (": ");
uiout->field_string ("exp", w->exp_string);
}
async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
uiout->field_string ("disp", bpdisp_text (b->disposition));
}
- uiout->field_int ("bkptno", b->number);
+ uiout->field_signed ("bkptno", b->number);
uiout->text (", ");
return PRINT_SRC_AND_LOC;
uiout->field_string ("fullname", fullname);
}
- uiout->field_int ("line", sal2.line);
+ uiout->field_signed ("line", sal2.line);
uiout->text ("\n");
b->loc->line_number = sal2.line;
/* output an int field */
void
-cli_ui_out::do_field_int (int fldno, int width, ui_align alignment,
- const char *fldname, int value)
+cli_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
+ const char *fldname, LONGEST value)
{
if (m_suppress_output)
return;
- std::string str = string_printf ("%d", value);
-
- do_field_string (fldno, width, alignment, fldname, str.c_str (),
+ do_field_string (fldno, width, alignment, fldname, plongest (value),
ui_out_style_kind::DEFAULT);
}
zero. */
virtual void do_begin (ui_out_type type, const char *id) override;
virtual void do_end (ui_out_type type) override;
- virtual void do_field_int (int fldno, int width, ui_align align,
- const char *fldname, int value) override;
+ virtual void do_field_signed (int fldno, int width, ui_align align,
+ const char *fldname, LONGEST value) override;
virtual void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value)
override;
unparse_inheritance (r_info.inheritance));
uiout->field_string ("share-mode",
unparse_share_mode (r_info.share_mode));
- uiout->field_int ("depth", r_depth);
+ uiout->field_signed ("depth", r_depth);
uiout->field_string ("submap",
r_info.is_submap ? _("sm ") : _("obj"));
tag = unparse_user_tag (r_info.user_tag);
if (tag)
uiout->field_string ("tag", tag);
else
- uiout->field_int ("tag", r_info.user_tag);
+ uiout->field_signed ("tag", r_info.user_tag);
}
uiout->text ("\n");
uiout->field_string ("func-name", name.c_str (),
ui_out_style_kind::FUNCTION);
uiout->text ("+");
- uiout->field_int ("offset", offset);
+ uiout->field_signed ("offset", offset);
uiout->text (">:\t");
}
else
struct ui_out *uiout = (struct ui_out *) data;
ui_out_emit_tuple tuple_emitter (uiout, NULL);
- uiout->field_int ("refcount", gdata->refc);
+ uiout->field_signed ("refcount", gdata->refc);
uiout->field_string ("addr", host_address_to_string (abfd));
uiout->field_string ("filename", bfd_get_filename (abfd));
uiout->text ("\n");
else
uiout->field_skip ("current");
- uiout->field_int ("number", inf->num);
+ uiout->field_signed ("number", inf->num);
uiout->field_string ("target-id", inferior_pid_to_str (inf->pid));
if (inf->vfork_parent)
{
uiout->text (_("\n\tis vfork child of inferior "));
- uiout->field_int ("vfork-parent", inf->vfork_parent->num);
+ uiout->field_signed ("vfork-parent", inf->vfork_parent->num);
}
if (inf->vfork_child)
{
uiout->text (_("\n\tis vfork parent of inferior "));
- uiout->field_int ("vfork-child", inf->vfork_child->num);
+ uiout->field_signed ("vfork-child", inf->vfork_child->num);
}
uiout->text ("\n");
error (_("-file-list-exec-source-file: No symtab"));
/* Print to the user the line, filename and fullname. */
- uiout->field_int ("line", st.line);
+ uiout->field_signed ("line", st.line);
uiout->field_string ("file", symtab_to_filename_for_display (st.symtab));
uiout->field_string ("fullname", symtab_to_fullname (st.symtab));
- uiout->field_int ("macro-info",
- COMPUNIT_MACRO_TABLE (SYMTAB_COMPUNIT (st.symtab)) != NULL);
+ uiout->field_signed ("macro-info",
+ COMPUNIT_MACRO_TABLE (SYMTAB_COMPUNIT (st.symtab)) != NULL);
}
/* A callback for map_partial_symbol_filenames. */
i++, fi = get_prev_frame (fi))
QUIT;
- current_uiout->field_int ("depth", i);
+ current_uiout->field_signed ("depth", i);
}
/* Print a list of the locals for the current frame. With argument of
{
QUIT;
ui_out_emit_tuple tuple_emitter (uiout, "frame");
- uiout->field_int ("level", i);
+ uiout->field_signed ("level", i);
list_args_or_locals (user_frame_print_options,
arguments, print_values, fi, skip_unavailable);
}
uiout->field_stream ("name", stb);
if (what == all && SYMBOL_IS_ARGUMENT (arg->sym))
- uiout->field_int ("arg", 1);
+ uiout->field_signed ("arg", 1);
if (values == PRINT_SIMPLE_VALUES)
{
uiout->field_string ("exp", exp.c_str ());
}
- uiout->field_int ("numchild", varobj_get_num_children (var));
+ uiout->field_signed ("numchild", varobj_get_num_children (var));
if (mi_print_value_p (var, print_values))
{
thread_id = varobj_get_thread_id (var);
if (thread_id > 0)
- uiout->field_int ("thread-id", thread_id);
+ uiout->field_signed ("thread-id", thread_id);
if (varobj_get_frozen (var))
- uiout->field_int ("frozen", 1);
+ uiout->field_signed ("frozen", 1);
gdb::unique_xmalloc_ptr<char> display_hint = varobj_get_display_hint (var);
if (display_hint)
uiout->field_string ("displayhint", display_hint.get ());
if (varobj_is_dynamic_p (var))
- uiout->field_int ("dynamic", 1);
+ uiout->field_signed ("dynamic", 1);
}
/* VAROBJ operations */
print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
- uiout->field_int ("has_more", varobj_has_more (var, 0));
+ uiout->field_signed ("has_more", varobj_has_more (var, 0));
}
void
numdel = varobj_delete (var, children_only_p);
- uiout->field_int ("ndeleted", numdel);
+ uiout->field_signed ("ndeleted", numdel);
}
/* Parse a string argument into a format value. */
/* Get varobj handle, if a valid var obj name was specified. */
var = varobj_get_handle (argv[0]);
- uiout->field_int ("numchild", varobj_get_num_children (var));
+ uiout->field_signed ("numchild", varobj_get_num_children (var));
}
/* Return 1 if given the argument PRINT_VALUES we should display
const std::vector<varobj *> &children
= varobj_list_children (var, &from, &to);
- uiout->field_int ("numchild", to - from);
+ uiout->field_signed ("numchild", to - from);
if (argc == 2 || argc == 4)
print_values = mi_parse_print_values (argv[0]);
else
}
}
- uiout->field_int ("has_more", varobj_has_more (var, to));
+ uiout->field_signed ("has_more", varobj_has_more (var, to));
}
void
}
if (r.type_changed || r.children_changed)
- uiout->field_int ("new_num_children",
- varobj_get_num_children (r.varobj));
+ uiout->field_signed ("new_num_children",
+ varobj_get_num_children (r.varobj));
gdb::unique_xmalloc_ptr<char> display_hint
= varobj_get_display_hint (r.varobj);
uiout->field_string ("displayhint", display_hint.get ());
if (varobj_is_dynamic_p (r.varobj))
- uiout->field_int ("dynamic", 1);
+ uiout->field_signed ("dynamic", 1);
varobj_get_child_range (r.varobj, &from, &to);
- uiout->field_int ("has_more", varobj_has_more (r.varobj, to));
+ uiout->field_signed ("has_more", varobj_has_more (r.varobj, to));
if (!r.newobj.empty ())
{
if (console_print)
print_stop_event (mi->cli_uiout);
- mi_uiout->field_int ("thread-id", tp->global_num);
+ mi_uiout->field_signed ("thread-id", tp->global_num);
if (non_stop)
{
ui_out_emit_list list_emitter (mi_uiout, "stopped-threads");
- mi_uiout->field_int (NULL, tp->global_num);
+ mi_uiout->field_signed (NULL, tp->global_num);
}
else
mi_uiout->field_string ("stopped-threads", "all");
core = target_core_of_thread (tp->ptid);
if (core != -1)
- mi_uiout->field_int ("core", core);
+ mi_uiout->field_signed ("core", core);
}
fputs_unfiltered ("*stopped", mi->raw_stdout);
uiout->field_string ("id", solib->so_original_name);
uiout->field_string ("target-name", solib->so_original_name);
uiout->field_string ("host-name", solib->so_name);
- uiout->field_int ("symbols-loaded", solib->symbols_loaded);
+ uiout->field_signed ("symbols-loaded", solib->symbols_loaded);
if (!gdbarch_has_global_solist (target_gdbarch ()))
uiout->field_fmt ("thread-group", "i%d", current_inferior ()->num);
current_thread = tp->global_num;
num++;
- current_uiout->field_int ("thread-id", tp->global_num);
+ current_uiout->field_signed ("thread-id", tp->global_num);
}
}
if (current_thread != -1)
- current_uiout->field_int ("current-thread-id", current_thread);
- current_uiout->field_int ("number-of-threads", num);
+ current_uiout->field_signed ("current-thread-id", current_thread);
+ current_uiout->field_signed ("number-of-threads", num);
}
void
uiout->field_string ("exit-code",
int_string (inferior->exit_code, 8, 0, 0, 1));
if (inferior->pid != 0)
- uiout->field_int ("pid", inferior->pid);
+ uiout->field_signed ("pid", inferior->pid);
if (inferior->pspace->pspace_exec_filename != NULL)
{
ui_out_emit_list list_emitter (uiout, "cores");
for (int b : data.cores)
- uiout->field_int (NULL, b);
+ uiout->field_signed (NULL, b);
}
if (top_data->recurse)
if (register_changed_p (regnum, prev_regs.get (),
this_regs.get ()))
- uiout->field_int (NULL, regnum);
+ uiout->field_signed (NULL, regnum);
}
}
{
if (register_changed_p (regnum, prev_regs.get (),
this_regs.get ()))
- uiout->field_int (NULL, regnum);
+ uiout->field_signed (NULL, regnum);
}
else
error (_("bad register number"));
return;
ui_out_emit_tuple tuple_emitter (uiout, NULL);
- uiout->field_int ("number", regnum);
+ uiout->field_signed ("number", regnum);
if (format == 'N')
format = 0;
/* Output the header information. */
uiout->field_core_addr ("addr", gdbarch, addr);
- uiout->field_int ("nr-bytes", nr_bytes);
- uiout->field_int ("total-bytes", total_bytes);
+ uiout->field_signed ("nr-bytes", nr_bytes);
+ uiout->field_signed ("total-bytes", total_bytes);
uiout->field_core_addr ("next-row", gdbarch, addr + word_size * nr_cols);
uiout->field_core_addr ("prev-row", gdbarch, addr - word_size * nr_cols);
uiout->field_core_addr ("next-page", gdbarch, addr + total_bytes);
{
ui_out_emit_tuple tuple_emitter (uiout.get (), NULL);
uiout->field_string ("section", section_name);
- uiout->field_int ("section-size", total_section);
- uiout->field_int ("total-size", grand_total);
+ uiout->field_signed ("section-size", total_section);
+ uiout->field_signed ("total-size", grand_total);
}
mi_out_put (uiout.get (), mi->raw_stdout);
fputs_unfiltered ("\n", mi->raw_stdout);
{
ui_out_emit_tuple tuple_emitter (uiout.get (), NULL);
uiout->field_string ("section", section_name);
- uiout->field_int ("section-sent", sent_so_far);
- uiout->field_int ("section-size", total_section);
- uiout->field_int ("total-sent", total_sent);
- uiout->field_int ("total-size", grand_total);
+ uiout->field_signed ("section-sent", sent_so_far);
+ uiout->field_signed ("section-size", total_section);
+ uiout->field_signed ("total-sent", total_sent);
+ uiout->field_signed ("total-size", grand_total);
}
mi_out_put (uiout.get (), mi->raw_stdout);
fputs_unfiltered ("\n", mi->raw_stdout);
tsv->value_known = target_get_trace_state_variable_value (tsv->number,
&tsv->value);
- uiout->field_int ("current", tsv->value);
+ uiout->field_signed ("current", tsv->value);
}
else
{
ui_out_emit_tuple tuple_emitter (uiout, NULL);
uiout->field_core_addr ("address", gdbarch, r.start);
- uiout->field_int ("length", r.length);
+ uiout->field_signed ("length", r.length);
gdb::byte_vector data (r.length);
const char *tblid)
{
open (tblid, ui_out_type_tuple);
- do_field_int (-1, -1, ui_left, "nr_rows", nr_rows);
- do_field_int (-1, -1, ui_left, "nr_cols", nr_cols);
+ do_field_signed (-1, -1, ui_left, "nr_rows", nr_rows);
+ do_field_signed (-1, -1, ui_left, "nr_cols", nr_cols);
open ("hdr", ui_out_type_list);
}
const std::string &col_hdr)
{
open (NULL, ui_out_type_tuple);
- do_field_int (0, 0, ui_center, "width", width);
- do_field_int (0, 0, ui_center, "alignment", alignment);
+ do_field_signed (0, 0, ui_center, "width", width);
+ do_field_signed (0, 0, ui_center, "alignment", alignment);
do_field_string (0, 0, ui_center, "col_name", col_name.c_str (),
ui_out_style_kind::DEFAULT);
do_field_string (0, width, alignment, "colhdr", col_hdr.c_str (),
/* Output an int field. */
void
-mi_ui_out::do_field_int (int fldno, int width, ui_align alignment,
- const char *fldname, int value)
+mi_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
+ const char *fldname, LONGEST value)
{
do_field_string (fldno, width, alignment, fldname, plongest (value),
ui_out_style_kind::DEFAULT);
virtual void do_begin (ui_out_type type, const char *id) override;
virtual void do_end (ui_out_type type) override;
- virtual void do_field_int (int fldno, int width, ui_align align,
- const char *fldname, int value) override;
+ virtual void do_field_signed (int fldno, int width, ui_align align,
+ const char *fldname, LONGEST value) override;
virtual void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value)
override;
{
ui_out_emit_tuple tuple_emitter (uiout, NULL);
uiout->field_core_addr ("pc", gdbarch, SYMTAB_LINETABLE (s)->item[i].pc);
- uiout->field_int ("line", SYMTAB_LINETABLE (s)->item[i].line);
+ uiout->field_signed ("line", SYMTAB_LINETABLE (s)->item[i].line);
}
}
else
uiout->field_skip ("current");
- uiout->field_int ("id", pspace->num);
+ uiout->field_signed ("id", pspace->num);
if (pspace->pspace_exec_filename)
uiout->field_string ("exec", pspace->pspace_exec_filename);
out->text ("=");
if (print_args_field)
- out->field_int ("arg", 1);
+ out->field_signed ("arg", 1);
/* For MI print the type, but only for simple values. This seems
weird, but this is how MI choose to format the various output
annotate_frame_begin (print_level ? level : 0,
gdbarch, address);
out->text ("#");
- out->field_fmt_int (2, ui_left, "level",
- level);
+ out->field_fmt_signed (2, ui_left, "level", level);
}
}
out->text (":");
annotate_frame_source_line ();
- out->field_int ("line", line);
+ out->field_signed ("line", line);
}
}
if (out->is_mi_like_p ())
if (!(format == BTRACE_FORMAT_PT && errcode > 0))
{
uiout->text (_("decode error ("));
- uiout->field_int ("errcode", errcode);
+ uiout->field_signed ("errcode", errcode);
uiout->text (_("): "));
}
uiout->text (errstr);
return;
uiout->text (":");
- uiout->field_int ("min line", begin);
+ uiout->field_signed ("min line", begin);
if (end == begin)
return;
uiout->text (",");
- uiout->field_int ("max line", end);
+ uiout->field_signed ("max line", end);
}
/* Get the name of a branch trace function. */
continue;
ui_out_emit_tuple tuple_emitter (current_uiout, "blklst-entry");
- current_uiout->field_int ("number", e.number ()); /* 1 */
+ current_uiout->field_signed ("number", e.number ()); /* 1 */
if (e.enabled ())
current_uiout->field_string ("enabled", "y"); /* 2 */
}
else
{
- uiout->field_int ("line", line);
+ uiout->field_signed ("line", line);
uiout->text ("\tin ");
/* CLI expects only the "file" field. TUI expects only the
if (current_uiout->is_mi_like_p ())
{
- current_uiout->field_int ("signal1_pending", signal1_pending);
+ current_uiout->field_signed ("signal1_pending", signal1_pending);
current_uiout->field_fmt ("signal1", "0x%s", phex_nz (signal1, 4));
- current_uiout->field_int ("signal1_type", signal1_type);
- current_uiout->field_int ("signal2_pending", signal2_pending);
+ current_uiout->field_signed ("signal1_type", signal1_type);
+ current_uiout->field_signed ("signal2_pending", signal2_pending);
current_uiout->field_fmt ("signal2", "0x%s", phex_nz (signal2, 4));
- current_uiout->field_int ("signal2_type", signal2_type);
+ current_uiout->field_signed ("signal2_type", signal2_type);
}
else
{
if (spu_mfc_opcode[mfc_cmd_opcode])
current_uiout->field_string ("opcode", spu_mfc_opcode[mfc_cmd_opcode]);
else
- current_uiout->field_int ("opcode", mfc_cmd_opcode);
+ current_uiout->field_signed ("opcode", mfc_cmd_opcode);
- current_uiout->field_int ("tag", mfc_cmd_tag);
- current_uiout->field_int ("tid", tclass_id);
- current_uiout->field_int ("rid", rclass_id);
+ current_uiout->field_signed ("tag", mfc_cmd_tag);
+ current_uiout->field_signed ("tid", tclass_id);
+ current_uiout->field_signed ("rid", rclass_id);
if (ea_valid_p)
current_uiout->field_fmt ("ea", "0x%s", phex (mfc_ea, 8));
if (print_level)
{
uiout->text ("#");
- uiout->field_fmt_int (2, ui_left, "level",
- frame_relative_level (frame));
+ uiout->field_fmt_signed (2, ui_left, "level",
+ frame_relative_level (frame));
}
if (uiout->is_mi_like_p ())
{
if (print_level)
{
uiout->text ("#");
- uiout->field_fmt_int (2, ui_left, "level",
- frame_relative_level (frame));
+ uiout->field_fmt_signed (2, ui_left, "level",
+ frame_relative_level (frame));
}
get_user_print_options (&opts);
if (opts.addressprint)
annotate_frame_source_file_end ();
uiout->text (":");
annotate_frame_source_line ();
- uiout->field_int ("line", sal.line);
+ uiout->field_signed ("line", sal.line);
annotate_frame_source_end ();
}
}
if (show_global_ids || uiout->is_mi_like_p ())
- uiout->field_int ("id", tp->global_num);
+ uiout->field_signed ("id", tp->global_num);
/* For the CLI, we stuff everything into the target-id field.
This is a gross hack to make the output come out looking
core = target_core_of_thread (tp->ptid);
if (uiout->is_mi_like_p () && core != -1)
- uiout->field_int ("core", core);
+ uiout->field_signed ("core", core);
}
/* This end scope restores the current thread and the frame
if (pid == -1 && requested_threads == NULL)
{
if (uiout->is_mi_like_p () && inferior_ptid != null_ptid)
- uiout->field_int ("current-thread-id", current_thread->global_num);
+ uiout->field_signed ("current-thread-id", current_thread->global_num);
if (inferior_ptid != null_ptid && current_exited)
uiout->message ("\n\
{
if (uiout->is_mi_like_p ())
{
- uiout->field_int ("new-thread-id",
- inferior_thread ()->global_num);
+ uiout->field_signed ("new-thread-id",
+ inferior_thread ()->global_num);
}
else
{
{
uiout->field_string ("stop-reason", stop_reason);
if (stopping_tracepoint != -1)
- uiout->field_int ("stopping-tracepoint",
- stopping_tracepoint);
+ uiout->field_signed ("stopping-tracepoint",
+ stopping_tracepoint);
if (ts->stop_reason == tracepoint_error)
uiout->field_string ("error-description",
ts->stop_desc);
}
if (ts->traceframe_count != -1)
- uiout->field_int ("frames", ts->traceframe_count);
+ uiout->field_signed ("frames", ts->traceframe_count);
if (ts->traceframes_created != -1)
- uiout->field_int ("frames-created", ts->traceframes_created);
+ uiout->field_signed ("frames-created", ts->traceframes_created);
if (ts->buffer_size != -1)
- uiout->field_int ("buffer-size", ts->buffer_size);
+ uiout->field_signed ("buffer-size", ts->buffer_size);
if (ts->buffer_free != -1)
- uiout->field_int ("buffer-free", ts->buffer_free);
+ uiout->field_signed ("buffer-free", ts->buffer_free);
- uiout->field_int ("disconnected", ts->disconnected_tracing);
- uiout->field_int ("circular", ts->circular_buffer);
+ uiout->field_signed ("disconnected", ts->disconnected_tracing);
+ uiout->field_signed ("circular", ts->circular_buffer);
uiout->field_string ("user-name", ts->user_name);
uiout->field_string ("notes", ts->notes);
if (uiout->is_mi_like_p ())
{
uiout->field_string ("found", "1");
- uiout->field_int ("tracepoint", tracepoint_number);
- uiout->field_int ("traceframe", traceframe_number);
+ uiout->field_signed ("tracepoint", tracepoint_number);
+ uiout->field_signed ("traceframe", traceframe_number);
}
else
{
/* A counter field to help readability. This is not a stable
identifier! */
- uiout->field_int ("count", count);
+ uiout->field_signed ("count", count);
uiout->field_string ("marker-id", marker.str_id.c_str ());
else
uiout->field_skip ("fullname");
- uiout->field_int ("line", sal.line);
+ uiout->field_signed ("line", sal.line);
}
else
{
if (ix > 0)
uiout->text (", ");
uiout->text ("#");
- uiout->field_int ("tracepoint-id", tracepoints[ix]->number);
+ uiout->field_signed ("tracepoint-id", tracepoints[ix]->number);
}
}
if (uiout->is_mi_like_p ())
- uiout->field_int ("number-of-tracepoints", tracepoints.size ());
+ uiout->field_signed ("number-of-tracepoints", tracepoints.size ());
else
uiout->text ("\n");
}
/* Output an int field. */
void
-tui_ui_out::do_field_int (int fldno, int width, ui_align alignment,
- const char *fldname, int value)
+tui_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
+ const char *fldname, LONGEST value)
{
if (suppress_output ())
return;
}
m_start_of_line++;
- cli_ui_out::do_field_int (fldno, width, alignment, fldname, value);
+ cli_ui_out::do_field_signed (fldno, width, alignment, fldname, value);
}
/* Other cli_field_* end up here so alignment and field separators are
protected:
- void do_field_int (int fldno, int width, ui_align align, const char *fldname,
- int value) override;
+ void do_field_signed (int fldno, int width, ui_align align, const char *fldname,
+ LONGEST value) override;
void do_field_string (int fldno, int width, ui_align align, const char *fldname,
const char *string, ui_out_style_kind style) override;
void do_field_fmt (int fldno, int width, ui_align align, const char *fldname,
}
void
-ui_out::field_int (const char *fldname, int value)
+ui_out::field_signed (const char *fldname, LONGEST value)
{
int fldno;
int width;
verify_field (&fldno, &width, &align);
- do_field_int (fldno, width, align, fldname, value);
+ do_field_signed (fldno, width, align, fldname, value);
}
void
-ui_out::field_fmt_int (int input_width, ui_align input_align,
- const char *fldname, int value)
+ui_out::field_fmt_signed (int input_width, ui_align input_align,
+ const char *fldname, LONGEST value)
{
int fldno;
int width;
verify_field (&fldno, &width, &align);
- do_field_int (fldno, input_width, input_align, fldname, value);
+ do_field_signed (fldno, input_width, input_align, fldname, value);
}
/* See ui-out.h. */
void begin (ui_out_type type, const char *id);
void end (ui_out_type type);
- void field_int (const char *fldname, int value);
- void field_fmt_int (int width, ui_align align, const char *fldname,
- int value);
- /* Like field_int, but print an unsigned value. */
+ void field_signed (const char *fldname, LONGEST value);
+ void field_fmt_signed (int width, ui_align align, const char *fldname,
+ LONGEST value);
+ /* Like field_signed, but print an unsigned value. */
void field_unsigned (const char *fldname, ULONGEST value);
void field_core_addr (const char *fldname, struct gdbarch *gdbarch,
CORE_ADDR address);
virtual void do_begin (ui_out_type type, const char *id) = 0;
virtual void do_end (ui_out_type type) = 0;
- virtual void do_field_int (int fldno, int width, ui_align align,
- const char *fldname, int value) = 0;
+ virtual void do_field_signed (int fldno, int width, ui_align align,
+ const char *fldname, LONGEST value) = 0;
virtual void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value) = 0;
virtual void do_field_skip (int fldno, int width, ui_align align,