Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* -*- c -*- | 1 /* -*- c -*- |
2 ---------------------------------------------------------------- | 2 ---------------------------------------------------------------- |
3 | 3 |
4 Notice that the following BSD-style license applies to this one | 4 Notice that the following BSD-style license applies to this one |
5 file (valgrind.h) only. The rest of Valgrind is licensed under the | 5 file (valgrind.h) only. The rest of Valgrind is licensed under the |
6 terms of the GNU General Public License, version 2, unless | 6 terms of the GNU General Public License, version 2, unless |
7 otherwise indicated. See the COPYING file in the source | 7 otherwise indicated. See the COPYING file in the source |
8 distribution for details. | 8 distribution for details. |
9 | 9 |
10 ---------------------------------------------------------------- | 10 ---------------------------------------------------------------- |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 # define PLAT_mips32_linux 1 | 152 # define PLAT_mips32_linux 1 |
153 #else | 153 #else |
154 /* If we're not compiling for our target platform, don't generate | 154 /* If we're not compiling for our target platform, don't generate |
155 any inline asms. */ | 155 any inline asms. */ |
156 # if !defined(NVALGRIND) | 156 # if !defined(NVALGRIND) |
157 # define NVALGRIND 1 | 157 # define NVALGRIND 1 |
158 # endif | 158 # endif |
159 #endif | 159 #endif |
160 | 160 |
161 | 161 |
162 /* XXX: Unfortunately x64 Visual C++ does not suport inline asms, | |
Peter Barnes
2018/05/23 19:45:42
This should be defined by the build system, when n
| |
163 * so disable the use of valgrind's inline asm's for x64 Visual C++ | |
164 * builds, so that x64 Visual C++ builds of GLib can be maintained | |
165 */ | |
166 #if defined (PLAT_amd64_win64) && defined (_MSC_VER) | |
167 # if !defined(NVALGRIND) | |
168 # define NVALGRIND 1 | |
169 # endif | |
170 #endif | |
171 | |
162 /* ------------------------------------------------------------------ */ | 172 /* ------------------------------------------------------------------ */ |
163 /* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS. There is nothing */ | 173 /* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS. There is nothing */ |
164 /* in here of use to end-users -- skip to the next section. */ | 174 /* in here of use to end-users -- skip to the next section. */ |
165 /* ------------------------------------------------------------------ */ | 175 /* ------------------------------------------------------------------ */ |
166 | 176 |
167 /* | 177 /* |
168 * VALGRIND_DO_CLIENT_REQUEST(): a statement that invokes a Valgrind client | 178 * VALGRIND_DO_CLIENT_REQUEST(): a statement that invokes a Valgrind client |
169 * request. Accepts both pointers and integers as arguments. | 179 * request. Accepts both pointers and integers as arguments. |
170 * | 180 * |
171 * VALGRIND_DO_CLIENT_REQUEST_STMT(): a statement that invokes a Valgrind | 181 * VALGRIND_DO_CLIENT_REQUEST_STMT(): a statement that invokes a Valgrind |
(...skipping 5086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5258 static int VALGRIND_PRINTF(const char *format, ...) | 5268 static int VALGRIND_PRINTF(const char *format, ...) |
5259 __attribute__((format(__printf__, 1, 2), __unused__)); | 5269 __attribute__((format(__printf__, 1, 2), __unused__)); |
5260 #endif | 5270 #endif |
5261 static int | 5271 static int |
5262 #if defined(_MSC_VER) | 5272 #if defined(_MSC_VER) |
5263 __inline | 5273 __inline |
5264 #endif | 5274 #endif |
5265 VALGRIND_PRINTF(const char *format, ...) | 5275 VALGRIND_PRINTF(const char *format, ...) |
5266 { | 5276 { |
5267 #if defined(NVALGRIND) | 5277 #if defined(NVALGRIND) |
5268 return 0; | 5278 (void)format; // make compiler happy |
Peter Barnes
2018/05/23 19:45:41
Don't modify upstream file. Need to find another
| |
5279 return 0; | |
5269 #else /* NVALGRIND */ | 5280 #else /* NVALGRIND */ |
5270 #if defined(_MSC_VER) || defined(__MINGW64__) | 5281 #if defined(_MSC_VER) || defined(__MINGW64__) |
5271 uintptr_t _qzz_res; | 5282 uintptr_t _qzz_res; |
5272 #else | 5283 #else |
5273 unsigned long _qzz_res; | 5284 unsigned long _qzz_res; |
5274 #endif | 5285 #endif |
5275 va_list vargs; | 5286 va_list vargs; |
5276 va_start(vargs, format); | 5287 va_start(vargs, format); |
5277 #if defined(_MSC_VER) || defined(__MINGW64__) | 5288 #if defined(_MSC_VER) || defined(__MINGW64__) |
5278 _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, | 5289 _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, |
(...skipping 17 matching lines...) Expand all Loading... | |
5296 static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...) | 5307 static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...) |
5297 __attribute__((format(__printf__, 1, 2), __unused__)); | 5308 __attribute__((format(__printf__, 1, 2), __unused__)); |
5298 #endif | 5309 #endif |
5299 static int | 5310 static int |
5300 #if defined(_MSC_VER) | 5311 #if defined(_MSC_VER) |
5301 __inline | 5312 __inline |
5302 #endif | 5313 #endif |
5303 VALGRIND_PRINTF_BACKTRACE(const char *format, ...) | 5314 VALGRIND_PRINTF_BACKTRACE(const char *format, ...) |
5304 { | 5315 { |
5305 #if defined(NVALGRIND) | 5316 #if defined(NVALGRIND) |
5306 return 0; | 5317 (void)format; // make compiler happy |
Peter Barnes
2018/05/23 19:45:42
Don't modify upstream file. Need to find another
| |
5318 return 0; | |
5307 #else /* NVALGRIND */ | 5319 #else /* NVALGRIND */ |
5308 #if defined(_MSC_VER) || defined(__MINGW64__) | 5320 #if defined(_MSC_VER) || defined(__MINGW64__) |
5309 uintptr_t _qzz_res; | 5321 uintptr_t _qzz_res; |
5310 #else | 5322 #else |
5311 unsigned long _qzz_res; | 5323 unsigned long _qzz_res; |
5312 #endif | 5324 #endif |
5313 va_list vargs; | 5325 va_list vargs; |
5314 va_start(vargs, format); | 5326 va_start(vargs, format); |
5315 #if defined(_MSC_VER) || defined(__MINGW64__) | 5327 #if defined(_MSC_VER) || defined(__MINGW64__) |
5316 _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, | 5328 _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5615 #undef PLAT_x86_linux | 5627 #undef PLAT_x86_linux |
5616 #undef PLAT_amd64_linux | 5628 #undef PLAT_amd64_linux |
5617 #undef PLAT_ppc32_linux | 5629 #undef PLAT_ppc32_linux |
5618 #undef PLAT_ppc64_linux | 5630 #undef PLAT_ppc64_linux |
5619 #undef PLAT_arm_linux | 5631 #undef PLAT_arm_linux |
5620 #undef PLAT_s390x_linux | 5632 #undef PLAT_s390x_linux |
5621 #undef PLAT_mips32_linux | 5633 #undef PLAT_mips32_linux |
5622 #undef PLAT_mips64_linux | 5634 #undef PLAT_mips64_linux |
5623 | 5635 |
5624 #endif /* __VALGRIND_H */ | 5636 #endif /* __VALGRIND_H */ |
OLD | NEW |