diff options
author | mmetzger <mmetzger> | 2012-11-13 15:35:37 +0000 |
---|---|---|
committer | mmetzger <mmetzger> | 2012-11-13 15:35:37 +0000 |
commit | defa4b682a6938059b706817246c22c13b7d56a3 (patch) | |
tree | 54b53efe963eb273a81210058e9e30ac3841e451 /gdb/source.c | |
parent | 8fddc20e18ee473b46c843ddec3346581db45089 (diff) | |
download | gdb-defa4b682a6938059b706817246c22c13b7d56a3.tar.gz |
* disasm.h (DISASSEMBLY_FILENAME): New macro.
* disasm.c (do_mixed_source_and_assembly): Pass filename flag on
to print_source_lines ().
* symtab.h (PRINT_SOURCE_LINES_FILENAME): New print source lines
flag.
* source.c (print_source_lines_base): Prefix source line with
filename if PRINT_SOURCE_LINES_FILENAME flag is set.
Diffstat (limited to 'gdb/source.c')
-rw-r--r-- | gdb/source.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/source.c b/gdb/source.c index 2fe2e506711..7e14fc6ebcf 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1345,6 +1345,11 @@ print_source_lines_base (struct symtab *s, int line, int stopline, if (c == EOF) break; last_line_listed = current_source_line; + if (flags & PRINT_SOURCE_LINES_FILENAME) + { + ui_out_text (uiout, s->filename); + ui_out_text (uiout, ":"); + } xsnprintf (buf, sizeof (buf), "%d\t", current_source_line++); ui_out_text (uiout, buf); do |