📄 plxdbg.h
字号:
/***************************************************************************
*
* Pollex Mobile Platform
*
* Copyright (c) 2004 by Pollex Mobile Software Co., Ltd.
* All Rights Reserved
*
* Module :
*
* Purpose :
*
\**************************************************************************/
#ifndef __PLXDBG_H
#define __PLXDBG_H
#define MsgOut PlxTrace
#define printf PlxTrace
void PlxTrace(const char* format, ...);
#if (defined _DEBUG) && (defined _MSC_VER) // For Microsoft Visual C++
#define _CRT_ASSERT 2
int __cdecl _CrtDbgReport(
int,
const char *,
int,
const char *,
const char *,
...);
#define ASSERT(expr) \
do { \
if (!(expr) && \
(1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, #expr))) \
__asm { int 3 }; \
} while (0)
#else
#ifndef ASSERT
#define ASSERT(f) ((void)0)
#endif // conflict with arm1.2
#endif
#if (defined _DEBUG) && (defined PLX_TRACE_OUT)
#define TRACE PlxTrace
#define TRACELINE() PlxTrace("Pollex TRACE: File : %s, Line : %d\r\n", __FILE__, __LINE__)
#else
#define TRACE ((void)0)
#define TRACELINE()
#endif // PLX_DEBUG
//#define PLX_MEM_DEBUG
#ifdef PLX_MEM_DEBUG
#ifdef malloc
#undef malloc
#endif
#ifdef free
#undef free
#endif
extern void* PLX_xMalloc( int flags, unsigned long size, char* file, unsigned long line);
extern int PLX_Free(void* ptr, char* file, unsigned long line);
#define malloc(size) PLX_xMalloc(0, size, __FILE__, __LINE__)
//#define malloc(size) PlxMallocD( size, __FILE__, __LINE__)
#ifdef HAVE_EXPAT_CONFIG_H
#define free PlxFreeDForExpat
#else
#define free(pmem) PLX_Free(pmem, __FILE__, __LINE__)
//#define free(pmem) PlxFreeD(pmem, __FILE__, __LINE__)
#endif
#endif // end of PLX_MEM_DEBUG
#ifdef __cplusplus
extern "C" {
#endif
void* PlxMallocD(size_t size, const char* pszFile, int nLine);
void PlxFreeD(void* pMem, const char* pszFile, int nLine);
void PlxFreeDForExpat ( void* pMem ); //for browser parse, because it needs function pointer
int PlxInitDebugFile(const char *filename);
void PlxCloseDebugFile(void);
#ifdef __cplusplus
}
#endif
#endif // __PLXDBG_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -