<?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>HoppeRx - the cure for your ailing device : kdmp</title><link>http://blogs.msdn.com/hopperx/archive/tags/kdmp/default.aspx</link><description>Tags: kdmp</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Not all Watson dumps are created equal (Watson part II)</title><link>http://blogs.msdn.com/hopperx/archive/2005/10/12/not-all-watson-dumps-are-created-equal-watson-part-ii.aspx</link><pubDate>Wed, 12 Oct 2005 18:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:480132</guid><dc:creator>shende</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/hopperx/comments/480132.aspx</comments><wfw:commentRss>http://blogs.msdn.com/hopperx/commentrss.aspx?PostID=480132</wfw:commentRss><description>&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;The second installment of Watson will focus on the &lt;EM&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;type&lt;/SPAN&gt;&lt;/B&gt;&lt;/EM&gt; of dump created during error reporting. Watson will chose one of the following depending on system settings and resources available – the significant difference between them is size required to process and store the dump. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Many Watson settings are stored in the registry, but the dump size is reserved during OEMInit:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;extern DWORD dwNKDrWatsonSize;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;void OEMInit (void)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dwNKDrWatsonSize = 0x20000&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;Generally, the more memory allocated here the more complete your Watson information will be – but you will be taking memory away from other applications so you need to be sensitive to the tradeoff. It is also worth mentioning that the larger number chosen here could prevent your device from storing a larger number of Watson dumps – sometimes less is more in this case. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=tablediv&gt;
&lt;TABLE class=dtTABLE cellSpacing=0&gt;
&lt;TBODY&gt;
&lt;TR vAlign=top&gt;
&lt;TH width="24%"&gt;&lt;FONT face=Verdana size=2&gt;Type of Dump File&lt;/FONT&gt;&lt;/TH&gt;
&lt;TH width="27%"&gt;&lt;FONT face=Verdana size=2&gt;Size&lt;/FONT&gt;&lt;/TH&gt;
&lt;TH width="49%"&gt;&lt;FONT face=Verdana size=2&gt;Description&lt;/FONT&gt;&lt;/TH&gt;&lt;/TR&gt;
&lt;TR vAlign=top&gt;
&lt;TD width="24%"&gt;&lt;FONT face=Verdana size=2&gt;Context dumps&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="27%"&gt;&lt;FONT face=Verdana size=2&gt;4 KB - 64 KB.&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="49%"&gt;
&lt;UL type=disc&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Information about the crashing system &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Exception that initiated the crash &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Context record of the faulting thread &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Module list, limited to the faulting threads of the owner process &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Thread list, limited to the faulting threads of the owner process &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Callstack of the faulting thread &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;64 bytes of memory above and below the instruction pointer of the faulting thread &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Stack memory dump of the faulting thread, truncated to fit a 64 KB limit &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR vAlign=top&gt;
&lt;TD width="24%"&gt;&lt;FONT face=Verdana size=2&gt;System dumps&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="27%"&gt;&lt;FONT face=Verdana size=2&gt;64 KB - several MB&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="49%"&gt;
&lt;UL type=disc&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;All information in a Context dump &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Callstacks and context records for all threads &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Complete module, process, and thread lists for the entire device &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;2048 bytes of memory above and below the instruction pointer of the faulting thread. &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Global variables for the process that was current at the time of the crash &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR vAlign=top&gt;
&lt;TD width="24%"&gt;&lt;FONT face=Verdana size=2&gt;Complete dumps&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="27%"&gt;&lt;FONT face=Verdana size=2&gt;All physical memory plus at least 64 KB &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="49%"&gt;
&lt;UL type=disc&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;All information in a context dump &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;A complete dump of all used memory &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Again, the PB help under Error Reporting is excellent and should be your official guide in understanding Watson and how it can help you debug stability issues. &lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=480132" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/hopperx/archive/tags/shende/default.aspx">shende</category><category domain="http://blogs.msdn.com/hopperx/archive/tags/Watson/default.aspx">Watson</category><category domain="http://blogs.msdn.com/hopperx/archive/tags/kdmp/default.aspx">kdmp</category></item><item><title>Getting help from the Doctor (Dr Watson that is!)</title><link>http://blogs.msdn.com/hopperx/archive/2005/10/07/getting-help-from-the-doctor-dr-watson-that-is.aspx</link><pubDate>Fri, 07 Oct 2005 20:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:478306</guid><dc:creator>shende</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/hopperx/comments/478306.aspx</comments><wfw:commentRss>http://blogs.msdn.com/hopperx/commentrss.aspx?PostID=478306</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial size=2&gt;You cannot ship a device connected to the debugger so eventually you will have to cut the cord and run your device standalone. Windows mobile ships a pocket version of Dr Watson that can help evaluate application exceptions that occur while in this unconnected state.&amp;nbsp;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;Dr Watson already deals with the heavy lifting of logging the exception and providing a debuggable kernel dump – all you need to do is to get these dump files into your release directory for debugging. The default values I like to change are:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana"&gt;HKEY_Local_Machine\System\ErrorReporting\DumpSettings\DumpDirectory = \&amp;lt;storage card name&amp;gt;\DumpFiles &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana"&gt;HKEY_Local_Machine\System\ErrorReporting\UploadSettings\DontUpload = 1&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial size=2&gt;Changing these settings will write .kdmp files to your storage card and Watson won’t attempt to upload the files to the Watson server. Additionally, the Watson UI will not be displayed – so don’t be surprised if you no longer see the dialog prompting you to report the errors found. By logging to an external storage card, you can simply remove the card after any Hopper run and view the exceptions that occurred on that device – you will need to look carefully since the &lt;I&gt;DumpDirectory&lt;/I&gt; is hidden.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial size=2&gt;There are additional settings you can play with (like &lt;/FONT&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana"&gt;MaxDiskUsage&lt;/SPAN&gt;&lt;/B&gt;&lt;FONT face=Arial size=2&gt; and &lt;/FONT&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana"&gt;MaxLogFiles&lt;/SPAN&gt;&lt;/B&gt;&lt;FONT face=Arial size=2&gt;), but in general the Watson documentation is excellent (search for “Error Reporting”) and won’t need repeating here. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial size=2&gt;Once the kdmp file is in your release directory, it is possible to connect the debugger directly using the PMD (Post Mortem Debugger) available on JetStream for your Windows Mobile partners. The dump provides a snapshot view of the exception including the call stack, disassembly and the register values – basically enough information to solve most program exceptions that may occur on your device.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=478306" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/hopperx/archive/tags/shende/default.aspx">shende</category><category domain="http://blogs.msdn.com/hopperx/archive/tags/Watson/default.aspx">Watson</category><category domain="http://blogs.msdn.com/hopperx/archive/tags/kdmp/default.aspx">kdmp</category></item></channel></rss>