#ifndef __MEMCHECK_H
#define __MEMCHECK_H
-
/* This file is for inclusion into client (your!) code.
You can use these macros to manipulate and query memory permissions
= VG_USERREQ_TOOL_BASE('M','C') + 256
} Vg_MemCheckClientRequest;
-
-
/* Client-code macros to manipulate the state of memory. */
/* Mark memory at _qzz_addr as unaddressable for _qzz_len bytes. */
VG_USERREQ__DISCARD, \
0, (_qzz_blkindex), 0, 0, 0)
-
/* Client-code macros to check the state of memory. */
/* Check that memory at _qzz_addr is addressable for _qzz_len bytes.
(volatile unsigned char *)&(__lvalue), \
(unsigned long)(sizeof (__lvalue)))
-
/* Do a full memory leak check (like --leak-check=full) mid-execution. */
#define VALGRIND_DO_LEAK_CHECK \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, \
suppressed = _qzz_suppressed; \
}
-
/* Get the validity data for addresses [zza..zza+zznbytes-1] and copy it
into the provided zzvbits array. Return values:
0 if not running on valgrind
#ifndef __VALGRIND_H
#define __VALGRIND_H
-
/* ------------------------------------------------------------------ */
/* VERSION NUMBER OF VALGRIND */
/* ------------------------------------------------------------------ */
#define __VALGRIND_MAJOR__ 3
#define __VALGRIND_MINOR__ 16
-
#include <stdarg.h>
/* Nb: this file might be included in a file compiled with -ansi. So
#undef PLAT_x86_solaris
#undef PLAT_amd64_solaris
-
#if defined(__APPLE__) && defined(__i386__)
# define PLAT_x86_darwin 1
#elif defined(__APPLE__) && defined(__x86_64__)
# endif
#endif
-
/* ------------------------------------------------------------------ */
/* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS. There is nothing */
/* in here of use to end-users -- skip to the next section. */
); \
} while (0)
-
#endif /* PLAT_mips32_linux */
/* ------------------------- mips64-linux ---------------- */
#endif /* CONFIG_VALGRIND */
-
/* ------------------------------------------------------------------ */
/* PLATFORM SPECIFICS for FUNCTION WRAPPING. This is all very */
/* ugly. It's the least-worst tradeoff I can think of. */
lval = (__typeof__(lval)) _res; \
} while (0)
-
#endif /* PLAT_s390x_linux */
/* ------------------------- mips32-linux ----------------------- */
lval = (__typeof__(lval)) (long)_res; \
} while (0)
-
#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \
do { \
volatile OrigFn _orig = (orig); \
# define __extension__ /* */
#endif
-
/* Returns the number of Valgrinds this code is running under. That
is, 0 if running natively, 1 if running under Valgrind, 2 if
running under Valgrind which is running under another Valgrind,
VG_USERREQ__RUNNING_ON_VALGRIND, \
0, 0, 0, 0, 0) \
-
/* Discard translation of code in the range [_qzz_addr .. _qzz_addr +
_qzz_len - 1]. Useful if you are debugging a JITter or some such,
since it provides a way to make sure valgrind will retranslate the
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, \
_qzz_addr, 0, 0, 0, 0)
-
/* These requests are for getting Valgrind itself to print something.
Possibly with a backtrace. This is a really ugly hack. The return value
is the number of characters printed, excluding the "**<pid>** " part at the
#endif /* CONFIG_VALGRIND */
}
-
/* These requests allow control to move from the simulated CPU to the
real CPU, calling an arbitrary function.
_qyy_arg1, _qyy_arg2, \
_qyy_arg3, 0)
-
/* Counts the number of errors that have been recorded by a tool. Nb:
the tool must record the errors with VG_(maybe_record_error)() or
VG_(unique_error)() for them to be counted. */
VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, \
command, 0, 0, 0, 0)
-
/* Change the value of a dynamic command line option.
Note that unknown or not dynamically changeable options
will cause a warning message to be output. */
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CLO_CHANGE, \
option, 0, 0, 0, 0)
-
#undef PLAT_x86_darwin
#undef PLAT_amd64_darwin
#undef PLAT_x86_win32