1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: ndebug_horizon.h 4 5 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 14703 $ 14 *---------------------------------------------------------------------------*/ 15 16 /** 17 * ndebug.hからインクルードされる、HORIZON環境用定義 18 */ 19 20 21 #ifndef NDEBUG_HORIZON_H 22 #define NDEBUG_HORIZON_H 23 24 #include <nn/dbg.h> 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 #ifdef NN_BUILD_VERBOSE 31 /* 32 ビルド時にTWL_DEBUG=TRUEを指定するとこちらが有効になります。 33 */ 34 35 #define NDEBUG_ENABLE /**< 各ファイルで、この定義に囲まれた部分が有効になります。 */ 36 #define NDEBUG_PRINT_ENABLE 37 38 #define NDEBUG_Printf NN_TLOG_ /**< DEBUGGERのOutput画面に表示するprintf関数を指定してください。 */ 39 #define NDEBUG_Assert(...) NN_TASSERT_(__VA_ARGS__) /**< アサーション関数を指定してください。 */ 40 41 extern void NDEBUG_Dump(const void *ptr, s32 len); /**< 任意のアドレスを16進数でダンプする関数です。 ndebug_main.cに実装されています。*/ 42 43 #else 44 45 #undef NDEBUG_ENABLE 46 /* 47 ビルド時にTWL_DEBUG=TRUEを指定しないとこちらが有効になります。 48 NDEBUG_ENABLEで囲まれた部分と、以下の関数が全て無効になります。 49 */ 50 51 #define NDEBUG_Printf(...) 52 #define NDEBUG_Assert(cond) 53 #define NDEBUG_Dump(ptr, len) 54 55 #endif 56 57 #ifdef __cplusplus 58 } 59 #endif 60 61 /* NDEBUG_HORIZON_H */ 62 #endif 63