diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-03-14 14:35:17 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-03-14 14:35:17 +0000 |
commit | 23eb71e428cfd7fb7bb92e1edd4ad9ec5cbcc8fa (patch) | |
tree | 879a205622fe688e8c2c925db04b4177bd6d21b9 /gdb | |
parent | ae59b1da2198f9bcbf43a9c9a936d155d36c300a (diff) | |
download | gdb-23eb71e428cfd7fb7bb92e1edd4ad9ec5cbcc8fa.zip gdb-23eb71e428cfd7fb7bb92e1edd4ad9ec5cbcc8fa.tar.gz gdb-23eb71e428cfd7fb7bb92e1edd4ad9ec5cbcc8fa.tar.bz2 |
gdb/
* source.c (print_source_lines_base): Suppress "file" for TUI.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/source.c | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2d911aa..6bb1f44 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-03-14 Hui Zhu <hui_zhu@mentor.com> + Jan Kratochvil <jan.kratochvil@redhat.com> + + * source.c (print_source_lines_base): Suppress "file" for TUI. + 2013-03-14 Keith Seitz <keiths@redhat.com> Alan Matsuoka <alanm@redhat.com> diff --git a/gdb/source.c b/gdb/source.c index f5949e6..b154dfe 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1344,11 +1344,15 @@ print_source_lines_base (struct symtab *s, int line, int stopline, { ui_out_field_int (uiout, "line", line); ui_out_text (uiout, "\tin "); - ui_out_field_string (uiout, "file", - symtab_to_filename_for_display (s)); - /* TUI expects the "fullname" field. While it is - !ui_out_is_mi_like_p compared to CLI it is !ui_source_list. */ + /* CLI expects only the "file" field. TUI expects only the + "fullname" field (and TUI does break if "file" is printed). + MI expects both fields. ui_source_list is set only for CLI, + not for TUI. */ + if (ui_out_is_mi_like_p (uiout) + || ui_out_test_flags (uiout, ui_source_list)) + ui_out_field_string (uiout, "file", + symtab_to_filename_for_display (s)); if (ui_out_is_mi_like_p (uiout) || !ui_out_test_flags (uiout, ui_source_list)) { @@ -1356,6 +1360,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, ui_out_field_string (uiout, "fullname", fullname); } + ui_out_text (uiout, "\n"); } |