Return NULL if no substitution rule was specified by the user,
or if no rule applied to the given PATH. */
-static char *
+char *
rewrite_source_path (const char *path)
{
const struct substitute_path_rule *rule = get_substitute_path_rule (path);
ui_out_text (uiout, "\tin ");
ui_out_field_string (uiout, "file",
symtab_to_filename_for_display (s));
- if (ui_out_is_mi_like_p (uiout))
+
+ /* TUI expects the "fullname" field. While it is
+ !ui_out_is_mi_like_p compared to CLI it is !ui_source_list. */
+ if (ui_out_is_mi_like_p (uiout)
+ || !ui_out_test_flags (uiout, ui_source_list))
{
const char *fullname = symtab_to_fullname (s);