<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Debug messages and debug zones in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/12/18/debug-messages-and-debug-zones-in-windows-ce.aspx</link><description>Posted by Travis Hobrla (thanks to Sue Loh who assisted with many portions of this article) Introduction Debug messages are an excellent supplement to a debugger. They give information about the system’s state, warn about potential failures, and assist</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Debug messages and debug zones in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/12/18/debug-messages-and-debug-zones-in-windows-ce.aspx#1324799</link><pubDate>Tue, 19 Dec 2006 15:55:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1324799</guid><dc:creator>Vuemme</dc:creator><description>&lt;p&gt;I agree about the usefulness of debug zones mostly when you need to debug timing-related issues, in cases when step-by-step debugging can't be used or you need to detect failures in someone else's code (in this case reading the debug messages should be simpler than scrolling across zillions of lines of code!).&lt;/p&gt;
&lt;p&gt;You should be careful about over-using them in debug because they can slow down operation and synchronize threads (since two debug output operation are serialized) &amp;quot;hiding&amp;quot; issues that will happen only in release builds.&lt;/p&gt;
&lt;p&gt;The only thing I don't like about debug zones is that the &amp;quot;module name&amp;quot; is not forced to be the same of the real (exe or dll) module. This is not a big issue if you enable debug zones at runtime but can becama an annoying issue when you need to debug a driver or an application that loads and unloads immediately. In this way you have two choices:&lt;/p&gt;
&lt;p&gt;- if you've got source code you can find the DBGPARAM structure declaration and get the module name from it. But sometimes this declaration is &amp;quot;hidden&amp;quot; in other libraries (for MDD-PDD or layered drivers) and finding it could be a boring process.&lt;/p&gt;
&lt;p&gt;- if you don't have source code of a DLL you may build a dummy application that simply loads the DLL using LoadLibrary. In this way you'll be able to use the debug shell to find the module id (gi mod) and list it's debug information (zo m&amp;lt;ID&amp;gt;) retrieving also the module id that you'll be able to put in the registry to enable zones and see messages during the DLL (or driver) load/unload process.&lt;/p&gt;
&lt;p&gt;If the DLL won't load inside your dummy EXE it may be that the DLL needs other modules that are not inside your OS image on on the executable search path. In this case you may use Dependancy walker to scan the module static dependencies (it's a Win32 tool, but WinCE uses the same PE header format and so that tool works also on CE executables).&lt;/p&gt;
&lt;p&gt;A list of the debug module names of all the system DLLs and EXEs could be a welcomed addition to CE documentation, IMHO.&lt;/p&gt;
&lt;p&gt;Another welcomed addition would be an option in PB-UI that allows you to &amp;quot;filter&amp;quot; debug message by process/thread/module, allowing you to check only the output of specific modules. This could be useful when debugging driver initialization issues because many modules send output during the initialization process and this could made following your own driver messages a bit complex.&lt;/p&gt;
</description></item><item><title>re: Debug messages and debug zones in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/12/18/debug-messages-and-debug-zones-in-windows-ce.aspx#1349729</link><pubDate>Sat, 23 Dec 2006 01:56:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1349729</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;Thanks for the helpful suggestions, I'll follow up with the PB team.&lt;/p&gt;
&lt;p&gt;As far as &amp;quot;module name&amp;quot;, I agree it can be annoying to track down the source sometimes, but unfortunately some .dll's get renamed during the build process, yet the name currently needs to be determined at compile time. &amp;nbsp;So, I don't see any easy solution to this problem.&lt;/p&gt;
</description></item><item><title>Debug Zones: Eliminating Excess Chatter</title><link>http://blogs.msdn.com/ce_base/archive/2006/12/18/debug-messages-and-debug-zones-in-windows-ce.aspx#1889648</link><pubDate>Thu, 15 Mar 2007 23:44:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1889648</guid><dc:creator>Windows CE Base Team Blog</dc:creator><description>&lt;p&gt;Posted by Riki June Last December Travis wrote an entry on Debug Zones, I’d like to follow this up with&lt;/p&gt;
</description></item><item><title>The Video Renderer Connection Process</title><link>http://blogs.msdn.com/ce_base/archive/2006/12/18/debug-messages-and-debug-zones-in-windows-ce.aspx#3252937</link><pubDate>Tue, 12 Jun 2007 19:55:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3252937</guid><dc:creator>Windows CE Multimedia Team Blog</dc:creator><description>&lt;p&gt;The video renderer is the last filter in the video pipe, and it is responsible for displaying the output&lt;/p&gt;
</description></item></channel></rss>