1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: dbg_Logger.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: 27789 $ 14 *---------------------------------------------------------------------------*/ 15 16 /*! 17 @file 18 19 :include nn/dbg.h 20 */ 21 22 #ifndef NN_DBG_DBG_DUMP_H_ 23 #define NN_DBG_DBG_DUMP_H_ 24 25 #ifdef __cplusplus 26 27 #include <nn/types.h> 28 #include <nn/dbg/dbg_DebugString.h> 29 #include <nn/config.h> 30 31 #define NN_DBG_DUMP_FLAG_POINTER 1 32 #define NN_DBG_DUMP_FLAG_STRING 2 33 34 /*! 35 :private 36 @param[in] p 出力するデータを指し示すポインタ 37 @param[in] size 出力するサイズ 38 @param[in] flags 出力形式 39 40 @brief データを 16 進形式でをデバッグウィンドウに出力します。 41 */ 42 #ifndef NN_SWITCH_DISABLE_DEBUG_PRINT 43 #ifdef __cplusplus 44 #define NN_DUMP_MEMORY( p, size, flags ) nn::dbg::detail::DumpMemory(p, size, flags) 45 #else // ifdef __cplusplus 46 #define NN_DUMP_MEMORY( p, size, flags ) nndbgDetailDumpMemory(p, size, flags) 47 #endif // ifdef __cplusplus else 48 #else // ifndef NN_SWITCH_DISABLE_DEBUG_PRINT 49 #define NN_DUMP_MEMORY( p, size, flags ) ((void)0) 50 #endif // ifndef NN_SWITCH_DISABLE_DEBUG_PRINT else 51 52 #define NN_DUMP( p, size ) NN_DUMP_MEMORY(p, size, 0) 53 #define NN_DUMP_POINTER( p, size ) NN_DUMP_MEMORY(p, size, NN_DBG_DUMP_FLAG_POINTER) 54 #define NN_DUMP_STRING( p, size ) NN_DUMP_MEMORY(p, size, NN_DBG_DUMP_FLAG_STRING) 55 56 namespace nn { 57 namespace dbg { 58 namespace detail { 59 60 void DumpMemory(const void* p, size_t size, bit32 flags); 61 } 62 } 63 } 64 65 66 #endif // __cplusplus 67 68 //------------------------------------------------------------------- 69 // for C / C++ 70 71 #include <nn/util/detail/util_CLibImpl.h> 72 73 NN_EXTERN_C void nndbgDetailDumpMemory(const void* p, size_t size, bit32 flags); 74 75 #endif 76