Re: Capturing debug messages using CeLog on a release terminal
- From: "Michel Verhagen (eMVP)" <mverhagen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 01 Nov 2006 11:40:33 +1300
Don't set the shipbuild flag in your retail kernel (because it will #define RETAILMSG and DEBUGMSG into nirvana) and don't set Enable CE Target control and don't set Enable Kernel Debugger. I'm not entirely sure if DEBUGMSGs (as opposed to RETAILMSGs) still work when replacing dll's in a retail build with their debug counterparts. I think it should, otherwise just #undef DEBUGMSG and #define DEBUGMSG RETAILMSG in the debug dll's you're including in the retail image. You can capture the debugmessages by hooking up a serial cable to whatever port you defined as your debug serial port and capture using for example Tera Term.
CeLog has nothing to do with debugmessages. That's only tracking CeLog events (use kernel tracker to show that). To enable that, simply enable profiling and the flush log settings in the platform and rebuild. You may need to set the registry entries to store the celog.clg on a storage device (I think it does that automatically when \Release can't be found, but not sure). If you want to see the threadnames and you didn't enable profiling, you can fix the celog.clg by copying it from your device to your flatreleasedir and opening a build window. Then type:
readlog -fixthreads celog.clg celogthreads.clg
Now you can open the .clg file in kernel tracker and see the thread names. Sue Loh wrote some excellent documentation on CeLog tools, it's all in MSDN.
Also be careful with setting ZoneCE to 0xffffffff. I've seen a couple of platforms where setting this results in a hanging kernel.
Hope this helps,
Michel Verhagen, eMVP
EmbeddedFusion
www.EmbeddedFusion.com
mverhagen at embeddedfusion dot com
Josh wrote:
Does anyone have any experience capturing and parsing debug messages using CeLog tools (oscapture, celogflush, readlog)? I.e., the sort of messages printed to the console under the Platform Builder debugger.
I have a problem that I can't debug in Platform Builder. It's sort of a heisenbug - the more debug I enable, the less stable the platform becomes, limiting my ability to get usable debug. I'd like to build a release version of my OS, but substitute a couple of the DLLs built in debug mode, and then capture the relevant debug, on the theory that the simpler system will be more robust.
I'm able to capture logs, but the debug statements that I would see in a Debug Build under Platform Builder aren't present, or if they are, readlog.exe isn't parsing them out. Instead, I get all the normal kernel tracker type stuff, which I don't really need. Ideally I'd want to suppress that for starters, and get the debug statements only.
Is there some key registry setting that I'm not tweaking properly? I'm running on CE 5.0, with the following settings, which I thought would suffice:
[HKEY_LOCAL_MACHINE\DebugZones]
"ndis"=dword:ffff
"ndisuio"=dword:ffff
"wzcsvc"=dword:ffff
"wzcapi"=dword:ffff
[HKEY_LOCAL_MACHINE\System\CeLog]
"ZoneCE"=dword:ffffffff
It seems to me that I've pulled this sort of thing off before when debugging a bluetooth issue, but my notes aren't great on the subject - I must be missing something.
Thanks,
- Josh
--
.
- Follow-Ups:
- Re: Capturing debug messages using CeLog on a release terminal
- From: Sue Loh [MS]
- Re: Capturing debug messages using CeLog on a release terminal
- Prev by Date: Re: Modify .dat files in public
- Next by Date: Re: Getting linking errors for DllCanUnloadNow and DllGetClassObject
- Previous by thread: Re: kernel startup is not being called
- Next by thread: Re: Capturing debug messages using CeLog on a release terminal
- Index(es):
Relevant Pages
|