Give informative failure messages if you try to use Helgrind or
Addrcheck.  As a results, we are now building Addrcheck again, which
required commenting out lots of code.

BACKPORT TO 3_0_X, AND POSSIBLY TO 2_4_X (the Helgrind part, with
    modifications)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4384 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/addrcheck/ac_main.c b/addrcheck/ac_main.c
index 5d2f67f..db05274 100644
--- a/addrcheck/ac_main.c
+++ b/addrcheck/ac_main.c
@@ -42,6 +42,7 @@
 #include "mac_shared.h"
 #include "memcheck.h"
 
+#if 0
 
 /*------------------------------------------------------------*/
 /*--- Comparing and printing errors                        ---*/
@@ -1306,19 +1307,29 @@
 {  
    MAC_(print_common_debug_usage)();
 }
-
+#endif
 
 /*------------------------------------------------------------*/
 /*--- Setup and finalisation                               ---*/
 /*------------------------------------------------------------*/
 
+// dummy instrument() function
+static IRBB* ac_instrument(IRBB* bb_in, VexGuestLayout* layout, 
+                           IRType gWordTy, IRType hWordTy )
+{
+   tl_assert(0);
+}
+
 static void ac_post_clo_init ( void )
 {
 }
 
 static void ac_fini ( Int exitcode )
 {
+   tl_assert(0);     // turn leak checking back on
+#if 0
    MAC_(common_fini)( ac_detect_memory_leaks );
+#endif
 }
 
 static void ac_pre_clo_init(void)
@@ -1335,6 +1346,18 @@
                                    ac_instrument,
                                    ac_fini);
 
+
+   VG_(printf)(
+"\n"
+"Addrcheck is currently not working, because:\n"
+" (a) it is not yet ready to handle the Vex IR and the use with 64-bit\n"
+"     platforms introduced in Valgrind 3.0.0\n"
+"\n"
+"Sorry for the inconvenience.  Let us know if this is a problem for you.\n");
+   VG_(exit)(1);
+
+
+#if 0
    VG_(needs_core_errors)         ();
    VG_(needs_tool_errors)         (MAC_(eq_Error),
                                    ac_pp_Error,
@@ -1408,11 +1431,12 @@
 
    init_shadow_memory();
    MAC_(common_pre_clo_init)();
+#endif
 }
 
 VG_DETERMINE_INTERFACE_VERSION(ac_pre_clo_init, 1./8)
 
 
 /*--------------------------------------------------------------------*/
-/*--- end                                                ac_main.c ---*/
+/*--- end                                                          ---*/
 /*--------------------------------------------------------------------*/