iPXE
Defines | Enumerations | Functions
valgrind.h File Reference
#include <stdarg.h>

Go to the source code of this file.

Defines

#define __VALGRIND_MAJOR__   3
#define __VALGRIND_MINOR__   6
#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval, _zzq_default, _zzq_request,_zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)
#define VG_CONCAT4(_aa, _bb, _cc, _dd)   _aa##_bb##_cc##_dd
#define I_WRAP_SONAME_FNNAME_ZU(soname, fnname)   VG_CONCAT4(_vgwZU_,soname,_,fnname)
#define I_WRAP_SONAME_FNNAME_ZZ(soname, fnname)   VG_CONCAT4(_vgwZZ_,soname,_,fnname)
#define VALGRIND_GET_ORIG_FN(_lval)   VALGRIND_GET_NR_CONTEXT(_lval)
#define CALL_FN_v_v(fnptr)
#define CALL_FN_v_W(fnptr, arg1)
#define CALL_FN_v_WW(fnptr, arg1, arg2)
#define CALL_FN_v_WWW(fnptr, arg1, arg2, arg3)
#define CALL_FN_v_WWWW(fnptr, arg1, arg2, arg3, arg4)
#define CALL_FN_v_5W(fnptr, arg1, arg2, arg3, arg4, arg5)
#define CALL_FN_v_6W(fnptr, arg1, arg2, arg3, arg4, arg5, arg6)
#define CALL_FN_v_7W(fnptr, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
#define VG_USERREQ_TOOL_BASE(a, b)   ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
#define VG_IS_TOOL_USERREQ(a, b, v)   (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
#define __extension__   /* */
#define RUNNING_ON_VALGRIND
#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr, _qzz_len)
#define VALGRIND_PRINTF(...)
#define VALGRIND_PRINTF_BACKTRACE(...)
#define VALGRIND_NON_SIMD_CALL0(_qyy_fn)
#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1)
#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2)
#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3)
#define VALGRIND_COUNT_ERRORS
#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)
#define VALGRIND_FREELIKE_BLOCK(addr, rzB)
#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)
#define VALGRIND_DESTROY_MEMPOOL(pool)
#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)
#define VALGRIND_MEMPOOL_FREE(pool, addr)
#define VALGRIND_MEMPOOL_TRIM(pool, addr, size)
#define VALGRIND_MOVE_MEMPOOL(poolA, poolB)
#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)
#define VALGRIND_MEMPOOL_EXISTS(pool)
#define VALGRIND_STACK_REGISTER(start, end)
#define VALGRIND_STACK_DEREGISTER(id)
#define VALGRIND_STACK_CHANGE(id, start, end)
#define VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, delta)

Enumerations

enum  Vg_ClientRequest {
  VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001, VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002, VG_USERREQ__CLIENT_CALL0 = 0x1101, VG_USERREQ__CLIENT_CALL1 = 0x1102,
  VG_USERREQ__CLIENT_CALL2 = 0x1103, VG_USERREQ__CLIENT_CALL3 = 0x1104, VG_USERREQ__COUNT_ERRORS = 0x1201, VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
  VG_USERREQ__FREELIKE_BLOCK = 0x1302, VG_USERREQ__CREATE_MEMPOOL = 0x1303, VG_USERREQ__DESTROY_MEMPOOL = 0x1304, VG_USERREQ__MEMPOOL_ALLOC = 0x1305,
  VG_USERREQ__MEMPOOL_FREE = 0x1306, VG_USERREQ__MEMPOOL_TRIM = 0x1307, VG_USERREQ__MOVE_MEMPOOL = 0x1308, VG_USERREQ__MEMPOOL_CHANGE = 0x1309,
  VG_USERREQ__MEMPOOL_EXISTS = 0x130a, VG_USERREQ__PRINTF = 0x1401, VG_USERREQ__PRINTF_BACKTRACE = 0x1402, VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
  VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404, VG_USERREQ__STACK_REGISTER = 0x1501, VG_USERREQ__STACK_DEREGISTER = 0x1502, VG_USERREQ__STACK_CHANGE = 0x1503,
  VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601
}

Functions

 FILE_LICENCE (BSD3)

Define Documentation

#define __VALGRIND_MAJOR__   3

Definition at line 93 of file valgrind.h.

#define __VALGRIND_MINOR__   6

Definition at line 94 of file valgrind.h.

#define VALGRIND_DO_CLIENT_REQUEST (   _zzq_rlval,
  _zzq_default,
  _zzq_request,
  _zzq_arg1,
  _zzq_arg2,
  _zzq_arg3,
  _zzq_arg4,
  _zzq_arg5 
)
Value:
{                                                              \
      (_zzq_rlval) = (_zzq_default);                              \
   }

Definition at line 160 of file valgrind.h.

#define VG_CONCAT4 (   _aa,
  _bb,
  _cc,
  _dd 
)    _aa##_bb##_cc##_dd

Definition at line 674 of file valgrind.h.

#define I_WRAP_SONAME_FNNAME_ZU (   soname,
  fnname 
)    VG_CONCAT4(_vgwZU_,soname,_,fnname)

Definition at line 676 of file valgrind.h.

#define I_WRAP_SONAME_FNNAME_ZZ (   soname,
  fnname 
)    VG_CONCAT4(_vgwZZ_,soname,_,fnname)

Definition at line 679 of file valgrind.h.

#define VALGRIND_GET_ORIG_FN (   _lval)    VALGRIND_GET_NR_CONTEXT(_lval)

Definition at line 686 of file valgrind.h.

#define CALL_FN_v_v (   fnptr)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_v(_junk,fnptr); } while (0)

Definition at line 691 of file valgrind.h.

#define CALL_FN_v_W (   fnptr,
  arg1 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_W(_junk,fnptr,arg1); } while (0)

Definition at line 695 of file valgrind.h.

#define CALL_FN_v_WW (   fnptr,
  arg1,
  arg2 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)

Definition at line 699 of file valgrind.h.

#define CALL_FN_v_WWW (   fnptr,
  arg1,
  arg2,
  arg3 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)

Definition at line 703 of file valgrind.h.

#define CALL_FN_v_WWWW (   fnptr,
  arg1,
  arg2,
  arg3,
  arg4 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)

Definition at line 707 of file valgrind.h.

#define CALL_FN_v_5W (   fnptr,
  arg1,
  arg2,
  arg3,
  arg4,
  arg5 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)

Definition at line 711 of file valgrind.h.

#define CALL_FN_v_6W (   fnptr,
  arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  arg6 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)

Definition at line 715 of file valgrind.h.

#define CALL_FN_v_7W (   fnptr,
  arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  arg6,
  arg7 
)
Value:
do { volatile unsigned long _junk;                             \
        CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)

Definition at line 719 of file valgrind.h.

#define VG_USERREQ_TOOL_BASE (   a,
 
)    ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))

Definition at line 4103 of file valgrind.h.

#define VG_IS_TOOL_USERREQ (   a,
  b,
 
)    (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))

Definition at line 4105 of file valgrind.h.

#define __extension__   /* */

Definition at line 4168 of file valgrind.h.

Value:
__extension__                        \
   ({unsigned int _qzz_res;                                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* if not */,          \
                               VG_USERREQ__RUNNING_ON_VALGRIND,   \
                               0, 0, 0, 0, 0);                    \
    _qzz_res;                                                     \
   })

Definition at line 4175 of file valgrind.h.

Referenced by valgrind_make_blocks_defined(), and valgrind_make_blocks_noaccess().

#define VALGRIND_DISCARD_TRANSLATIONS (   _qzz_addr,
  _qzz_len 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__DISCARD_TRANSLATIONS,  \
                               _qzz_addr, _qzz_len, 0, 0, 0);     \
   }

Definition at line 4188 of file valgrind.h.

#define VALGRIND_PRINTF (   ...)

Definition at line 4203 of file valgrind.h.

#define VALGRIND_PRINTF_BACKTRACE (   ...)

Definition at line 4204 of file valgrind.h.

#define VALGRIND_NON_SIMD_CALL0 (   _qyy_fn)
Value:
__extension__                                                  \
   ({unsigned long _qyy_res;                                      \
    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
                               VG_USERREQ__CLIENT_CALL0,          \
                               _qyy_fn,                           \
                               0, 0, 0, 0);                       \
    _qyy_res;                                                     \
   })

Definition at line 4270 of file valgrind.h.

#define VALGRIND_NON_SIMD_CALL1 (   _qyy_fn,
  _qyy_arg1 
)
Value:
__extension__                                                  \
   ({unsigned long _qyy_res;                                      \
    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
                               VG_USERREQ__CLIENT_CALL1,          \
                               _qyy_fn,                           \
                               _qyy_arg1, 0, 0, 0);               \
    _qyy_res;                                                     \
   })

Definition at line 4280 of file valgrind.h.

#define VALGRIND_NON_SIMD_CALL2 (   _qyy_fn,
  _qyy_arg1,
  _qyy_arg2 
)
Value:
__extension__                                                  \
   ({unsigned long _qyy_res;                                      \
    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
                               VG_USERREQ__CLIENT_CALL2,          \
                               _qyy_fn,                           \
                               _qyy_arg1, _qyy_arg2, 0, 0);       \
    _qyy_res;                                                     \
   })

Definition at line 4290 of file valgrind.h.

#define VALGRIND_NON_SIMD_CALL3 (   _qyy_fn,
  _qyy_arg1,
  _qyy_arg2,
  _qyy_arg3 
)
Value:
__extension__                                                  \
   ({unsigned long _qyy_res;                                      \
    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
                               VG_USERREQ__CLIENT_CALL3,          \
                               _qyy_fn,                           \
                               _qyy_arg1, _qyy_arg2,              \
                               _qyy_arg3, 0);                     \
    _qyy_res;                                                     \
   })

Definition at line 4300 of file valgrind.h.

Value:
__extension__                                                  \
   ({unsigned int _qyy_res;                                       \
    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
                               VG_USERREQ__COUNT_ERRORS,          \
                               0, 0, 0, 0, 0);                    \
    _qyy_res;                                                     \
   })

Definition at line 4315 of file valgrind.h.

#define VALGRIND_MALLOCLIKE_BLOCK (   addr,
  sizeB,
  rzB,
  is_zeroed 
)
Value:
{unsigned int __unused _qzz_res;                               \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MALLOCLIKE_BLOCK,      \
                               addr, sizeB, rzB, is_zeroed, 0);   \
   }

Definition at line 4411 of file valgrind.h.

Referenced by malloc_dma_offset(), and realloc().

#define VALGRIND_FREELIKE_BLOCK (   addr,
  rzB 
)
Value:
{unsigned int __unused _qzz_res;                               \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__FREELIKE_BLOCK,        \
                               addr, rzB, 0, 0, 0);               \
   }

Definition at line 4421 of file valgrind.h.

Referenced by free_dma(), and realloc().

#define VALGRIND_CREATE_MEMPOOL (   pool,
  rzB,
  is_zeroed 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__CREATE_MEMPOOL,        \
                               pool, rzB, is_zeroed, 0, 0);       \
   }

Definition at line 4429 of file valgrind.h.

#define VALGRIND_DESTROY_MEMPOOL (   pool)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__DESTROY_MEMPOOL,       \
                               pool, 0, 0, 0, 0);                 \
   }

Definition at line 4437 of file valgrind.h.

#define VALGRIND_MEMPOOL_ALLOC (   pool,
  addr,
  size 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MEMPOOL_ALLOC,         \
                               pool, addr, size, 0, 0);           \
   }

Definition at line 4445 of file valgrind.h.

#define VALGRIND_MEMPOOL_FREE (   pool,
  addr 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MEMPOOL_FREE,          \
                               pool, addr, 0, 0, 0);              \
   }

Definition at line 4453 of file valgrind.h.

#define VALGRIND_MEMPOOL_TRIM (   pool,
  addr,
  size 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MEMPOOL_TRIM,          \
                               pool, addr, size, 0, 0);           \
   }

Definition at line 4461 of file valgrind.h.

#define VALGRIND_MOVE_MEMPOOL (   poolA,
  poolB 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MOVE_MEMPOOL,          \
                               poolA, poolB, 0, 0, 0);            \
   }

Definition at line 4469 of file valgrind.h.

#define VALGRIND_MEMPOOL_CHANGE (   pool,
  addrA,
  addrB,
  size 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MEMPOOL_CHANGE,        \
                               pool, addrA, addrB, size, 0);      \
   }

Definition at line 4477 of file valgrind.h.

#define VALGRIND_MEMPOOL_EXISTS (   pool)
Value:
__extension__                                                  \
   ({unsigned int _qzz_res;                                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__MEMPOOL_EXISTS,        \
                               pool, 0, 0, 0, 0);                 \
    _qzz_res;                                                     \
   })

Definition at line 4485 of file valgrind.h.

#define VALGRIND_STACK_REGISTER (   start,
  end 
)
Value:
__extension__                                                  \
   ({unsigned int _qzz_res;                                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__STACK_REGISTER,        \
                               start, end, 0, 0, 0);              \
    _qzz_res;                                                     \
   })

Definition at line 4495 of file valgrind.h.

Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__STACK_DEREGISTER,      \
                               id, 0, 0, 0, 0);                   \
   }

Definition at line 4506 of file valgrind.h.

#define VALGRIND_STACK_CHANGE (   id,
  start,
  end 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__STACK_CHANGE,          \
                               id, start, end, 0, 0);             \
   }

Definition at line 4514 of file valgrind.h.

#define VALGRIND_LOAD_PDB_DEBUGINFO (   fd,
  ptr,
  total_size,
  delta 
)
Value:
{unsigned int _qzz_res;                                        \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
                               VG_USERREQ__LOAD_PDB_DEBUGINFO,    \
                               fd, ptr, total_size, delta, 0);    \
   }

Definition at line 4522 of file valgrind.h.


Enumeration Type Documentation

Enumerator:
VG_USERREQ__RUNNING_ON_VALGRIND 
VG_USERREQ__DISCARD_TRANSLATIONS 
VG_USERREQ__CLIENT_CALL0 
VG_USERREQ__CLIENT_CALL1 
VG_USERREQ__CLIENT_CALL2 
VG_USERREQ__CLIENT_CALL3 
VG_USERREQ__COUNT_ERRORS 
VG_USERREQ__MALLOCLIKE_BLOCK 
VG_USERREQ__FREELIKE_BLOCK 
VG_USERREQ__CREATE_MEMPOOL 
VG_USERREQ__DESTROY_MEMPOOL 
VG_USERREQ__MEMPOOL_ALLOC 
VG_USERREQ__MEMPOOL_FREE 
VG_USERREQ__MEMPOOL_TRIM 
VG_USERREQ__MOVE_MEMPOOL 
VG_USERREQ__MEMPOOL_CHANGE 
VG_USERREQ__MEMPOOL_EXISTS 
VG_USERREQ__PRINTF 
VG_USERREQ__PRINTF_BACKTRACE 
VG_USERREQ__PRINTF_VALIST_BY_REF 
VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF 
VG_USERREQ__STACK_REGISTER 
VG_USERREQ__STACK_DEREGISTER 
VG_USERREQ__STACK_CHANGE 
VG_USERREQ__LOAD_PDB_DEBUGINFO 

Definition at line 4112 of file valgrind.h.

        { VG_USERREQ__RUNNING_ON_VALGRIND  = 0x1001,
          VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,

          /* These allow any function to be called from the simulated
             CPU but run on the real CPU.  Nb: the first arg passed to
             the function is always the ThreadId of the running
             thread!  So CLIENT_CALL0 actually requires a 1 arg
             function, etc. */
          VG_USERREQ__CLIENT_CALL0 = 0x1101,
          VG_USERREQ__CLIENT_CALL1 = 0x1102,
          VG_USERREQ__CLIENT_CALL2 = 0x1103,
          VG_USERREQ__CLIENT_CALL3 = 0x1104,

          /* Can be useful in regression testing suites -- eg. can
             send Valgrind's output to /dev/null and still count
             errors. */
          VG_USERREQ__COUNT_ERRORS = 0x1201,

          /* These are useful and can be interpreted by any tool that
             tracks malloc() et al, by using vg_replace_malloc.c. */
          VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
          VG_USERREQ__FREELIKE_BLOCK   = 0x1302,
          /* Memory pool support. */
          VG_USERREQ__CREATE_MEMPOOL   = 0x1303,
          VG_USERREQ__DESTROY_MEMPOOL  = 0x1304,
          VG_USERREQ__MEMPOOL_ALLOC    = 0x1305,
          VG_USERREQ__MEMPOOL_FREE     = 0x1306,
          VG_USERREQ__MEMPOOL_TRIM     = 0x1307,
          VG_USERREQ__MOVE_MEMPOOL     = 0x1308,
          VG_USERREQ__MEMPOOL_CHANGE   = 0x1309,
          VG_USERREQ__MEMPOOL_EXISTS   = 0x130a,

          /* Allow printfs to valgrind log. */
          /* The first two pass the va_list argument by value, which
             assumes it is the same size as or smaller than a UWord,
             which generally isn't the case.  Hence are deprecated.
             The second two pass the vargs by reference and so are
             immune to this problem. */
          /* both :: char* fmt, va_list vargs (DEPRECATED) */
          VG_USERREQ__PRINTF           = 0x1401,
          VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
          /* both :: char* fmt, va_list* vargs */
          VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
          VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,

          /* Stack support. */
          VG_USERREQ__STACK_REGISTER   = 0x1501,
          VG_USERREQ__STACK_DEREGISTER = 0x1502,
          VG_USERREQ__STACK_CHANGE     = 0x1503,

          /* Wine support */
          VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601
   } Vg_ClientRequest;

Function Documentation

FILE_LICENCE ( BSD3  )