您的位置:首页 > 其它

通过OALLogSetZones()函数打开OAL全部调试信息

2010-09-12 13:51 176 查看
/*************************************************************
** 标题:通过OALLogSetZones()函数打开OAL全部调试信息
** 作者:Veabol & 韦伯嵌入式开发网
** 发布日期:2010-09-08
** 最后修改:2010-09-12
** 注意事项:转载需注明出处,且转载过程中不得修改、删除文章中的任何内容;未经作者同意,商业网站不可转载
*************************************************************/




OAL层代码中诸如 OALMSG(OAL_FUNC, (L"+OEMInit/r/n"));类型的代码默认只有使用OAL_ERROR和OAL_WARN才能输出调试信息,实际上可以通过简单地通过OALLogSetZones()函数打开OAL全部调试信息。
在MSDN中函数说明如下:
This function updates the current trace zone mask.

void OALLogSetZones( UINT32 zones);

Parameterszones [in] Specifies the trace zones to be logged. See OAL Trace Zones for descriptions of the valid trace zones. The trace zones can be combined in this argument using Boolean operators. Return Values
None.
(原创文章,转载请注明出处: http://www.veabol.com/thread-17-1-1.html)
OAL Trace Zones 描述如下:
OAL trace zones determine the type and source of logging information. Several trace zone constants, OAL_FUNC, OAL_INFO, and OAL_VERBOSE, are module-dependent. These constants must be combined with module-based trace zone constants. For example, to log function calls in the memory module, use OAL_FUNC and OAL_MEMORY.
OAL_ERROR and OAL_WARN specify general logging and are not associated with any modules.
The following table shows the supported OAL trace zones.
ZoneDescription
OAL_ERRORLogs errors. This trace zone is not associated with any modules.
OAL_WARNLogs warnings. This trace zone is not associated with any modules.
OAL_FUNCLogs function calls. Use this trace zone to log program flow information. This trace zone must be set with a module-based trace zone when specified in a function.
OAL_INFOSpecifies that informational messages will be logged. This trace zone must be set with a module-based trace zone when specified in a function.
OAL_VERBOSELogs in verbose mode. This trace zone must be set with a module-based trace zone when specified in a function.
OAL_STUBLogs messages from the stub module.
OAL_KEYVALLogs messages from the keyval module.
OAL_IOLogs messages from the IO module.
OAL_CACHELogs messages from the cache module.
OAL_RTCLogs messages from the RTC module.
OAL_POWERLogs messages from the power module.
OAL_PCILogs messages from the PCI module.
OAL_ARGSLogs messages from the arguments module.
OAL_MEMORYLogs messages from the memory module.
OAL_IOCTLLogs messages from the IOCTL module.
OAL_TIMERLogs messages from the timer module.
OAL_ETHERLogs messages from the Ethernet module
OAL_FLASHLogs messages from the flash module.
OAL_INTRLogs messages from the interrupts module.
OAL_KITLLogs messages from the KITL module.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐