From: Tom de Vries <tdevries@suse.de>
To: Stephan Rohr <stephan.rohr@intel.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v1 1/1] gdb: default 'id' to nullptr in 'ui_out_emit_type'
Date: Tue, 4 Aug 2026 17:09:21 +0200 [thread overview]
Message-ID: <307534db-0093-46ee-8e55-2f9ab89d1542@suse.de> (raw)
In-Reply-To: <20260804133752.228956-2-stephan.rohr@intel.com>
On 8/4/26 3:37 PM, Stephan Rohr wrote:
> From: Nils-Christian Kempke <nils-christian.kempke@intel.com>
>
> Make 'id = nullptr' the default argument for the 'ui_out_emit_type'
> ctor.
>
> Co-Authored-By: Stephan Rohr <stephan.rohr@intel.com>
Hi,
the patch LGTM.
FWIW, because branch descriptions are not committed, it's custumory to
keep branch descriptions to a minimum, and put the interesting content
in the patch. Please consider this for your next submission.
Approved-By: Tom de Vries <tdevries@suse.de>
Thanks,
- Tom
> ---
> gdb/ada-tasks.c | 2 +-
> gdb/auto-load.c | 2 +-
> gdb/breakpoint.c | 2 +-
> gdb/corelow.c | 2 +-
> gdb/disasm.c | 2 +-
> gdb/frame-unwind.c | 2 +-
> gdb/gdb_bfd.c | 2 +-
> gdb/inferior.c | 2 +-
> gdb/linux-fork.c | 2 +-
> gdb/linux-tdep.c | 4 ++--
> gdb/linux-thread-db.c | 2 +-
> gdb/mi/mi-cmd-file.c | 2 +-
> gdb/mi/mi-cmd-info.c | 2 +-
> gdb/mi/mi-cmd-var.c | 4 ++--
> gdb/mi/mi-interp.c | 2 +-
> gdb/mi/mi-main.c | 20 ++++++++++----------
> gdb/mi/mi-symbol-cmds.c | 12 ++++++------
> gdb/progspace.c | 2 +-
> gdb/regcache.c | 2 +-
> gdb/reggroups.c | 2 +-
> gdb/stack.c | 2 +-
> gdb/symmisc.c | 2 +-
> gdb/symtab.c | 2 +-
> gdb/target-connection.c | 2 +-
> gdb/thread.c | 2 +-
> gdb/tui/tui-win.c | 2 +-
> gdb/ui-out.h | 2 +-
> gdb/user-regs.c | 2 +-
> 28 files changed, 44 insertions(+), 44 deletions(-)
>
> diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
> index 6a91bf1953c..7dfa819a937 100644
> --- a/gdb/ada-tasks.c
> +++ b/gdb/ada-tasks.c
> @@ -1137,7 +1137,7 @@ print_ada_task_info (struct ui_out *uiout,
> if (taskno_arg && taskno != taskno_arg)
> continue;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> /* Print a star if this task is the current task (or the task
> currently selected). */
> diff --git a/gdb/auto-load.c b/gdb/auto-load.c
> index 55204ba4a1f..ccbd091e1c2 100644
> --- a/gdb/auto-load.c
> +++ b/gdb/auto-load.c
> @@ -1259,7 +1259,7 @@ print_script (struct loaded_script *script)
> {
> struct ui_out *uiout = current_uiout;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_string ("loaded", script->loaded ? "Yes" : "No");
> uiout->field_string ("script", script->name);
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index ca600a845e5..6ca196133fd 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -7009,7 +7009,7 @@ print_one_breakpoint (breakpoint *b, const bp_location **last_loc, int allflag)
> int n = 1;
> for (bp_location &loc : b->locations ())
> {
> - ui_out_emit_tuple loc_tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple loc_tuple_emitter (uiout);
> print_one_breakpoint_location (b, &loc, n, last_loc,
> allflag, allflag);
> n++;
> diff --git a/gdb/corelow.c b/gdb/corelow.c
> index a87e082db87..cd36882a12c 100644
> --- a/gdb/corelow.c
> +++ b/gdb/corelow.c
> @@ -1940,7 +1940,7 @@ core_target::info_proc_mappings (struct gdbarch *gdbarch)
> ULONGEST file_ofs = tsp.the_bfd_section->filepos;
> const char *filename = bfd_get_filename (tsp.the_bfd_section->owner);
>
> - ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (current_uiout);
> current_uiout->field_core_addr ("start", gdbarch, start);
> current_uiout->field_core_addr ("end", gdbarch, end);
> /* These next two aren't really addresses and so shouldn't be
> diff --git a/gdb/disasm.c b/gdb/disasm.c
> index a61bd203b6f..01361fe4323 100644
> --- a/gdb/disasm.c
> +++ b/gdb/disasm.c
> @@ -331,7 +331,7 @@ gdb_pretty_print_disassembler::pretty_print_insn (const struct disasm_insn *insn
> struct gdbarch *gdbarch = arch ();
>
> {
> - ui_out_emit_tuple tuple_emitter (m_uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (m_uiout);
> pc = insn->addr;
>
> if (insn->number != 0)
> diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
> index a942ed8c207..91a3cbe7eeb 100644
> --- a/gdb/frame-unwind.c
> +++ b/gdb/frame-unwind.c
> @@ -453,7 +453,7 @@ maintenance_info_frame_unwinders (const char *args, int from_tty)
>
> for (const auto &unwinder : table)
> {
> - ui_out_emit_list tuple_emitter (uiout, nullptr);
> + ui_out_emit_list tuple_emitter (uiout);
> uiout->field_string ("name", unwinder->name ());
> uiout->field_string ("type", frame_type_str (unwinder->type ()));
> uiout->field_string ("class", frame_unwinder_class_str (
> diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
> index 749d19789cf..5def8093138 100644
> --- a/gdb/gdb_bfd.c
> +++ b/gdb/gdb_bfd.c
> @@ -1237,7 +1237,7 @@ maintenance_info_bfds (const char *arg, int from_tty)
> for (auto abfd : all_bfds)
> {
> auto gdata = static_cast<gdb_bfd_data *> (bfd_usrdata (abfd));
> - ui_out_emit_tuple tuple_emitter (uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_signed ("refcount", gdata->refc);
> uiout->field_string ("addr", host_address_to_string (abfd));
> uiout->field_string ("filename", bfd_get_filename (abfd),
> diff --git a/gdb/inferior.c b/gdb/inferior.c
> index 1481f46cdd1..229abdd1ef8 100644
> --- a/gdb/inferior.c
> +++ b/gdb/inferior.c
> @@ -588,7 +588,7 @@ print_inferior (struct ui_out *uiout, const char *requested_inferiors)
> if (!number_is_in_list (requested_inferiors, inf->num))
> continue;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (inf == current_inf)
> uiout->field_string ("current", "*");
> diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
> index 92afa4dde6d..087c5bbe072 100644
> --- a/gdb/linux-fork.c
> +++ b/gdb/linux-fork.c
> @@ -839,7 +839,7 @@ print_checkpoints (struct ui_out *uiout, inferior *req_inf, fork_info *req_fi)
> thread_info *t = any_thread_of_inferior (inf);
> bool is_current = fi.ptid.pid () == inf->pid;
>
> - ui_out_emit_tuple tuple_emitter (uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (is_current && cur_inf == inf)
> uiout->field_string ("current", "*");
> diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
> index 25d625db595..23e43ba5c5f 100644
> --- a/gdb/linux-tdep.c
> +++ b/gdb/linux-tdep.c
> @@ -927,7 +927,7 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args,
> {
> struct mapping m = read_mapping (line);
>
> - ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (current_uiout);
> current_uiout->field_core_addr ("start", gdbarch, m.addr);
> current_uiout->field_core_addr ("end", gdbarch, m.endaddr);
> /* These next two aren't really addresses and so
> @@ -1368,7 +1368,7 @@ linux_core_info_proc_mappings (struct gdbarch *gdbarch, struct bfd *cbfd,
> current_uiout->table_body ();
> }
>
> - ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (current_uiout);
> current_uiout->field_core_addr ("start", gdbarch, start);
> current_uiout->field_core_addr ("end", gdbarch, end);
> /* These next two aren't really addresses and so shouldn't be
> diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
> index 5e506c4f497..dd67950f619 100644
> --- a/gdb/linux-thread-db.c
> +++ b/gdb/linux-thread-db.c
> @@ -1936,7 +1936,7 @@ info_auto_load_libthread_db (const char *args, int from_tty)
> /* Note I is incremented inside the cycle, not at its end. */
> for (i = 0; i < array.size ();)
> {
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> info = array[i];
> uiout->field_string ("filename", info->filename,
> diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
> index 8b2fb379ec8..a515be0a487 100644
> --- a/gdb/mi/mi-cmd-file.c
> +++ b/gdb/mi/mi-cmd-file.c
> @@ -168,7 +168,7 @@ mi_cmd_file_list_shared_libraries (const char *command,
> if (pattern != nullptr && !re_exec (so.name.c_str ()))
> continue;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> mi_output_solib_attribs (uiout, so);
> }
> }
> diff --git a/gdb/mi/mi-cmd-info.c b/gdb/mi/mi-cmd-info.c
> index a33e2edaab1..d5ef3bb2974 100644
> --- a/gdb/mi/mi-cmd-info.c
> +++ b/gdb/mi/mi-cmd-info.c
> @@ -55,7 +55,7 @@ mi_cmd_info_ada_exceptions (const char *command, const char *const *argv,
>
> for (const ada_exc_info &info : exceptions)
> {
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_string ("name", info.name);
> uiout->field_core_addr ("address", gdbarch, info.addr);
> }
> diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
> index 1f7e0fdfe3d..f9c318db39e 100644
> --- a/gdb/mi/mi-cmd-var.c
> +++ b/gdb/mi/mi-cmd-var.c
> @@ -679,7 +679,7 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
> {
> int from, to;
>
> - ui_out_emit_tuple tuple_emitter (uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_string ("name", varobj_get_objname (r.varobj));
>
> switch (r.status)
> @@ -737,7 +737,7 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
>
> for (varobj *child : r.newobj)
> {
> - ui_out_emit_tuple inner_tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple inner_tuple_emitter (uiout);
> print_varobj (child, print_values, 1 /* print_expression */);
> }
> }
> diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
> index 1a0d34106ed..207b1fc97ff 100644
> --- a/gdb/mi/mi-interp.c
> +++ b/gdb/mi/mi-interp.c
> @@ -725,7 +725,7 @@ mi_output_solib_attribs_1 (ui_out *uiout, const solib &solib,
> uiout->field_fmt ("thread-group", "i%d", current_inferior ()->num);
>
> ui_out_emit_list list_emitter (uiout, "ranges");
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> if (solib.addr_high != 0)
> {
> uiout->field_core_addr ("from", gdbarch, solib.addr_low);
> diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
> index a3c78f9f20a..8b6da41ffeb 100644
> --- a/gdb/mi/mi-main.c
> +++ b/gdb/mi/mi-main.c
> @@ -588,7 +588,7 @@ print_one_inferior (struct inferior *inferior, bool recurse,
> if (ids.empty () || (ids.find (inferior->pid) != ids.end ()))
> {
> gdb::unordered_set<int> cores;
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_fmt ("id", "i%d", inferior->num);
> uiout->field_string ("type", "process");
> @@ -684,7 +684,7 @@ list_available_thread_groups (const gdb::unordered_set<int> &ids, int recurse)
> if (!ids.empty () && ids.find (pid_i) == ids.end ())
> continue;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_string ("id", *pid);
> uiout->field_string ("type", "process");
> @@ -706,7 +706,7 @@ list_available_thread_groups (const gdb::unordered_set<int> &ids, int recurse)
>
> for (const osdata_item &child : children)
> {
> - ui_out_emit_tuple inner_tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple inner_tuple_emitter (uiout);
> const std::string *tid = get_osdata_column (child, "tid");
> const std::string *tcore = get_osdata_column (child, "core");
>
> @@ -1058,7 +1058,7 @@ output_register (const frame_info_ptr &frame, int regnum, int format,
> if (skip_unavailable && !val->entirely_available ())
> return;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_signed ("number", regnum);
>
> if (format == 'N')
> @@ -1311,7 +1311,7 @@ mi_cmd_data_read_memory (const char *command, const char *const *argv,
> int col_byte;
> struct value_print_options print_opts;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_core_addr ("addr", gdbarch, addr + row_byte);
> /* ui_out_field_core_addr_symbolic (uiout, "saddr", addr +
> row_byte); */
> @@ -1410,7 +1410,7 @@ mi_cmd_data_read_memory_bytes (const char *command, const char *const *argv,
> ui_out_emit_list list_emitter (uiout, "memory");
> for (const memory_read_result &read_result : result)
> {
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_core_addr ("begin", gdbarch, read_result.begin);
> uiout->field_core_addr ("offset", gdbarch, read_result.begin - addr);
> @@ -2198,7 +2198,7 @@ mi_load_progress (const char *section_name,
> gdb_puts (mi->current_token, mi->raw_stdout);
> gdb_puts ("+download", mi->raw_stdout);
> {
> - ui_out_emit_tuple tuple_emitter (uiout.get (), NULL);
> + ui_out_emit_tuple tuple_emitter (uiout.get ());
> uiout->field_string ("section", section_name);
> uiout->field_signed ("section-size", total_section);
> uiout->field_signed ("total-size", grand_total);
> @@ -2216,7 +2216,7 @@ mi_load_progress (const char *section_name,
> gdb_puts (mi->current_token, mi->raw_stdout);
> gdb_puts ("+download", mi->raw_stdout);
> {
> - ui_out_emit_tuple tuple_emitter (uiout.get (), NULL);
> + ui_out_emit_tuple tuple_emitter (uiout.get ());
> uiout->field_string ("section", section_name);
> uiout->field_signed ("section-sent", sent_so_far);
> uiout->field_signed ("section-size", total_section);
> @@ -2647,7 +2647,7 @@ mi_cmd_trace_frame_collected (const char *command, const char *const *argv,
>
> tsv = find_trace_state_variable_by_number (tvar);
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (tsv != NULL)
> {
> @@ -2677,7 +2677,7 @@ mi_cmd_trace_frame_collected (const char *command, const char *const *argv,
> {
> gdbarch *gdbarch = current_inferior ()->arch ();
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_core_addr ("address", gdbarch, r.start);
> uiout->field_signed ("length", r.length);
> diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c
> index 67f570761da..58f2feef553 100644
> --- a/gdb/mi/mi-symbol-cmds.c
> +++ b/gdb/mi/mi-symbol-cmds.c
> @@ -57,7 +57,7 @@ mi_cmd_symbol_list_lines (const char *command, const char *const *argv,
> if (s->linetable () != NULL && s->linetable ()->nitems > 0)
> for (i = 0; i < s->linetable ()->nitems; i++)
> {
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_core_addr ("pc", gdbarch,
> s->linetable ()->item[i].pc (objfile));
> uiout->field_signed ("line", s->linetable ()->item[i].line);
> @@ -74,7 +74,7 @@ static void
> output_debug_symbol (ui_out *uiout, domain_search_flags kind,
> struct symbol *sym, int block)
> {
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (sym->line () != 0)
> uiout->field_unsigned ("line", sym->line ());
> @@ -98,7 +98,7 @@ static void
> output_nondebug_symbol (ui_out *uiout, const bound_minimal_symbol &msymbol)
> {
> struct gdbarch *gdbarch = msymbol.objfile->arch ();
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_core_addr ("address", gdbarch,
> msymbol.value_address ());
> @@ -134,7 +134,7 @@ mi_symbol_info (domain_search_flags kind, const char *name_regexp,
> while (i < symbols.size () && symbols[i].msymbol.minsym == nullptr)
> {
> symtab *symtab = symbols[i].symbol->symtab ();
> - ui_out_emit_tuple symtab_tuple_emitter (uiout, nullptr);
> + ui_out_emit_tuple symtab_tuple_emitter (uiout);
>
> uiout->field_string ("filename",
> symtab_to_filename_for_display (symtab));
> @@ -261,7 +261,7 @@ output_module_symbols_in_single_module_and_file
> symtab *first_symbtab = first_result_symbol->symtab ();
>
> /* Formatted output. */
> - ui_out_emit_tuple current_file (uiout, nullptr);
> + ui_out_emit_tuple current_file (uiout);
> uiout->field_string ("filename",
> symtab_to_filename_for_display (first_symbtab));
> uiout->field_string ("fullname", symtab_to_fullname (first_symbtab));
> @@ -295,7 +295,7 @@ output_module_symbols_in_single_module
> const symbol *first_module_symbol = iter->first.symbol;
>
> /* Create output formatting. */
> - ui_out_emit_tuple module_tuple (uiout, nullptr);
> + ui_out_emit_tuple module_tuple (uiout);
> uiout->field_string ("module", first_module_symbol->print_name ());
> ui_out_emit_list files_list (uiout, "files");
>
> diff --git a/gdb/progspace.c b/gdb/progspace.c
> index 1407b058dfd..988bb237030 100644
> --- a/gdb/progspace.c
> +++ b/gdb/progspace.c
> @@ -363,7 +363,7 @@ print_program_space (struct ui_out *uiout, int requested)
> if (requested != -1 && requested != pspace->num)
> continue;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (pspace == current_program_space)
> uiout->field_string ("current", "*");
> diff --git a/gdb/regcache.c b/gdb/regcache.c
> index e94a94c48eb..773e8ac37d0 100644
> --- a/gdb/regcache.c
> +++ b/gdb/regcache.c
> @@ -1542,7 +1542,7 @@ register_dump::dump (ui_out *out, const char *name)
>
> for (regnum = 0; regnum < descr->nr_cooked_registers; regnum++)
> {
> - ui_out_emit_tuple tuple_emitter (out, nullptr);
> + ui_out_emit_tuple tuple_emitter (out);
>
> /* Name. */
> const char *p = gdbarch_register_name (m_gdbarch, regnum);
> diff --git a/gdb/reggroups.c b/gdb/reggroups.c
> index 9619aac2b8c..b0d3fd82185 100644
> --- a/gdb/reggroups.c
> +++ b/gdb/reggroups.c
> @@ -188,7 +188,7 @@ reggroups_dump (gdbarch *gdbarch, ui_out *out)
>
> for (const struct reggroup *group : gdbarch_reggroups (gdbarch))
> {
> - ui_out_emit_tuple tuple_emitter (out, nullptr);
> + ui_out_emit_tuple tuple_emitter (out);
>
> /* Group name. */
> out->field_string ("group", group->name ());
> diff --git a/gdb/stack.c b/gdb/stack.c
> index f41f818cebb..954ef6b11a4 100644
> --- a/gdb/stack.c
> +++ b/gdb/stack.c
> @@ -424,7 +424,7 @@ print_frame_arg (const frame_print_options &fp_opts,
> && arg->entry_kind == print_entry_values_compact));
>
> annotate_arg_emitter arg_emitter;
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
> gdb_puts (arg->sym->print_name (), &stb);
> if (arg->entry_kind == print_entry_values_compact)
> {
> diff --git a/gdb/symmisc.c b/gdb/symmisc.c
> index 6d90765fe50..9e9c6e4c4e5 100644
> --- a/gdb/symmisc.c
> +++ b/gdb/symmisc.c
> @@ -1018,7 +1018,7 @@ maintenance_print_one_line_table (struct symtab *symtab, void *data)
> const linetable_entry *item;
>
> item = &linetable->item [i];
> - ui_out_emit_tuple tuple_emitter (uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (uiout);
> uiout->field_signed ("index", i);
> if (item->line > 0)
> uiout->field_signed ("line", item->line,
> diff --git a/gdb/symtab.c b/gdb/symtab.c
> index 5d5076f2e77..4c27f3951fd 100644
> --- a/gdb/symtab.c
> +++ b/gdb/symtab.c
> @@ -4385,7 +4385,7 @@ output_source_filename_data::output (const char *disp_name,
> if (!m_filter.matches (fullname))
> return;
>
> - ui_out_emit_tuple ui_emitter (m_uiout, nullptr);
> + ui_out_emit_tuple ui_emitter (m_uiout);
>
> /* Print it and reset *FIRST. */
> if (!m_first)
> diff --git a/gdb/target-connection.c b/gdb/target-connection.c
> index 953d4e67872..ec074268c0a 100644
> --- a/gdb/target-connection.c
> +++ b/gdb/target-connection.c
> @@ -124,7 +124,7 @@ print_connection (struct ui_out *uiout, const char *requested_connections)
> if (!number_is_in_list (requested_connections, t->connection_number))
> continue;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (current_inferior ()->process_target () == t)
> uiout->field_string ("current", "*");
> diff --git a/gdb/thread.c b/gdb/thread.c
> index 7815d76b5e2..9571c866276 100644
> --- a/gdb/thread.c
> +++ b/gdb/thread.c
> @@ -1186,7 +1186,7 @@ do_print_thread (ui_out *uiout, const char *requested_threads,
> global_ids, pid, tp))
> return;
>
> - ui_out_emit_tuple tuple_emitter (uiout, NULL);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> if (!uiout->is_mi_like_p ())
> {
> diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
> index c5cca2fdd00..7b174b13913 100644
> --- a/gdb/tui/tui-win.c
> +++ b/gdb/tui/tui-win.c
> @@ -769,7 +769,7 @@ tui_all_windows_info (const char *arg, int from_tty)
> for (tui_win_info *win_info : all_tui_windows ())
> if (win_info->is_visible ())
> {
> - ui_out_emit_tuple tuple_emitter (uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (uiout);
>
> uiout->field_string ("name", win_info->name ());
> uiout->field_signed ("lines", win_info->height);
> diff --git a/gdb/ui-out.h b/gdb/ui-out.h
> index d59e58631e9..0c82e82bf6e 100644
> --- a/gdb/ui-out.h
> +++ b/gdb/ui-out.h
> @@ -421,7 +421,7 @@ class ui_out_emit_type
> {
> public:
>
> - ui_out_emit_type (struct ui_out *uiout, const char *id)
> + ui_out_emit_type (struct ui_out *uiout, const char *id = nullptr)
> : m_uiout (uiout)
> {
> uiout->begin (Type, id);
> diff --git a/gdb/user-regs.c b/gdb/user-regs.c
> index 527ebcd1f13..f1c6c9a1b24 100644
> --- a/gdb/user-regs.c
> +++ b/gdb/user-regs.c
> @@ -223,7 +223,7 @@ maintenance_print_user_registers (const char *args, int from_tty)
>
> for (reg = regs->first; reg != NULL; reg = reg->next, ++regnum)
> {
> - ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
> + ui_out_emit_tuple tuple_emitter (current_uiout);
> current_uiout->field_string ("name", reg->name);
> current_uiout->field_signed ("regnum", regnum);
> current_uiout->text ("\n");
prev parent reply other threads:[~2026-08-04 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 13:37 [PATCH v1 0/1] " Stephan Rohr
2026-08-04 13:37 ` [PATCH v1 1/1] " Stephan Rohr
2026-08-04 15:09 ` Tom de Vries [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=307534db-0093-46ee-8e55-2f9ab89d1542@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=stephan.rohr@intel.com \
/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