[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 6/6] tools/libxc: Add Valgrind client requests as a debugging option


Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>


The client requests are safe to compile in even when not running the binary
under valgrind.  For simplicitly, it might just be easiest to unconditionally
enable client requests for debug builds if autoconf determines that
<valgrind/memcheck.h> exists.

 tools/libxc/xc_private.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 5b0261e..c993340 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -34,6 +34,13 @@
 #include <xen/sys/privcmd.h>
+/* Compile in Valgrind client requests ? */
+#ifdef VALGRIND
+#include <valgrind/memcheck.h>
+#define VALGRIND_MAKE_MEM_UNDEFINED(addr, len) (void) /* addr, len */
 #define DECLARE_HYPERCALL privcmd_hypercall_t hypercall
 #define DECLARE_DOMCTL struct xen_domctl domctl
 #define DECLARE_SYSCTL struct xen_sysctl sysctl

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.