OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The Native Client Authors. All rights reserved. | 2 * Copyright 2009 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* Define simple debugging utilities that are turned on/off by the | 7 /* Define simple debugging utilities that are turned on/off by the |
8 * value of the define flag DEBUGGING. | 8 * value of the define flag DEBUGGING. |
9 * | 9 * |
10 * To turn on debugging of instruction decoding, change value of | 10 * To turn on debugging of instruction decoding, change value of |
11 * DEBUGGING to 1. | 11 * DEBUGGING to 1. |
12 * | 12 * |
13 */ | 13 */ |
14 | 14 |
15 #ifndef NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ | 15 #ifndef NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ |
16 #define NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ | 16 #define NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ |
17 | 17 |
18 #if DEBUGGING | 18 #if DEBUGGING |
19 /* Defines to execute statement(s) s if in debug mode. */ | 19 /* Defines to execute statement(s) s if in debug mode. */ |
20 #define DEBUG(s) s | 20 #define DEBUG(s) s |
21 #else | 21 #else |
22 /* Defines to not include statement(s) s if not in debugging mode. */ | 22 /* Defines to not include statement(s) s if not in debugging mode. */ |
23 #define DEBUG(s) do { if (0) { s; } } while (0) | 23 #define DEBUG(s) do { if (0) { s; } } while (0) |
24 #endif | 24 #endif |
25 | 25 |
| 26 /* Turn off debugging if not otherwise specified in the specific code file. */ |
| 27 #ifndef DEBUGGING |
| 28 #define DEBUGGING 0 |
| 29 #endif |
| 30 |
26 #endif /* NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ */ | 31 #endif /* NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ */ |
OLD | NEW |