Add --event-horizon=yes|no [yes] so that the limit on errors shown
can be disabled if desired.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@414 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_errcontext.c b/coregrind/vg_errcontext.c
index d5e0abb..60eaba0 100644
--- a/coregrind/vg_errcontext.c
+++ b/coregrind/vg_errcontext.c
@@ -497,8 +497,9 @@
       the burden of the error-management system becoming excessive in
       extremely buggy programs, although it does make it pretty
       pointless to continue the Valgrind run after this point. */
-   if (vg_n_errs_shown >= M_VG_COLLECT_NO_ERRORS_AFTER_SHOWN
-       || vg_n_errs_found >= M_VG_COLLECT_NO_ERRORS_AFTER_FOUND) {
+   if (VG_(clo_event_horizon) 
+       && (vg_n_errs_shown >= M_VG_COLLECT_NO_ERRORS_AFTER_SHOWN
+           || vg_n_errs_found >= M_VG_COLLECT_NO_ERRORS_AFTER_FOUND)) {
       if (!stopping_message) {
          VG_(message)(Vg_UserMsg, "");
 
@@ -516,6 +517,12 @@
 
          VG_(message)(Vg_UserMsg, 
             "Final error counts will be inaccurate.  Go fix your program!");
+         VG_(message)(Vg_UserMsg, 
+            "Rerun with --event-horizon=no to disable this cutoff.  Note");
+         VG_(message)(Vg_UserMsg, 
+            "that your program may now segfault without prior warning from");
+         VG_(message)(Vg_UserMsg, 
+            "Valgrind, because errors are no longer being displayed.");
          VG_(message)(Vg_UserMsg, "");
          stopping_message = True;
          vg_ignore_errors = True;