]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Give informative failure messages if you try to use Helgrind or
authorNicholas Nethercote <njn@valgrind.org>
Fri, 12 Aug 2005 15:23:57 +0000 (15:23 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 12 Aug 2005 15:23:57 +0000 (15:23 +0000)
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

Makefile.am
addrcheck/Makefile.am
addrcheck/ac_main.c
helgrind/hg_main.c

index fd7dbd2b1628b7c3cf8b985e48a0a30ad3cbd94f..4b1924371f864b43ff908fade0566691126b6e77 100644 (file)
@@ -12,12 +12,11 @@ TOOLS =             memcheck \
 
 ##             addrcheck \
 
-# Temporary: we want to compile Helgrind, but not regtest it.
+# Temporary: we want to compile Helgrind and Addrcheck, but not regtest it.
 # And we want to include Addrcheck in the distro, but not compile/test it.
 # Put docs last because building the HTML is slow and we want to get
 # everything else working before we try it.
-SUBDIRS =      include coregrind . tests auxprogs $(TOOLS) helgrind docs
-DIST_SUBDIRS = $(SUBDIRS) addrcheck
+SUBDIRS =      include coregrind . tests auxprogs $(TOOLS) helgrind addrcheck docs
 
 SUPP_FILES = \
        glibc-2.2.supp glibc-2.3.supp glibc-2.4.supp \
index 88c53f81a030d647d418ea5a57f5828ae3c2e4c1..676903e874bce3d401e4d8baa5c4f1ce973a5f57 100644 (file)
@@ -10,7 +10,7 @@ vgtool_addrcheck_so_LDFLAGS = -shared
 vgtool_addrcheck_so_LDADD = \
        ../memcheck/mac_leakcheck.o \
        ../memcheck/mac_malloc_wrappers.o \
-       ../memcheck/mac_needs.o
+       ../memcheck/mac_shared.o
 
 vgpreload_addrcheck_so_SOURCES = 
 vgpreload_addrcheck_so_LDADD = \
index 5d2f67f02c6ecf88f17855daac1e5814b0e540d4..db05274b7525c4b280893dc8be2fe654993bee2c 100644 (file)
@@ -42,6 +42,7 @@
 #include "mac_shared.h"
 #include "memcheck.h"
 
+#if 0
 
 /*------------------------------------------------------------*/
 /*--- Comparing and printing errors                        ---*/
@@ -1306,19 +1307,29 @@ static void ac_print_debug_usage(void)
 {  
    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 @@ static void ac_pre_clo_init(void)
                                    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 @@ static void ac_pre_clo_init(void)
 
    init_shadow_memory();
    MAC_(common_pre_clo_init)();
+#endif
 }
 
 VG_DETERMINE_INTERFACE_VERSION(ac_pre_clo_init, 1./8)
 
 
 /*--------------------------------------------------------------------*/
-/*--- end                                                ac_main.c ---*/
+/*--- end                                                          ---*/
 /*--------------------------------------------------------------------*/
index 889d1d8aabbcc4c8b356c545b30fb80df49a75d4..0b35dbe1f21106fb63b690e9e27d418deb39407a 100644 (file)
@@ -2287,8 +2287,7 @@ UCodeBlock* TL_(instrument) ( UCodeBlock* cb_in, Addr not_used )
 static IRBB* hg_instrument ( IRBB* bb_in, VexGuestLayout* layout, 
                              IRType gWordTy, IRType hWordTy )
 {
-   VG_(message)(Vg_DebugMsg, "Helgrind is not yet ready to handle Vex IR");
-   VG_(exit)(1);
+   tl_assert(0);  // Need to convert to Vex
 }
 
 /*--------------------------------------------------------------------*/
@@ -3374,6 +3373,17 @@ static void hg_pre_clo_init(void)
                                    hg_instrument,
                                    hg_fini);
 
+   VG_(printf)(
+"\n"
+"Helgrind 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"
+" (b) we need to get thread operation tracking working again after\n"
+"     the changes added in Valgrind 2.4.0\n"
+"\n"
+"Sorry for the inconvenience.  Let us know if this is a problem for you.\n");
+   VG_(exit)(1);
+
    VG_(needs_core_errors)         ();
    VG_(needs_tool_errors)         (hg_eq_Error,
                                    hg_pp_Error,