summaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2010-07-09 02:39:57 +0000
committerHui Zhu <teawater@gmail.com>2010-07-09 02:39:57 +0000
commit2c644f5e4aa6b1fbe3f3ec42e3d17db0ff81fbd9 (patch)
tree00a13f89af827f01c290d1ea105c98f75d86f70f /gdb/source.c
parentd79ff9f4d9b35b526329edea433e31fcf5a39ed5 (diff)
downloadgdb-2c644f5e4aa6b1fbe3f3ec42e3d17db0ff81fbd9.tar.gz
2010-07-04 Hui Zhu <teawater@gmail.com>
* source.c (print_source_lines_base): Add check for noprint.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c6
1 files changed, 4 insertions, 2 deletions
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;