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 be
4 * found in the LICENSE file.
7 /* Define simple debugging utilities that are turned on/off by the
8 * value of the define flag DEBUGGING.
10 * To turn on debugging of instruction decoding, change value of
15 #ifndef NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__
16 #define NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__
18 /* Turn off debugging if not otherwise specified in the specific code file. */
24 /* Defines to execute statement(s) s if in DEBUGGING mode, and compile
25 * in either mode. This allows type checking to be applied at all times.
29 /* Defines to compile but not include statement(s) s if not
32 #define DEBUG(s) do { if (0) { s; } } while (0)
36 /* Defines to compile execute statement(s) if in DEBUGGING mode.
37 * Erases otherwise. This should only be used when linking
38 * would otherwise require the symbol when DEBUGGING is false.
40 #define DEBUG_OR_ERASE(s) s
42 /* Defines to erase s if not in DEBUGGING mode. */
43 #define DEBUG_OR_ERASE(s)
46 #endif /* NATIVE_CLIENT_SRC_SHARED_UTILS_DEBUGGING_H__ */