Qt 4.8
Macros | Enumerations
valgrind_p.h File Reference
#include <stdarg.h>

Go to the source code of this file.

Macros

#define __extension__   /* */
 
#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 I_WRAP_SONAME_FNNAME_ZU(soname, fnname)   _vgwZU_##soname##_##fnname
 
#define I_WRAP_SONAME_FNNAME_ZZ(soname, fnname)   _vgwZZ_##soname##_##fnname
 
#define NVALGRIND   1
 
#define RUNNING_ON_VALGRIND
 
#define VALGRIND_COUNT_ERRORS
 
#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)
 
#define VALGRIND_DESTROY_MEMPOOL(pool)
 
#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr, _qzz_len)
 
#define VALGRIND_DO_CLIENT_REQUEST( _zzq_rlval, _zzq_default, _zzq_request, _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)
 
#define VALGRIND_FREELIKE_BLOCK(addr, rzB)
 
#define VALGRIND_GET_ORIG_FN(_lval)   VALGRIND_GET_NR_CONTEXT(_lval)
 
#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)
 
#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)
 
#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)
 
#define VALGRIND_MEMPOOL_EXISTS(pool)
 
#define VALGRIND_MEMPOOL_FREE(pool, addr)
 
#define VALGRIND_MEMPOOL_TRIM(pool, addr, size)
 
#define VALGRIND_MOVE_MEMPOOL(poolA, poolB)
 
#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_PRINTF(...)
 
#define VALGRIND_PRINTF_BACKTRACE(...)
 
#define VALGRIND_STACK_CHANGE(id, start, end)
 
#define VALGRIND_STACK_DEREGISTER(id)
 
#define VALGRIND_STACK_REGISTER(start, end)
 
#define VG_IS_TOOL_USERREQ(a, b, v)   (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
 
#define VG_USERREQ_TOOL_BASE(a, b)   ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
 

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__STACK_REGISTER = 0x1501,
  VG_USERREQ__STACK_DEREGISTER = 0x1502, VG_USERREQ__STACK_CHANGE = 0x1503
}
 

Macro Definition Documentation

◆ __extension__

#define __extension__   /* */

Definition at line 3632 of file valgrind_p.h.

◆ CALL_FN_v_v

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

Definition at line 599 of file valgrind_p.h.

◆ CALL_FN_v_W

#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 603 of file valgrind_p.h.

◆ CALL_FN_v_WW

#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 607 of file valgrind_p.h.

◆ CALL_FN_v_WWW

#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 611 of file valgrind_p.h.

◆ I_WRAP_SONAME_FNNAME_ZU

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

Definition at line 584 of file valgrind_p.h.

◆ I_WRAP_SONAME_FNNAME_ZZ

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

Definition at line 587 of file valgrind_p.h.

◆ NVALGRIND

#define NVALGRIND   1

Definition at line 116 of file valgrind_p.h.

◆ RUNNING_ON_VALGRIND

#define RUNNING_ON_VALGRIND
Value:
({unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* if not */, \
0, 0, 0, 0, 0); \
_qzz_res; \
})
#define __extension__
Definition: valgrind_p.h:3632

Definition at line 3639 of file valgrind_p.h.

◆ VALGRIND_COUNT_ERRORS

#define VALGRIND_COUNT_ERRORS
Value:
({unsigned int _qyy_res; \
VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \
0, 0, 0, 0, 0); \
_qyy_res; \
})
#define __extension__
Definition: valgrind_p.h:3632

Definition at line 3773 of file valgrind_p.h.

◆ VALGRIND_CREATE_MEMPOOL

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

Definition at line 3826 of file valgrind_p.h.

◆ VALGRIND_DESTROY_MEMPOOL

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

Definition at line 3834 of file valgrind_p.h.

◆ VALGRIND_DISCARD_TRANSLATIONS

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

Definition at line 3652 of file valgrind_p.h.

◆ VALGRIND_DO_CLIENT_REQUEST

#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 131 of file valgrind_p.h.

◆ VALGRIND_FREELIKE_BLOCK

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

Definition at line 3818 of file valgrind_p.h.

◆ VALGRIND_GET_ORIG_FN

#define VALGRIND_GET_ORIG_FN (   _lval)    VALGRIND_GET_NR_CONTEXT(_lval)

Definition at line 594 of file valgrind_p.h.

◆ VALGRIND_MALLOCLIKE_BLOCK

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

Definition at line 3807 of file valgrind_p.h.

◆ VALGRIND_MEMPOOL_ALLOC

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

Definition at line 3842 of file valgrind_p.h.

◆ VALGRIND_MEMPOOL_CHANGE

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

Definition at line 3874 of file valgrind_p.h.

◆ VALGRIND_MEMPOOL_EXISTS

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

Definition at line 3882 of file valgrind_p.h.

◆ VALGRIND_MEMPOOL_FREE

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

Definition at line 3850 of file valgrind_p.h.

◆ VALGRIND_MEMPOOL_TRIM

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

Definition at line 3858 of file valgrind_p.h.

◆ VALGRIND_MOVE_MEMPOOL

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

Definition at line 3866 of file valgrind_p.h.

◆ VALGRIND_NON_SIMD_CALL0

#define VALGRIND_NON_SIMD_CALL0 (   _qyy_fn)
Value:
({unsigned long _qyy_res; \
VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \
_qyy_fn, \
0, 0, 0, 0); \
_qyy_res; \
})
#define __extension__
Definition: valgrind_p.h:3632

Definition at line 3728 of file valgrind_p.h.

◆ VALGRIND_NON_SIMD_CALL1

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

Definition at line 3738 of file valgrind_p.h.

◆ VALGRIND_NON_SIMD_CALL2

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

Definition at line 3748 of file valgrind_p.h.

◆ VALGRIND_NON_SIMD_CALL3

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

Definition at line 3758 of file valgrind_p.h.

◆ VALGRIND_PRINTF

#define VALGRIND_PRINTF (   ...)

Definition at line 3665 of file valgrind_p.h.

◆ VALGRIND_PRINTF_BACKTRACE

#define VALGRIND_PRINTF_BACKTRACE (   ...)

Definition at line 3666 of file valgrind_p.h.

◆ VALGRIND_STACK_CHANGE

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

Definition at line 3909 of file valgrind_p.h.

◆ VALGRIND_STACK_DEREGISTER

#define VALGRIND_STACK_DEREGISTER (   id)
Value:
{unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
id, 0, 0, 0, 0); \
}

Definition at line 3901 of file valgrind_p.h.

◆ VALGRIND_STACK_REGISTER

#define VALGRIND_STACK_REGISTER (   start,
  end 
)
Value:
({unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
start, end, 0, 0, 0); \
_qzz_res; \
})
static const KeyPair *const end

Definition at line 3891 of file valgrind_p.h.

◆ VG_IS_TOOL_USERREQ

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

Definition at line 3581 of file valgrind_p.h.

◆ VG_USERREQ_TOOL_BASE

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

Definition at line 3579 of file valgrind_p.h.

Enumeration Type Documentation

◆ Vg_ClientRequest

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__STACK_REGISTER 
VG_USERREQ__STACK_DEREGISTER 
VG_USERREQ__STACK_CHANGE 

Definition at line 3588 of file valgrind_p.h.

3591 
3592  /* These allow any function to be called from the simulated
3593  CPU but run on the real CPU. Nb: the first arg passed to
3594  the function is always the ThreadId of the running
3595  thread! So CLIENT_CALL0 actually requires a 1 arg
3596  function, etc. */
3597  VG_USERREQ__CLIENT_CALL0 = 0x1101,
3598  VG_USERREQ__CLIENT_CALL1 = 0x1102,
3599  VG_USERREQ__CLIENT_CALL2 = 0x1103,
3600  VG_USERREQ__CLIENT_CALL3 = 0x1104,
3601 
3602  /* Can be useful in regression testing suites -- eg. can
3603  send Valgrind's output to /dev/null and still count
3604  errors. */
3605  VG_USERREQ__COUNT_ERRORS = 0x1201,
3606 
3607  /* These are useful and can be interpreted by any tool that
3608  tracks malloc() et al, by using vg_replace_malloc.c. */
3610  VG_USERREQ__FREELIKE_BLOCK = 0x1302,
3611  /* Memory pool support. */
3612  VG_USERREQ__CREATE_MEMPOOL = 0x1303,
3613  VG_USERREQ__DESTROY_MEMPOOL = 0x1304,
3614  VG_USERREQ__MEMPOOL_ALLOC = 0x1305,
3615  VG_USERREQ__MEMPOOL_FREE = 0x1306,
3616  VG_USERREQ__MEMPOOL_TRIM = 0x1307,
3617  VG_USERREQ__MOVE_MEMPOOL = 0x1308,
3618  VG_USERREQ__MEMPOOL_CHANGE = 0x1309,
3619  VG_USERREQ__MEMPOOL_EXISTS = 0x130a,
3620 
3621  /* Allow printfs to valgrind log. */
3622  VG_USERREQ__PRINTF = 0x1401,
3624 
3625  /* Stack support. */
3626  VG_USERREQ__STACK_REGISTER = 0x1501,
3628  VG_USERREQ__STACK_CHANGE = 0x1503
3629  } Vg_ClientRequest;
Vg_ClientRequest
Definition: valgrind_p.h:3588