📄 pvr_debug.h
字号:
/*******************************************************************************
<header>
* Name : pvr_debug.h
* Title : PVR Debug Declarations
* Author : J R Morrissey
* Created : 20 May 2002
*
* Copyright : 2002 by Imagination Technologies Limited.
* All rights reserved. No part of this software, either
* material or conceptual may be copied or distributed,
* transmitted, transcribed, stored in a retrieval system
* or translated into any human or computer language in any
* form by any means, electronic, mechanical, manual or
* other-wise, or disclosed to third parties without the
* express written permission of Imagination Technologies
* Limited, Unit 8, HomePark Industrial Estate,
* King's Langley, Hertfordshire, WD4 8LZ, U.K.
*
* Description : Provides debug functionality
*
* Platform : Generic
*
* Modifications:-
* $Log: pvr_debug.h $
*
* --- Revision Logs Removed ---
*
* --- Revision Logs Removed ---
*
* --- Revision Logs Removed ---
*
* --- Revision Logs Removed ---
*
* --- Revision Logs Removed ---
*
* --- Revision Logs Removed ---
*
* --- Revision Logs Removed ---
*
*
</header>
*******************************************************************************/
#if !defined(__PVR_DEBUG_H__)
#define __PVR_DEBUG_H__
#include "img_types.h"
#if defined (__cplusplus)
extern "C" {
#endif
#define PVR_MAX_DEBUG_MESSAGE_LEN (512)
/* These are privately used by pvr_debug.c, use the DBG_ defines instead */
enum
{
DBGPRIV_FATAL,
DBGPRIV_ERROR,
DBGPRIV_WARNING,
DBGPRIV_MESSAGE,
DBGPRIV_VERBOSE
};
#define PVR_DBG_FATAL DBGPRIV_FATAL,__FILE__, __LINE__
#define PVR_DBG_ERROR DBGPRIV_ERROR,__FILE__, __LINE__
#define PVR_DBG_WARNING DBGPRIV_WARNING,__FILE__, __LINE__
#define PVR_DBG_MESSAGE DBGPRIV_MESSAGE,__FILE__, __LINE__
#define PVR_DBG_VERBOSE DBGPRIV_VERBOSE,__FILE__, __LINE__
#define PVR_DBG_FATAL_NF DBGPRIV_FATAL,IMG_NULL, 0
#define PVR_DBG_ERROR_NF DBGPRIV_ERROR,IMG_NULL, 0
#define PVR_DBG_WARNING_NF DBGPRIV_WARNING,IMG_NULL, 0
#define PVR_DBG_MESSAGE_NF DBGPRIV_MESSAGE,IMG_NULL, 0
#define PVR_DBG_VERBOSE_NF DBGPRIV_VERBOSE,IMG_NULL, 0
#if defined(DEBUG)
#define PVR_ASSERT(EXPR) if (!(EXPR)) PVRDebugAssertFail(__FILE__, __LINE__);
#define PVR_DPF(X) PVRDebugPrintf X
#define PVR_TRACE(X) PVRTrace X
/*----------------------------------------------------------------------------
<function>
FUNCTION : PVRDebugAssertFail
PURPOSE : To indicate to the user that a debug assertion has failed and
to prevent the program from continuing.
PARAMETERS : In : pszFile - The name of the source file where the assertion failed
In : uLine - The line number of the failed assertion
RETURNS : NEVER!
</function>
------------------------------------------------------------------------------*/
void PVRDebugAssertFail (
const IMG_CHAR* pszFile,
IMG_UINT32 uLine
);
/*----------------------------------------------------------------------------
<function>
FUNCTION : PVRDebugPrintf
PURPOSE : To output a debug message to the user
PARAMETERS : In : uDebugLevel - The current debug level
In : pszFile - The source file generating the message
In : uLine - The line of the source file
In : pszFormat - The message format string
In : ... - Zero or more arguments for use by the format string
RETURNS : None
</function>
------------------------------------------------------------------------------*/
void PVRDebugPrintf (
IMG_UINT32 uDebugLevel,
const IMG_CHAR* pszFilepath,
IMG_UINT32 uLine,
const IMG_CHAR* pszFormat,
...
);
void PVRTrace ( const IMG_CHAR* pszFormat, ... );
void PVRDebugSetLevel(IMG_UINT32 uDebugLevel);
#else /* PVR_DEBUG */
void PVRDebugPrintf (
IMG_UINT32 uDebugLevel,
const IMG_CHAR* pszFilepath,
IMG_UINT32 uLine,
const IMG_CHAR* pszFormat,
...
);
#define PVR_ASSERT(EXPR)
#define PVR_DPF(X)
#define PVR_TRACE(X)
#endif /* PVR_DEBUG */
#if defined (__cplusplus)
}
#endif
#endif /* __PVR_DEBUG_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -