Added command-line option --first-race-only.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9728 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd_main.c b/drd/drd_main.c
index 8d08678..0dfb00a 100644
--- a/drd/drd_main.c
+++ b/drd/drd_main.c
@@ -55,7 +55,6 @@
/* Local variables. */
-static Bool DRD_(s_first_race_only) = False;
static Bool DRD_(s_print_stats) = False;
static Bool DRD_(s_var_info) = False;
static Bool DRD_(s_show_stack_usage) = False;
@@ -68,6 +67,7 @@
{
int check_stack_accesses = -1;
int exclusive_threshold_ms = -1;
+ int first_race_only = -1;
int report_signal_unlocked = -1;
int segment_merging = -1;
int shared_threshold_ms = -1;
@@ -87,7 +87,7 @@
if VG_BOOL_CLO(arg, "--check-stack-var", check_stack_accesses) {}
else if VG_BOOL_CLO(arg, "--drd-stats", DRD_(s_print_stats)) {}
- else if VG_BOOL_CLO(arg, "--first-race-only", DRD_(s_first_race_only)) {}
+ else if VG_BOOL_CLO(arg, "--first-race-only", first_race_only) {}
else if VG_BOOL_CLO(arg,"--report-signal-unlocked",report_signal_unlocked) {}
else if VG_BOOL_CLO(arg, "--segment-merging", segment_merging) {}
else if VG_BOOL_CLO(arg, "--show-confl-seg", show_confl_seg) {}
@@ -118,6 +118,10 @@
DRD_(mutex_set_lock_threshold)(exclusive_threshold_ms);
DRD_(rwlock_set_exclusive_threshold)(exclusive_threshold_ms);
}
+ if (first_race_only != -1)
+ {
+ DRD_(set_first_race_only)(first_race_only);
+ }
if (report_signal_unlocked != -1)
{
DRD_(cond_set_report_signal_unlocked)(report_signal_unlocked);