aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2010-07-09 02:39:58 +0000
committerHui Zhu <teawater@gmail.com>2010-07-09 02:39:58 +0000
commitf4dfd9c05c7ef31b55c401c1ac491c5d71b845b6 (patch)
tree532a3f56da2afd15333d753c26a13c67ebda4a56 /gdb/source.c
parentce279a62c420e20c2d33e89641b6d9ed581a90c2 (diff)
downloadgdb-f4dfd9c05c7ef31b55c401c1ac491c5d71b845b6.zip
gdb-f4dfd9c05c7ef31b55c401c1ac491c5d71b845b6.tar.gz
gdb-f4dfd9c05c7ef31b55c401c1ac491c5d71b845b6.tar.bz2
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 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;