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

Re: Capturing debug messages using CeLog on a release terminal by Michel

Michel
Tue Oct 31 16:40:33 CST 2006

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
>
>

--

Re: Capturing debug messages using CeLog on a release terminal by Sue

Sue
Mon Nov 20 12:00:54 CST 2006

Sorry for being slow to get involved here.

In CE5 we don't log debug messages to CeLog, but starting with Windows
Mobile 5 and Windows CE 6 we do. There is a CELZONE_DEBUG you can turn on
to get debug messages. Of course, you'll only capture the messages that are
actually logged, as Michel mentions about debug vs. retail builds.

If setting ZoneCE to 0xFFFFFFFF hangs the platform, it is a bug. That
should not happen. :-( Michel I don't know how to debug this if it's
platform specific, because I've never seen that happen. I wonder if it's
related to how the profiling build logs interrupts. You might try NOT
turning on IMGPROFILER. That flag actually has not been required to use
CeLog since CE3. (i.e. CE3 required it, CE4 did not)

Sue
sloh@microsoft.com (remove "online" from reply-to address)
http://blogs.msdn.com/ce_base/
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________



Re: Capturing debug messages using CeLog on a release terminal by vicky

vicky
Wed Dec 06 02:14:03 CST 2006

Hey josh

actually I am using wince event logging mechanism..but stuck somewhere
and need your help..

Will you help me out. it will not take much time.



Thanks
(my email id - vicky_dceian@yahoo.com)
vishal

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