2010-07-04 Hui Zhu <teawater@gmail.com>
authorHui Zhu <teawater@gmail.com>
Fri, 9 Jul 2010 02:39:58 +0000 (02:39 +0000)
committerHui Zhu <teawater@gmail.com>
Fri, 9 Jul 2010 02:39:58 +0000 (02:39 +0000)
* source.c (print_source_lines_base): Add check for noprint.

gdb/ChangeLog
gdb/source.c

index 96009f781c00c02d67a00bdb20f84eac79bda3e3..0e8cea36d3e9ff41885b25f8a628878a98e1c69c 100644 (file)
@@ -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
index 39bd06a7792911104c8382d8124843d8f07c26b2..3e896726a04aec0b9d90762d6c913e8be075d10d 100644 (file)
@@ -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;
 
This page took 0.029469 seconds and 4 git commands to generate.