core: Add command-line option --defaultsupp

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14080 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_main.c b/coregrind/m_main.c
index c34d3ea..ba12b4b 100644
--- a/coregrind/m_main.c
+++ b/coregrind/m_main.c
@@ -127,6 +127,7 @@
 "    --error-limit=no|yes      stop showing new errors if too many? [yes]\n"
 "    --error-exitcode=<number> exit code to return if errors found [0=disable]\n"
 "    --show-below-main=no|yes  continue stack traces below main() [no]\n"
+"    --defaultsupp=yes|no      load default suppressions [yes]\n"
 "    --suppressions=<filename> suppress errors described in <filename>\n"
 "    --gen-suppressions=no|yes|all    print suppressions for errors? [no]\n"
 "    --db-attach=no|yes        start debugger when errors detected? [no]\n"
@@ -690,6 +691,8 @@
       else if VG_STR_CLO(arg, "--xml-user-comment",
                               VG_(clo_xml_user_comment)) {}
 
+      else if VG_BOOL_CLO(arg, "--defaultsupp", VG_(clo_default_supp)) { }
+
       else if VG_STR_CLO(arg, "--suppressions", tmp_str) {
          if (VG_(clo_n_suppressions) >= VG_CLO_MAX_SFILES) {
             VG_(fmsg_bad_option)(arg,
@@ -1114,7 +1117,8 @@
 
    // Suppressions related stuff
 
-   if (VG_(clo_n_suppressions) < VG_CLO_MAX_SFILES-1 &&
+   if (VG_(clo_default_supp) &&
+       VG_(clo_n_suppressions) < VG_CLO_MAX_SFILES-1 &&
        (VG_(needs).core_errors || VG_(needs).tool_errors)) {
       /* If we haven't reached the max number of suppressions, load
          the default one. */