+2019-12-20 Tom Tromey <tom@tromey.com>
+
+ * tui/tui.c (tui_show_source): Update.
+ * tui/tui-winsource.c (tui_display_main): Update.
+ * tui/tui-stack.h (tui_update_locator_fullname): Change parameter
+ to symtab.
+ * tui/tui-stack.c (tui_update_locator_fullname): Change parameter
+ to symtab.
+ * tui/tui-disasm.c (tui_show_disassem_and_update_source): Update.
+
2019-12-20 Tom Tromey <tom@tromey.com>
PR tui/23619:
val.u.line_no = sal.line;
TUI_SRC_WIN->update_source_window (gdbarch, sal.symtab, val);
if (sal.symtab)
- {
- set_current_source_symtab_and_line (sal);
- tui_update_locator_fullname (symtab_to_fullname (sal.symtab));
- }
- else
- tui_update_locator_fullname ("?");
+ set_current_source_symtab_and_line (sal);
+ tui_update_locator_fullname (sal.symtab);
}
}
/* Update only the full_name portion of the locator. */
void
-tui_update_locator_fullname (const char *fullname)
+tui_update_locator_fullname (struct symtab *symtab)
{
struct tui_locator_window *locator = tui_locator_win_info_ptr ();
+ const char *fullname;
+ if (symtab != nullptr)
+ fullname = symtab_to_fullname (symtab);
+ else
+ fullname = "??";
locator->set_locator_fullname (fullname);
}
std::string make_status_line () const;
};
-extern void tui_update_locator_fullname (const char *);
+extern void tui_update_locator_fullname (struct symtab *symtab);
extern void tui_show_locator_content (void);
extern int tui_show_frame_info (struct frame_info *);
tui_update_source_windows_with_addr (gdbarch, addr);
s = find_pc_line_symtab (addr);
- if (s != NULL)
- tui_update_locator_fullname (symtab_to_fullname (s));
- else
- tui_update_locator_fullname ("??");
+ tui_update_locator_fullname (s);
}
}
}
tui_add_win_to_layout (SRC_WIN);
tui_update_source_windows_with_line (cursal.symtab, line);
- tui_update_locator_fullname (fullname);
+ tui_update_locator_fullname (cursal.symtab);
}
void