From defa4b682a6938059b706817246c22c13b7d56a3 Mon Sep 17 00:00:00 2001 From: mmetzger Date: Tue, 13 Nov 2012 15:35:37 +0000 Subject: * 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. --- gdb/source.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/source.c') 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 -- cgit v1.2.1