From: Hui Zhu Date: Fri, 9 Jul 2010 02:39:58 +0000 (+0000) Subject: 2010-07-04 Hui Zhu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4dfd9c05c7ef31b55c401c1ac491c5d71b845b6;p=binutils-gdb.git 2010-07-04 Hui Zhu * source.c (print_source_lines_base): Add check for noprint. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 96009f781c0..0e8cea36d3e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-07-09 Hui Zhu + + * source.c (print_source_lines_base): Add check for noprint. + 2010-07-08 Joel Brobecker * python/python-config.py: Resync with Python 2.7 version of this diff --git a/gdb/source.c b/gdb/source.c index 39bd06a7792..3e896726a04 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;