aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-02-03 16:16:42 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-02-03 16:16:42 +0000
commit56d397a3824d826cdbaa02dba633bd86da6308c5 (patch)
treeebda19dac51d37293eacbeefd8cd32fcc3554967 /gdb/source.c
parent05cba821addfe83535ad36f7487d1d2bbac48ba2 (diff)
downloadgdb-56d397a3824d826cdbaa02dba633bd86da6308c5.zip
gdb-56d397a3824d826cdbaa02dba633bd86da6308c5.tar.gz
gdb-56d397a3824d826cdbaa02dba633bd86da6308c5.tar.bz2
gdb/
* source.c (print_source_lines_base): Print for TUI also "fullname". * tui/tui-data.c (init_content_element): Change tui_locator_element field to full_name. * tui/tui-data.h (struct tui_locator_element): Likewise. * tui/tui-disasm.c (tui_show_disassem_and_update_source): Rename tui_update_locator_filename calls to tui_update_locator_fullname. Replace symtab->filename refererence by symtab_to_fullname call. * tui/tui-out.c (tui_field_string): Check for "fullname" now. * tui/tui-source.c (tui_set_source_content): Change tui_locator_element field to full_name. Replace symtab->filename refererence by symtab_to_fullname call. (tui_show_symtab_source): Rename parameter to fullname. Change tui_locator_element field to full_name. * tui/tui-stack.c: Include source.h. (tui_set_locator_filename): Rename the declaration to ... (tui_set_locator_fullname): ... here. Rename its parameter to fullname, updates its comment. (tui_set_locator_info): Rename its parameter to fullname. (tui_set_locator_filename): Rename the definition to ... (tui_set_locator_fullname): ... here. Rename its parameter to fullname, updates its comment. Change tui_locator_element field to full_name. (tui_set_locator_info): Rename its parameter to fullname. (tui_set_locator_info): Rename callee to tui_set_locator_fullname. (tui_update_locator_filename): Rename to ... (tui_update_locator_fullname): ... here. Rename callee to tui_set_locator_fullname. (tui_show_frame_info): Replace symtab->filename refererence by symtab_to_fullname call. * tui/tui-stack.h (tui_update_locator_filename): Rename to ... (tui_update_locator_fullname): ... here. * tui/tui-winsource.c (tui_display_main): Rename the callee to tui_update_locator_fullname. Replace symtab->filename refererence by symtab_to_fullname call. * tui/tui.c (tui_show_source): Rename its parameter to fullname. Rename the callee to tui_update_locator_fullname. * tui/tui.h (tui_show_source): Rename its parameter to fullname.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 45140fc..ef2ea03 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1346,7 +1346,11 @@ print_source_lines_base (struct symtab *s, int line, int stopline,
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);