[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



http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs

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.

Thoughts?
---
 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>
+#else
+#define VALGRIND_MAKE_MEM_UNDEFINED(addr, len) (void) /* addr, len */
+#endif
+
 #define DECLARE_HYPERCALL privcmd_hypercall_t hypercall
 #define DECLARE_DOMCTL struct xen_domctl domctl
 #define DECLARE_SYSCTL struct xen_sysctl sysctl
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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