Bool MAC_(handle_common_client_requests)(ThreadId tid, UWord* arg, UWord* ret )
{
- Char* err =
- "The client requests VALGRIND_MALLOCLIKE_BLOCK and\n"
- " VALGRIND_FREELIKE_BLOCK have moved. Please recompile your\n"
- " program to incorporate the updates in the Valgrind header files.\n"
- " You shouldn't need to change the text of your program at all.\n"
- " Everything should then work as before. Sorry for the bother.\n";
-
switch (arg[0]) {
case VG_USERREQ__COUNT_LEAKS: { /* count leaked bytes */
UWord** argp = (UWord**)arg;
*ret = 0;
return True;
}
- case VG_USERREQ__MALLOCLIKE_BLOCK__OLD_DO_NOT_USE:
- case VG_USERREQ__FREELIKE_BLOCK__OLD_DO_NOT_USE:
- VG_(tool_panic)(err);
-
case VG_USERREQ__MALLOCLIKE_BLOCK: {
Addr p = (Addr)arg[1];
SizeT sizeB = arg[2];
VG_USERREQ__DO_LEAK_CHECK,
VG_USERREQ__COUNT_LEAKS,
- /* These two have been moved into core, because they are useful for
- any tool that tracks heap blocks. Hence the suffix. But they're
- still here for backwards compatibility, although Valgrind will
- abort with an explanatory message if you use them. */
- VG_USERREQ__MALLOCLIKE_BLOCK__OLD_DO_NOT_USE,
- VG_USERREQ__FREELIKE_BLOCK__OLD_DO_NOT_USE,
-
VG_USERREQ__GET_VBITS,
VG_USERREQ__SET_VBITS,
}
-/* These two have been moved to valgrind.h; still here so that a warning can
- be printed out for any programs using the old ones. */
-#define VALGRIND_MALLOCLIKE_BLOCK__OLD_DO_NOT_USE(addr, sizeB, rzB, is_zeroed)\
- {unsigned int _qzz_res; \
- VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, \
- VG_USERREQ__MALLOCLIKE_BLOCK, \
- addr, sizeB, rzB, is_zeroed); \
- }
-#define VALGRIND_FREELIKE_BLOCK__OLD_DO_NOT_USE(addr, rzB) \
- {unsigned int _qzz_res; \
- VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, \
- VG_USERREQ__FREELIKE_BLOCK, \
- addr, rzB, 0, 0); \
- }
-
-
/* Get in zzvbits the validity data for the zznbytes starting at
zzsrc. Return values:
0 if not running on valgrind