1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: dbg_Break.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: 23646 $ 14 *---------------------------------------------------------------------------*/ 15 16 /*! 17 @file 18 19 :include nn/dbg.h 20 */ 21 22 #ifndef NN_DBG_DBG_BREAK_H_ 23 #define NN_DBG_DBG_BREAK_H_ 24 25 #include <nn/Result.h> 26 #include <nn/types.h> 27 #include <nn/dbg/dbg_Enum.h> 28 29 //------------------------------------------------------------------- 30 // for C / C++ 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif // ifdef __cplusplus 35 36 /*! 37 @brief 対応する C++ 関数 @ref nn::dbg::Break を参照してください。 38 */ 39 nnResult nndbgBreak(int reason); 40 41 /*! 42 @brief 対応する C++ 関数 @ref nn::dbg::Panic を参照してください。 43 */ 44 void nndbgPanic(void); 45 46 #ifdef __cplusplus 47 } 48 #endif // ifdef __cplusplus 49 50 51 52 //------------------------------------------------------------------- 53 // for C++ 54 55 #ifdef __cplusplus 56 57 namespace nn { namespace dbg { 58 59 /*! 60 @brief プログラムを停止します。 61 62 デバッガ上で実行している場合、 63 Break を呼び出すとその位置でプログラムが停止状態になります。 64 65 デバッガ上でない場合はプログラムが終了します。 66 ただし Config ツールで「Break Stop」を 67 「enable」にすることで終了ではなく停止するようになります。 68 69 @param[in] reason 停止の原因を示す値。 70 71 @return 関数の実行結果を返します。 72 */ 73 nn::Result Break(nn::dbg::BreakReason reason); 74 75 /*! 76 @brief プログラムを停止します。 77 78 停止の原因は BREAK_REASON_PANIC です。 79 80 @return 関数の実行結果を返します。 81 */ Break()82 inline nn::Result Break() 83 { 84 return Break(BREAK_REASON_PANIC); 85 } 86 87 /*! 88 @brief プログラムを停止します。 89 90 停止の原因は BREAK_REASON_PANIC です。 91 */ 92 void Panic(); 93 94 }} 95 96 #endif // ifdef __cplusplus 97 98 99 100 #endif /* NN_DBG_DBG_BREAK_H_ */ 101