1 /*---------------------------------------------------------------------------* 2 Project: Dolphin Debugger stubs 3 File: DBInterface.h 4 5 Copyright 1998, 1999 Nintendo. 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 $Log: DBInterface.h,v $ 14 Revision 1.2 2006/02/04 11:56:45 hashida 15 (none) 16 17 Revision 1.1.1.1 2005/12/29 06:53:27 hiratsu 18 Initial import. 19 20 Revision 1.1.1.1 2005/05/12 02:41:07 yasuh-to 21 Ported from dolphin source tree. 22 23 24 2 1999/09/01 1:00p Tian 25 Added exception return field. It is filled in but not necessarily used 26 by the debugger. 27 28 1 1999/07/08 8:06p Tian 29 Moved to include/dolphin/db/ 30 31 2 1999/05/11 10:14a Shiki 32 Refreshed include tree. 33 34 1 1999/04/30 12:47p Tianli01 35 36 2 1999/03/31 4:59p Tianli01 37 Renamed OSException to __OSException, moved structure offset #define's 38 into OSLoMem.h 39 40 1 1999/03/26 2:19p Tianli01 41 Initial checkin. Debugger stubs and exception handlers. Exception 42 handling path functional but does not conform to specification yet. 43 $NoKeywords: $ 44 *---------------------------------------------------------------------------*/ 45 46 #ifndef __DBINTERFACE_H__ 47 #define __DBINTERFACE_H__ 48 49 #include <revolution/os.h> 50 51 #ifdef __cplusplus 52 extern "C" { 53 #endif 54 55 typedef struct DBInterface 56 { 57 u32 bPresent; // non zero if debug kernel is loaded 58 u32 exceptionMask; // bitmask of exceptions 59 60 // ptr to the destination so it does not have to be in low 61 // memory, nor do we have to perform 2 loads 62 void (*ExceptionDestination) ( void ); 63 64 // Return address from DBExceptionDestination that debugger should 65 // jump to. 66 void *exceptionReturn; 67 } DBInterface; 68 69 // Set dynamically to OSLoMem->OS_DBINTERFACE_ADDR by DBInit, 70 // which is used ONLY by testing code 71 extern DBInterface* __DBInterface; 72 73 BOOL __DBIsExceptionMarked ( __OSException exception ); 74 75 // The well-known destination the debugger 76 void __DBExceptionDestination ( void ); 77 78 #ifdef _DEBUG 79 // XXX for use in testing the protocol XXX 80 // XXX must be eliminated before release XXX 81 void __DBInit ( void ); 82 void __DBSetPresent ( u32 value ); 83 void __DBMarkException ( __OSException exception, 84 BOOL value ); 85 #endif 86 87 88 #ifdef __cplusplus 89 } 90 #endif 91 #endif // __DBINTERFACE_H__ 92