diff options
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/source.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 96009f7..0e8cea3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-07-09 Hui Zhu <teawater@gmail.com> + + * source.c (print_source_lines_base): Add check for noprint. + 2010-07-08 Joel Brobecker <brobecker@adacore.com> * python/python-config.py: Resync with Python 2.7 version of this diff --git a/gdb/source.c b/gdb/source.c index 39bd06a..3e89672 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1293,6 +1293,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror) { int c; int desc; + int noprint = 0; FILE *stream; int nlines = stopline - line; struct cleanup *cleanup; @@ -1319,11 +1320,12 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror) } else { - desc = -1; + desc = last_source_error; noerror = 1; + noprint = 1; } - if (desc < 0) + if (desc < 0 || noprint) { last_source_error = desc; |