Added command line option --var-info. Reading debug info for client variables is now disabled by default.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7797 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-drd/drd_main.c b/exp-drd/drd_main.c
index 4a0734b..8c7246f 100644
--- a/exp-drd/drd_main.c
+++ b/exp-drd/drd_main.c
@@ -65,6 +65,7 @@
 static Bool drd_trace_fork_join = False;
 static Bool drd_trace_mem = False;
 static Addr drd_trace_address = 0;
+static Bool s_drd_var_info = False;
 
 
 //
@@ -102,6 +103,7 @@
   else VG_BOOL_CLO(arg, "--trace-segment",     trace_segment)
   else VG_BOOL_CLO(arg, "--trace-semaphore",   trace_semaphore)
   else VG_BOOL_CLO(arg, "--trace-suppression", trace_suppression)
+  else VG_BOOL_CLO(arg, "--var-info",          s_drd_var_info)
   else VG_STR_CLO (arg, "--trace-address",     trace_address)
   else
     return VG_(replacement_malloc_process_cmd_line_option)(arg);
@@ -727,6 +729,11 @@
 #  else
   VG_(printf)("\nWARNING: DRD has only been tested on x86-linux and amd64-linux.\n\n");
 #  endif
+
+  if (s_drd_var_info)
+  {
+    VG_(needs_var_info)();
+  }
 }
 
 static void instrument_load(IRSB* const bb,
@@ -1038,8 +1045,6 @@
   VG_(track_pre_thread_ll_exit)   (drd_thread_finished);
 
   // Other stuff.
-  VG_(needs_var_info)();
-
   drd_register_malloc_wrappers(drd_start_using_mem, drd_stop_using_mem);
 
   drd_clientreq_init();