diff options
author | Markus Metzger <mmetzger@sourceware.org> | 2012-11-13 15:35:43 +0000 |
---|---|---|
committer | Markus Metzger <mmetzger@sourceware.org> | 2012-11-13 15:35:43 +0000 |
commit | 4cd29721179a29be4f31798c5860d0964130b78c (patch) | |
tree | 54938daba9af7a291729ae10002d4e9eba6d792d /gdb/source.c | |
parent | dfaae88645ac58515a3037a09df0d1b7b6d034a4 (diff) | |
download | gdb-4cd29721179a29be4f31798c5860d0964130b78c.zip gdb-4cd29721179a29be4f31798c5860d0964130b78c.tar.gz gdb-4cd29721179a29be4f31798c5860d0964130b78c.tar.bz2 |
* 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 2fe2e50..7e14fc6 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 |