|
From: <sv...@va...> - 2014-06-22 10:12:11
|
Author: bart
Date: Sun Jun 22 10:11:59 2014
New Revision: 14080
Log:
core: Add command-line option --defaultsupp
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_options.c
trunk/coregrind/pub_core_options.h
trunk/docs/xml/manual-core.xml
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Sun Jun 22 10:11:59 2014
@@ -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. */
Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Sun Jun 22 10:11:59 2014
@@ -78,6 +78,7 @@
HChar* VG_(clo_xml_fname_expanded) = NULL;
Bool VG_(clo_time_stamp) = False;
Int VG_(clo_input_fd) = 0; /* stdin */
+Bool VG_(clo_default_supp) = True;
Int VG_(clo_n_suppressions) = 0;
const HChar* VG_(clo_suppressions)[VG_CLO_MAX_SFILES];
Int VG_(clo_n_fullpath_after) = 0;
Modified: trunk/coregrind/pub_core_options.h
==============================================================================
--- trunk/coregrind/pub_core_options.h (original)
+++ trunk/coregrind/pub_core_options.h Sun Jun 22 10:11:59 2014
@@ -139,6 +139,8 @@
/* The file descriptor to read for input. default: 0 == stdin */
extern Int VG_(clo_input_fd);
+/* Whether or not to load the default suppressions. */
+extern Bool VG_(clo_default_supp);
/* The number of suppression files specified. */
extern Int VG_(clo_n_suppressions);
/* The names of the suppression files. */
Modified: trunk/docs/xml/manual-core.xml
==============================================================================
--- trunk/docs/xml/manual-core.xml (original)
+++ trunk/docs/xml/manual-core.xml Sun Jun 22 10:11:59 2014
@@ -396,10 +396,11 @@
--1610-- used_suppression: 2 glibc-2.5.x-on-SUSE-10.2-(PPC)-2a /usr/lib/valgrind/default.supp:1234
]]></programlisting>
-<para>Multiple suppressions files are allowed. By default, Valgrind
-uses <filename>$PREFIX/lib/valgrind/default.supp</filename>. You can
-ask to add suppressions from another file, by specifying
-<option>--suppressions=/path/to/file.supp</option>.
+<para>Multiple suppressions files are allowed. Valgrind loads suppression
+patterns from <filename>$PREFIX/lib/valgrind/default.supp</filename> unless
+<option>--defaultsupp=no</option> has been specified. You can
+ask to add suppressions from additional files by specifying
+<option>--suppressions=/path/to/file.supp</option> one or more times.
</para>
<para>If you want to understand more about suppressions, look at an
|