Skip to content

Commit 032bdd4

Browse files
committed
---
yaml --- r: 126383 b: refs/heads/try c: 862ba43 h: refs/heads/master i: 126381: a87f1e2 126379: 670dfb8 126375: e6def97 126367: 683dc83 v: v3
1 parent d785e77 commit 032bdd4

File tree

2 files changed

+32
-31
lines changed

2 files changed

+32
-31
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 2a47fa708cfbf6b90a8ffacbaf00b8250bfa72cd
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: 463d6680d17380228dfea509b19b1ff67d50eafc
5+
refs/heads/try: 862ba430c5bc1ba9e47644d2a75a6091842c53d0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/rt/valgrind/valgrind.h

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
1. Redistributions of source code must retain the above copyright
2222
notice, this list of conditions and the following disclaimer.
2323
24-
2. The origin of this software must not be misrepresented; you must
25-
not claim that you wrote the original software. If you use this
26-
software in a product, an acknowledgment in the product
24+
2. The origin of this software must not be misrepresented; you must
25+
not claim that you wrote the original software. If you use this
26+
software in a product, an acknowledgment in the product
2727
documentation would be appreciated but is not required.
2828
2929
3. Altered source versions must be plainly marked as such, and must
3030
not be misrepresented as being the original software.
3131
32-
4. The name of the author may not be used to endorse or promote
33-
products derived from this software without specific prior written
32+
4. The name of the author may not be used to endorse or promote
33+
products derived from this software without specific prior written
3434
permission.
3535
3636
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -52,13 +52,13 @@
5252
the terms of the GNU General Public License, version 2. See the
5353
COPYING file in the source distribution for details.
5454
55-
----------------------------------------------------------------
55+
----------------------------------------------------------------
5656
*/
5757

5858

5959
/* This file is for inclusion into client (your!) code.
6060
61-
You can use these macros to manipulate and query Valgrind's
61+
You can use these macros to manipulate and query Valgrind's
6262
execution inside your own programs.
6363
6464
The resulting executables will still run without Valgrind, just a
@@ -126,11 +126,11 @@
126126
# define PLAT_x86_darwin 1
127127
#elif defined(__APPLE__) && defined(__x86_64__)
128128
# define PLAT_amd64_darwin 1
129+
#elif defined(__MINGW64__) || (defined(_WIN64) && defined(_M_X64))
130+
# define PLAT_amd64_win64 1
129131
#elif defined(__MINGW32__) || defined(__CYGWIN32__) \
130132
|| (defined(_WIN32) && defined(_M_IX86))
131133
# define PLAT_x86_win32 1
132-
#elif defined(__MINGW64__) || (defined(_WIN64) && defined(_M_X64))
133-
# define PLAT_amd64_win64 1
134134
#elif defined(__linux__) && defined(__i386__)
135135
# define PLAT_x86_linux 1
136136
#elif defined(__linux__) && defined(__x86_64__)
@@ -214,8 +214,8 @@
214214
this is executed not under Valgrind. Args are passed in a memory
215215
block, and so there's no intrinsic limit to the number that could
216216
be passed, but it's currently five.
217-
218-
The macro args are:
217+
218+
The macro args are:
219219
_zzq_rlval result lvalue
220220
_zzq_default default value (result returned when running on real CPU)
221221
_zzq_request request code
@@ -242,7 +242,7 @@
242242
|| (defined(PLAT_x86_win32) && defined(__GNUC__))
243243

244244
typedef
245-
struct {
245+
struct {
246246
unsigned int nraddr; /* where's the code? */
247247
}
248248
OrigFn;
@@ -306,7 +306,7 @@ typedef
306306
#if defined(PLAT_x86_win32) && !defined(__GNUC__)
307307

308308
typedef
309-
struct {
309+
struct {
310310
unsigned int nraddr; /* where's the code? */
311311
}
312312
OrigFn;
@@ -374,12 +374,13 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request,
374374

375375
#endif /* PLAT_x86_win32 */
376376

377-
/* ------------------------ amd64-{linux,darwin} --------------- */
377+
/* -------------------- amd64-{linux,darwin,win64} ------------- */
378378

379-
#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin)
379+
#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \
380+
|| defined(PLAT_amd64_win64)
380381

381382
typedef
382-
struct {
383+
struct {
383384
unsigned long long int nraddr; /* where's the code? */
384385
}
385386
OrigFn;
@@ -443,7 +444,7 @@ typedef
443444
#if defined(PLAT_ppc32_linux)
444445

445446
typedef
446-
struct {
447+
struct {
447448
unsigned int nraddr; /* where's the code? */
448449
}
449450
OrigFn;
@@ -512,7 +513,7 @@ typedef
512513
#if defined(PLAT_ppc64_linux)
513514

514515
typedef
515-
struct {
516+
struct {
516517
unsigned long long int nraddr; /* where's the code? */
517518
unsigned long long int r2; /* what tocptr do we need? */
518519
}
@@ -591,7 +592,7 @@ typedef
591592
#if defined(PLAT_arm_linux)
592593

593594
typedef
594-
struct {
595+
struct {
595596
unsigned int nraddr; /* where's the code? */
596597
}
597598
OrigFn;
@@ -736,7 +737,7 @@ typedef
736737
#if defined(PLAT_mips32_linux)
737738

738739
typedef
739-
struct {
740+
struct {
740741
unsigned int nraddr; /* where's the code? */
741742
}
742743
OrigFn;
@@ -750,7 +751,7 @@ typedef
750751
"srl $0, $0, 29\n\t" \
751752
"srl $0, $0, 3\n\t" \
752753
"srl $0, $0, 19\n\t"
753-
754+
754755
#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \
755756
_zzq_default, _zzq_request, \
756757
_zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \
@@ -1999,7 +2000,7 @@ typedef
19992000
#define VALGRIND_RESTORE_STACK \
20002001
"mr 1,28\n\t"
20012002

2002-
/* These CALL_FN_ macros assume that on ppc32-linux,
2003+
/* These CALL_FN_ macros assume that on ppc32-linux,
20032004
sizeof(unsigned long) == 4. */
20042005

20052006
#define CALL_FN_W_v(lval, orig) \
@@ -3509,7 +3510,7 @@ typedef
35093510
#define __CALLER_SAVED_REGS "0","1","2","3","4","5","14", \
35103511
"f0","f1","f2","f3","f4","f5","f6","f7"
35113512

3512-
/* Nb: Although r11 is modified in the asm snippets below (inside
3513+
/* Nb: Although r11 is modified in the asm snippets below (inside
35133514
VALGRIND_CFI_PROLOGUE) it is not listed in the clobber section, for
35143515
two reasons:
35153516
(1) r11 is restored in VALGRIND_CFI_EPILOGUE, so effectively it is not
@@ -3959,7 +3960,7 @@ typedef
39593960
#endif /* PLAT_s390x_linux */
39603961

39613962
/* ------------------------- mips32-linux ----------------------- */
3962-
3963+
39633964
#if defined(PLAT_mips32_linux)
39643965

39653966
/* These regs are trashed by the hidden call. */
@@ -4935,7 +4936,7 @@ typedef
49354936
#define VG_IS_TOOL_USERREQ(a, b, v) \
49364937
(VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
49374938

4938-
/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !!
4939+
/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !!
49394940
This enum comprises an ABI exported by Valgrind to programs
49404941
which use client requests. DO NOT CHANGE THE ORDER OF THESE
49414942
ENTRIES, NOR DELETE ANY -- add new ones at the end. */
@@ -5073,7 +5074,7 @@ VALGRIND_PRINTF(const char *format, ...)
50735074
_qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,
50745075
VG_USERREQ__PRINTF_VALIST_BY_REF,
50755076
(unsigned long)format,
5076-
(unsigned long)&vargs,
5077+
(unsigned long)&vargs,
50775078
0, 0, 0);
50785079
#endif
50795080
va_end(vargs);
@@ -5111,7 +5112,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
51115112
_qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,
51125113
VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF,
51135114
(unsigned long)format,
5114-
(unsigned long)&vargs,
5115+
(unsigned long)&vargs,
51155116
0, 0, 0);
51165117
#endif
51175118
va_end(vargs);
@@ -5122,7 +5123,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
51225123

51235124
/* These requests allow control to move from the simulated CPU to the
51245125
real CPU, calling an arbitary function.
5125-
5126+
51265127
Note that the current ThreadId is inserted as the first argument.
51275128
So this call:
51285129
@@ -5208,15 +5209,15 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
52085209
- It marks the block as being addressable and undefined (if 'is_zeroed' is
52095210
not set), or addressable and defined (if 'is_zeroed' is set). This
52105211
controls how accesses to the block by the program are handled.
5211-
5212+
52125213
'addr' is the start of the usable block (ie. after any
52135214
redzone), 'sizeB' is its size. 'rzB' is the redzone size if the allocator
52145215
can apply redzones -- these are blocks of padding at the start and end of
52155216
each block. Adding redzones is recommended as it makes it much more likely
52165217
Valgrind will spot block overruns. `is_zeroed' indicates if the memory is
52175218
zeroed (or filled with another predictable value), as is the case for
52185219
calloc().
5219-
5220+
52205221
VALGRIND_MALLOCLIKE_BLOCK should be put immediately after the point where a
52215222
heap block -- that will be used by the client program -- is allocated.
52225223
It's best to put it at the outermost level of the allocator if possible;

0 commit comments

Comments
 (0)