<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-18989586</id><updated>2012-02-06T12:46:25.443+01:00</updated><category term='Windows XP'/><category term='Visual Studio'/><category term='Vista'/><category term='CLR'/><category term='Bugs'/><category term='Releases'/><category term='SOS'/><category term='Found'/><category term='Tools'/><category term='VB6'/><category term='Memory'/><category term='Symbol Server'/><category term='Extensions'/><category term='Tricks'/><category term='Hangs'/><category term='Borland'/><category term='Meta'/><category term='google'/><category term='Books'/><title type='text'>Windbg by Volker von Einem</title><subtitle type='html'>A collection of useful items to deal with windbg.
For me and possibly for others...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18989586.post-2154817919413643810</id><published>2009-12-04T07:54:00.001+01:00</published><updated>2009-12-04T10:04:30.817+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Displaying dynamically allocated c arrays</title><content type='html'>&lt;p&gt;I just analyzed a crash dump were I needed to investigate a dynamically allocated a array.&lt;/p&gt;  &lt;p&gt;We have a declaration:&lt;/p&gt;  &lt;p&gt;CString **ids;&lt;/p&gt;  &lt;p&gt;the allocation&lt;/p&gt;  &lt;p&gt;ids = new CString*[size];&lt;/p&gt;  &lt;p&gt;Given a size of 8 you can dump the content of the string array with dt -a&amp;lt;size&amp;gt; &amp;lt;address&amp;gt; &amp;lt;type&amp;gt;:&lt;/p&gt;  &lt;p&gt;0:000&amp;gt; dv ids   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ids = 0x06314ec0&lt;/p&gt;  &lt;p&gt;0:000&amp;gt; dt -a8 0x06314ec0 CString*    &lt;br /&gt;[0] @ 06314ec0     &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x0633f520     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x062b7d58&amp;#160; &amp;quot;string 1&amp;quot; &lt;/p&gt;  &lt;p&gt;[1] @ 06314ec4    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x062b7278     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x785039c0&amp;#160; &amp;quot;&amp;quot; &lt;/p&gt;  &lt;p&gt;[2] @ 06314ec8    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x0638b8b0     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x06373958&amp;#160; &amp;quot;string 2&amp;quot; &lt;/p&gt;  &lt;p&gt;[3] @ 06314ecc    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x06373b10     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x06301dc8&amp;#160; &amp;quot;string 3&amp;quot; &lt;/p&gt;  &lt;p&gt;[4] @ 06314ed0    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x06338780     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x785039c0&amp;#160; &amp;quot;&amp;quot; &lt;/p&gt;  &lt;p&gt;[5] @ 06314ed4    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x06350a00     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x785039c0&amp;#160; &amp;quot;&amp;quot; &lt;/p&gt;  &lt;p&gt;[6] @ 06314ed8    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x0637e2f8     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x785039c0&amp;#160; &amp;quot;&amp;quot; &lt;/p&gt;  &lt;p&gt;[7] @ 06314edc    &lt;br /&gt;---------------------------------------------     &lt;br /&gt;0x0633f598     &lt;br /&gt;&amp;#160;&amp;#160; +0x000 m_pszData&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 0x785039c0&amp;#160; &amp;quot;&amp;quot; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-2154817919413643810?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/2154817919413643810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=2154817919413643810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2154817919413643810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2154817919413643810'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2009/12/displaying-dynamically-allocated-c.html' title='Displaying dynamically allocated c arrays'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-5678038499812907482</id><published>2009-02-20T22:17:00.001+01:00</published><updated>2009-02-20T22:18:58.176+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Releases'/><title type='text'>Windbg 6.11.1.402 is out</title><content type='html'>&lt;p&gt;There's no support for &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;integrated managed debugging&lt;/a&gt;. Here's the link:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a" href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a"&gt;http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Highlights in Version 6.11.1.402      &lt;br /&gt;The following changes have been made to Debugging Tools for Windows: &lt;/p&gt;    &lt;p&gt;&amp;#8226; Numerous bug fixes and documentation updates      &lt;br /&gt;&amp;#8226; Numerous updates to improve 1394 debugging (see relnotes.txt for details)       &lt;br /&gt;&amp;#8226; support using &amp;#8220;.process /p &amp;#8230;&amp;#8221; in kd -kl, so you can see user mode memory in the appropriate process context (which means user mode stacks, !peb, etc.) &lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-5678038499812907482?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/5678038499812907482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=5678038499812907482' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/5678038499812907482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/5678038499812907482'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2009/02/windbg-6111402-is-out.html' title='Windbg 6.11.1.402 is out'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1750965235691111142</id><published>2009-02-13T11:43:00.001+01:00</published><updated>2009-02-13T11:43:32.442+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hangs'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Another goody: uf /c /D and the peb lock</title><content type='html'>&lt;p&gt;Remember my previous &lt;a href="http://voneinem-windbg.blogspot.com/2009/02/keeping-pearl.html"&gt;post&lt;/a&gt;?&lt;/p&gt;  &lt;p&gt;I was hunting a dead lock and found the good old 6.7.5.0 again worth keeping.&lt;/p&gt;  &lt;p&gt;But I didn't write about the dead lock cause itself. Now here it comes:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The main thread was waiting for the peb lock:&lt;/p&gt;  &lt;p&gt;0:00&amp;gt; ~0 kb    &lt;br /&gt;ChildEBP RetAddr Args to Child     &lt;br /&gt;0012c72c 7c90e9c0 7c91901b 0000056c 00000000 ntdll!KiFastSystemCallRet     &lt;br /&gt;0012c730 7c91901b 0000056c 00000000 00000000 ntdll!ZwWaitForSingleObject+0xc     &lt;br /&gt;0012c7b8 7c90104b 0097e4c0 7c910945 7c97e4c0 ntdll!RtlpWaitForCriticalSection+0x132     &lt;br /&gt;0012c7c0 7c910945 7c97e4c0 ffffffff 00000000 ntdll!RtlEnterCriticalSection+0x46     &lt;br /&gt;0012c800 7c80e2cf ffffffff 7c80e038 00000000 ntdll!RtlAcquirePebLock+0x28     &lt;br /&gt;0012c868 7c80e00d 7c80e038 00020690 00000000 kernel32!BasepComputeProcessPath+0x5f     &lt;br /&gt;0012c8a8 7c801b83 00000000 00000000 0012d7a0 kernel32!BaseComputeProcessDllPath+0xe3     &lt;br /&gt;0012c908 7c801d6e 7ffdfc00 00000000 00000000 kernel32!LoadLibraryExW+0x12f     &lt;br /&gt;0012c91c 7c801da4 06057954 00000000 00000000 kernel32!LoadLibraryExA+0x1f     &lt;br /&gt;0012c938 060b4823 06057954 7c911993 03f41ea8 kernel32!LoadLibraryA+0x94&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This lock was owned by managed thread number 6:&lt;/p&gt;  &lt;p&gt;0:006&amp;gt; k 100   &lt;br /&gt;ChildEBP RetAddr&amp;#160; &lt;br /&gt;0522f33c 7c9141e4 ntdll!RtlGetFullPathName_Ustr+0x653    &lt;br /&gt;0522f364 7c80b86c ntdll!RtlGetFullPathName_U+0x33    &lt;br /&gt;0522f37c 015da1c3 kernel32!GetFullPathNameW+0x1a    &lt;br /&gt;0522f3a4 79364aef CLRStub[StubLinkStub]@15da1c3    &lt;br /&gt;0522f8f0 793644ae mscorlib_ni!System.IO.Path.NormalizePathFast(System.String, Boolean)+0x637    &lt;br /&gt;017d2738 793821b0 mscorlib_ni!System.IO.Path.GetFullPathInternal(System.String)+0x2e    &lt;br /&gt;017d2738 793820f6 mscorlib_ni!System.Security.Util.StringExpressionSet.CanonicalizePath(System.String, Boolean)+0x90    &lt;br /&gt;017d2738 79381dbe mscorlib_ni!System.Security.Util.StringExpressionSet.CreateListFromExpressions(System.String[], Boolean)+0x14a    &lt;br /&gt;017d2738 79381d16 mscorlib_ni!System.Security.Permissions.FileIOPermission.AddPathList(System.Security.Permissions.FileIOPermissionAccess, System.Security.AccessControl.AccessControlActions, System.String[], Boolean, Boolean, Boolean)+0x6a    &lt;br /&gt;0178b9ec 793a2014 mscorlib_ni!System.Security.Permissions.FileIOPermission..ctor(System.Security.Permissions.FileIOPermissionAccess, System.String)+0x42    &lt;br /&gt;0522f978 04189669 mscorlib_ni!System.IO.FileSystemInfo.get_FullName()+0x58    &lt;br /&gt;0177cdbc 041892b2 XYZ.DirectoryCleanup.PopulateAllFilesList(System.Collections.Generic.List`1&amp;lt;System.IO.FileInfo&amp;gt;, System.IO.DirectoryInfo)+0x69     &lt;br /&gt;0522fa00 0418916f XYZ.DirectoryCleanup.CleanupThread()+0xaa     &lt;br /&gt;0522fa30 79407caa XYZ.DirectoryCleanup.CleanupThreadProc(System.Object)+0x67     &lt;br /&gt;0179439c 79373ecd mscorlib_ni!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(System.Object)+0x1a    &lt;br /&gt;0179439c 79407e18 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x81    &lt;br /&gt;0522fa60 79407d90 mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback)+0x50    &lt;br /&gt;1f7814b0 79e7c74b mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(System.Object)+0x60    &lt;br /&gt;0522fa84 79e7c6cc mscorwks!CallDescrWorker+0x33    &lt;br /&gt;0522fb04 79f00eca mscorwks!CallDescrWorkerWithHandler+0xa3    &lt;br /&gt;0522fb24 79f00e75 mscorwks!DispatchCallBody+0x1e    &lt;br /&gt;0522fb88 79f00f03 mscorwks!DispatchCallDebuggerWrapper+0x3d    &lt;br /&gt;0522fbbc 79f6e39d mscorwks!DispatchCallNoEH+0x51    &lt;br /&gt;0522fc1c 79ef3207 mscorwks!QueueUserWorkItemManagedCallback+0x6c    &lt;br /&gt;0522fc30 79ef31a3 mscorwks!Thread::DoADCallBack+0x32a    &lt;br /&gt;0522fcc4 79ef30c3 mscorwks!Thread::ShouldChangeAbortToUnload+0xe3    &lt;br /&gt;0522fd00 79ef4826 mscorwks!Thread::ShouldChangeAbortToUnload+0x30a    &lt;br /&gt;0522fd28 79ef48cf mscorwks!Thread::ShouldChangeAbortToUnload+0x33e    &lt;br /&gt;0522fd40 79f6e2d8 mscorwks!ManagedThreadBase::ThreadPool+0x13    &lt;br /&gt;0522fda8 79f0202a mscorwks!ManagedPerAppDomainTPCount::DispatchWorkItem+0xdb    &lt;br /&gt;0522fdbc 79f021a0 mscorwks!ThreadpoolMgr::ExecuteWorkRequest+0xaf    &lt;br /&gt;0522fe14 79f95a2e mscorwks!ThreadpoolMgr::WorkerThreadStart+0x223    &lt;br /&gt;0522ffb4 7c80b683 mscorwks!Thread::intermediateThreadProc+0x49    &lt;br /&gt;0522ffec 00000000 kernel32!BaseThreadStart+0x37&lt;/p&gt;  &lt;p&gt;Now my question was: Does kernel32!GetFullPathNameW acquire a peb lock?&lt;/p&gt;  &lt;p&gt;The short answer is yes (in Windows XP but not in Vista).&lt;/p&gt;  &lt;p&gt;Here's the easy way to find out with uf /c /D (/D creates linked callee names for navigation of the call graph. Do you can click on the hyperlinks ;-) ):&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;0:006&amp;gt; uf /c /D kernel32!GetFullPathNameW     &lt;br /&gt;kernel32!GetFullPathNameW (7c80b852)      &lt;br /&gt;&amp;#160; kernel32!GetFullPathNameW+0x14 (7c80b866):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0080ff"&gt;&lt;u&gt;call to ntdll!RtlGetFullPathName_U (7c9141b1)         &lt;br /&gt;&lt;/u&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;0:006&amp;gt; uf /c /D 0x7c9141b1       &lt;br /&gt;ntdll!RtlGetFullPathName_U (7c9141b1)        &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_U+0xe (7c9141bf):        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;u&gt;&lt;font color="#0080ff"&gt;call to ntdll!RtlInitUnicodeStringEx (7c9103a5)&lt;/font&gt;&lt;/u&gt;        &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_U+0x2e (7c9141df):        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0080ff"&gt;&lt;u&gt;call to ntdll!RtlGetFullPathName_Ustr (7c913b67)&lt;/u&gt;&lt;/font&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font face="Courier New" color="#000000"&gt;0:006&amp;gt; uf /c /D 0x7c913b67       &lt;br /&gt;ntdll!RtlGetFullPathName_Ustr (7c913b67)        &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0xa (7c913b71):        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;u&gt;&lt;font color="#0080ff"&gt;call to ntdll!_SEH_prolog (7c90edc2)&lt;/font&gt;&lt;/u&gt;        &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0xbe (7c913c19):        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;u&gt;&lt;font color="#0080ff"&gt;call to ntdll!RtlIsDosDeviceName_Ustr (7c9139ed)&lt;/font&gt;&lt;/u&gt;        &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x176 (7c913c59):        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;u&gt;&lt;font color="#0080ff"&gt;call to ntdll!RtlDetermineDosPathNameType_U (7c91399f)&lt;/font&gt;&lt;/u&gt;        &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x180 (7c913c63):        &lt;br /&gt;&lt;strong&gt;&lt;font size="3"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;u&gt;&lt;font color="#0080ff"&gt;call to ntdll!RtlAcquirePebLock (7c91091d) &lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;lt;== Here you go&lt;/font&gt;&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;        &lt;br /&gt;[...]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Doing the same on Vista shows no PebLock&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;0:003&amp;gt; uf /c /D kernel32!GetFullPathNameW     &lt;br /&gt;KERNEL32!GetFullPathNameW (77c60a0e)      &lt;br /&gt;&amp;#160; KERNEL32!GetFullPathNameW+0x14 (77c60a22):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlGetFullPathName_U (77b0ac1f)      &lt;br /&gt;0:003&amp;gt; uf /c /D 0x77b0ac1f      &lt;br /&gt;ntdll!RtlGetFullPathName_U (77b0ac1f)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_U+0xe (77b0ac2d):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlInitUnicodeStringEx (77b09b9f)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_U+0x2e (77b0ac4d):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlGetFullPathName_Ustr (77b0a01f)      &lt;br /&gt;0:003&amp;gt; uf /c /D 0x77b0a01f      &lt;br /&gt;ntdll!RtlGetFullPathName_Ustr (77b0a01f)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x270 (77aaa47d):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpReferenceCurrentDirectory (77b0aed5)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x2a3 (77aaa497):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpComputeBackupIndex (77b0af83)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x2f9 (77ab0340):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpReferenceCurrentDirectory (77b0aed5)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x32b (77ab0366):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlUpcaseUnicodeChar (77ae0db2)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x339 (77ab0374):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlUpcaseUnicodeChar (77ae0db2)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x366 (77ab0386):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpCheckRelativeDrive (77ab040c)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x38c (77ab03ac):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlInitUnicodeString (77ae7e70)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x3a9 (77ab03c9):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlQueryEnvironmentVariable_U (77ad4c19)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x11e (77ad8154):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!memmove (77ae8d80)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x7 (77b0a026):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!_SEH_prolog4_GS (77b08f60)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0xb0 (77b0a0c3):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlIsDosDeviceName_Ustr (77b09bf1)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x15e (77b0a0e7):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!memset (77ae90c0)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x16a (77b0a0f3):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlDetermineDosPathNameType_Ustr (77b08ed3)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x83e (77b0a27d):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlGetFullPathName_Ustr+0x84b (77b0a292)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x141 (77b0a285):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!_SEH_epilog4_GS (77b08fa8)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x21b (77b0ae76):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpReferenceCurrentDirectory (77b0aed5)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x261 (77b0aea0):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpComputeBackupIndex (77b0af83)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0xe9 (77b10822):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlpCheckDeviceName (77b2cf1c)      &lt;br /&gt;&amp;#160; ntdll!RtlGetFullPathName_Ustr+0x3f2 (77b1093d):      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; call to ntdll!RtlInitUnicodeString (77ae7e70)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Many guys are offending Vista for this and that (mainly UAC stuff which sometimes really sucks) but for me this is another prove that Vista behaves more stable than previous Windows versions.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1750965235691111142?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1750965235691111142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1750965235691111142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1750965235691111142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1750965235691111142'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2009/02/another-goody-uf-c-d-and-peb-lock.html' title='Another goody: uf /c /D and the peb lock'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-2278609588268760696</id><published>2009-02-12T11:45:00.002+01:00</published><updated>2009-02-13T09:21:12.711+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hangs'/><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><category scheme='http://www.blogger.com/atom/ns#' term='Releases'/><title type='text'>Keeping the Pearl</title><content type='html'>&lt;p&gt;I recently get a memory dump of a hanging process. So I opened it with &lt;a href="http://voneinem-windbg.blogspot.com/2008/11/windbg-version-6103233-is-out-i-still.html"&gt;windbg 6.10.3.233&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The main thread was looking like this:&lt;/p&gt;  &lt;p style="font-family: courier new;"&gt;0:00&amp;gt; ~0 kb  &lt;br /&gt;ChildEBP RetAddr  Args to Child           &lt;br /&gt;0012c72c 7c90e9c0 7c91901b 0000056c 00000000 ntdll!KiFastSystemCallRet   &lt;br /&gt;0012c730 7c91901b 0000056c 00000000 00000000 ntdll!ZwWaitForSingleObject+0xc   &lt;br /&gt;0012c7b8 7c90104b 0097e4c0 7c910945 7c97e4c0 ntdll!RtlpWaitForCriticalSection+0x132   &lt;br /&gt;0012c7c0 7c910945 7c97e4c0 ffffffff 00000000 ntdll!RtlEnterCriticalSection+0x46   &lt;br /&gt;0012c800 7c80e2cf ffffffff 7c80e038 00000000 ntdll!RtlAcquirePebLock+0x28   &lt;br /&gt;0012c868 7c80e00d 7c80e038 00020690 00000000 kernel32!BasepComputeProcessPath+0x5f   &lt;br /&gt;0012c8a8 7c801b83 00000000 00000000 0012d7a0 kernel32!BaseComputeProcessDllPath+0xe3   &lt;br /&gt;0012c908 7c801d6e 7ffdfc00 00000000 00000000 kernel32!LoadLibraryExW+0x12f   &lt;br /&gt;0012c91c 7c801da4 06057954 00000000 00000000 kernel32!LoadLibraryExA+0x1f   &lt;br /&gt;0012c938 060b4823 06057954 7c911993 03f41ea8 kernel32!LoadLibraryA+0x94&lt;/p&gt;  &lt;p style="font-family: courier new;"&gt;Sieextpub's very usefull !critlist extension showed me were whose holding the critical section:&lt;/p&gt;  &lt;p style="font-family: courier new;"&gt;0:000&amp;gt; !critlist  &lt;br /&gt;CritSec at 7c97e4c0.  Owned by thread 6.&lt;br /&gt;Waiting Threads: 0 21    &lt;br /&gt;CritSec at 7c97c0d8.  Owned by thread 21.&lt;br /&gt;Waiting Threads: 22 &lt;/p&gt;  &lt;p&gt;SOS!Threads told me that it's a managed thread from the thread pool:&lt;/p&gt;  &lt;p style="font-family: courier new;"&gt;0:006&amp;gt; !Threads  &lt;br /&gt;ThreadCount: 5   &lt;br /&gt;UnstartedThread: 0   &lt;br /&gt;BackgroundThread: 5   &lt;br /&gt;PendingThread: 0   &lt;br /&gt;DeadThread: 0   &lt;br /&gt;Hosted Runtime: no   &lt;br /&gt;                                    PreEmptive   GC Alloc           Lock   &lt;br /&gt;     ID OSID ThreadOBJ    State     GC       Context       Domain   Count APT Exception   &lt;br /&gt; 0    1  ea4 001886e0      4220 Enabled  00000000:00000000 0019c7b8     1 STA System.Runtime.InteropServices.SEHException (0177d128)   &lt;br /&gt; 2    2  2c0 001a6210      b220 Enabled  00000000:00000000 0019c7b8     0 MTA (Finalizer)   &lt;br /&gt; 3    3  d7c 001efbd0    80a220 Enabled  00000000:00000000 0019c7b8     0 MTA (Threadpool Completion Port)   &lt;br /&gt; 4    4  894 00223760   880b220 Enabled  00000000:00000000 0019c7b8     0 MTA (Threadpool Completion Port)   &lt;br /&gt; 6    5  650 00224310   180b220 Enabled  017d2770:017d4608 0019c7b8     0 MTA (Threadpool Worker)&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Terminal;"&gt;Now I wanted to get the Stack Dump for thread number 6:&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;  &lt;p style="font-family: courier new;"&gt;0:006&amp;gt; !CLRStack  &lt;br /&gt;OS Thread Id: 0x650 (6)   &lt;br /&gt;ESP       EIP  &lt;br /&gt;0522f3bc 7c913da4 [NDirectMethodFrameStandalone: 0522f3bc]    &lt;br /&gt;0522f3d4 79364aef    &lt;br /&gt;0522f8f8 793644ae    &lt;br /&gt;0522f900 793821b0    &lt;br /&gt;0522f90c 793820f6    &lt;br /&gt;0522f928 79381dbe    &lt;br /&gt;0522f950 79381d16    &lt;br /&gt;0522f968 793a2014    &lt;br /&gt;0522f980 04189669    &lt;br /&gt;0522f9a0 041892b2    &lt;br /&gt;0522fa08 0418916f    &lt;br /&gt;0522fa38 79407caa    &lt;br /&gt;0522fa3c 79373ecd    &lt;br /&gt;0522fa54 79407e18    &lt;br /&gt;0522fa68 79407d90    &lt;br /&gt;0522fbf8 79e7c74b [GCFrame: 0522fbf8] &lt;/p&gt;    &lt;p&gt;Oops? OK - sometimes !DumpStack does a better job:&lt;/p&gt;  &lt;p style="font-family: courier new;"&gt;0:006&amp;gt; !DumpStack  &lt;br /&gt;OS Thread Id: 0x650 (6)   &lt;br /&gt;Current frame: ntdll!RtlGetFullPathName_Ustr+0x653   &lt;br /&gt;ChildEBP RetAddr  Caller,Callee   &lt;br /&gt;0522f2d0 79e75002 mscorwks!FrameWithCookie&amp;lt;HelperMethodFrame&amp;gt;::FrameWithCookie&amp;lt;HelperMethodFrame&amp;gt;+0x1e, calling mscorwks!HelperMethodFrame::HelperMethodFrame   &lt;br /&gt;0522f318 7c91056d ntdll!RtlFreeHeap+0x647, calling ntdll!_SEH_epilog   &lt;br /&gt;0522f33c 7c9141e4 ntdll!RtlGetFullPathName_U+0x33, calling ntdll!RtlGetFullPathName_Ustr   &lt;br /&gt;0522f364 7c80b86c kernel32!GetFullPathNameW+0x1a, calling ntdll!RtlGetFullPathName_U   &lt;br /&gt;0522f37c 015da1c3 015da1c3   &lt;br /&gt;0522f3a4 79364aef 79364aef, calling 796c00cc   &lt;br /&gt;0522f3c4 79364aef 79364aef, calling 796c00cc   &lt;br /&gt;0522f8f0 793644ae 793644ae, calling 793644b8   &lt;br /&gt;0522f8f8 793821b0 793821b0, calling 79364480   &lt;br /&gt;0522f904 793820f6 793820f6, calling 79382120   &lt;br /&gt;0522f920 79381dbe 79381dbe, calling 79381fac   &lt;br /&gt;0522f934 79381d16 79381d16, calling 79381d54   &lt;br /&gt;0522f95c 793a2014 793a2014, calling 79381cd4   &lt;br /&gt;0522f978 04189669 04189669   &lt;br /&gt;0522f994 041892b2 041892b2, calling 04189600   &lt;br /&gt;0522fa00 0418916f 0418916f, calling 04189208   &lt;br /&gt;0522fa30 79407caa 79407caa   &lt;br /&gt;0522fa34 79373ecd 79373ecd   &lt;br /&gt;0522fa48 79407e18 79407e18, calling 79373e4c   &lt;br /&gt;0522fa60 79407d90 79407d90, calling 79407dc8   &lt;br /&gt;0522fa74 79e7c74b mscorwks!CallDescrWorker+0x33   &lt;br /&gt;0522fa84 79e7c6cc mscorwks!CallDescrWorkerWithHandler+0xa3, calling mscorwks!CallDescrWorker   &lt;br /&gt;0522fb04 79f00eca mscorwks!DispatchCallBody+0x1e, calling mscorwks!CallDescrWorkerWithHandler   &lt;br /&gt;0522fb24 79f00e75 mscorwks!DispatchCallDebuggerWrapper+0x3d, calling mscorwks!DispatchCallBody   &lt;br /&gt;0522fb88 79f00f03 mscorwks!DispatchCallNoEH+0x51, calling mscorwks!DispatchCallDebuggerWrapper   &lt;br /&gt;0522fbbc 79f6e39d mscorwks!QueueUserWorkItemManagedCallback+0x6c, calling mscorwks!DispatchCallNoEH   &lt;br /&gt;0522fc1c 79ef3207 mscorwks!Thread::DoADCallBack+0x32a   &lt;br /&gt;0522fc30 79ef31a3 mscorwks!Thread::ShouldChangeAbortToUnload+0xe3, calling mscorwks!Thread::DoADCallBack+0x2db   &lt;br /&gt;0522fc58 79e744d0 mscorwks!Thread::EnterRuntimeNoThrow+0x94, calling ntdll!RtlSetLastWin32Error   &lt;br /&gt;0522fc5c 79e744d7 mscorwks!Thread::EnterRuntimeNoThrow+0x9b, calling mscorwks!_EH_epilog3   &lt;br /&gt;0522fcc4 79ef30c3 mscorwks!Thread::ShouldChangeAbortToUnload+0x30a, calling mscorwks!Thread::ShouldChangeAbortToUnload+0x32   &lt;br /&gt;0522fd00 79ef4826 mscorwks!Thread::ShouldChangeAbortToUnload+0x33e, calling mscorwks!Thread::ShouldChangeAbortToUnload+0x29d   &lt;br /&gt;0522fd28 79ef48cf mscorwks!ManagedThreadBase::ThreadPool+0x13, calling mscorwks!Thread::ShouldChangeAbortToUnload+0x319   &lt;br /&gt;0522fd40 79f6e2d8 mscorwks!ManagedPerAppDomainTPCount::DispatchWorkItem+0xdb, calling mscorwks!ManagedThreadBase::ThreadPool   &lt;br /&gt;0522fd94 79f022c7 mscorwks!PerAppDomainTPCountList::GetAppDomainIndexForThreadpoolDispatch+0x35   &lt;br /&gt;0522fda8 79f0202a mscorwks!ThreadpoolMgr::ExecuteWorkRequest+0xaf   &lt;br /&gt;0522fdbc 79f021a0 mscorwks!ThreadpoolMgr::WorkerThreadStart+0x223, calling mscorwks!ThreadpoolMgr::ExecuteWorkRequest   &lt;br /&gt;0522fe14 79f95a2e mscorwks!Thread::intermediateThreadProc+0x49   &lt;br /&gt;0522ffa0 79f95a1c mscorwks!Thread::intermediateThreadProc+0x37, calling mscorwks!_alloca_probe_16   &lt;br /&gt;0522ffb4 7c80b683 kernel32!BaseThreadStart+0x37&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Not really better, eh?&lt;/p&gt;  &lt;p&gt;So I launched my &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;good old 6.7.5.0&lt;/a&gt; (which lives side by side with the latest windbg on my machine - thanks to xcopy) and surprise:&lt;/p&gt;  &lt;p&gt;[click image to enlarge]&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_Lghuvt1vgPY/SZP9syqgDYI/AAAAAAAAAHU/KwwKuWsglJg/s1600-h/6750thePearcl%5B7%5D.png"&gt;&lt;img style="border: 0px none ;" alt="6750thePearcl" src="http://lh4.ggpht.com/_Lghuvt1vgPY/SZP9trr6hXI/AAAAAAAAAHY/1PxxyNA6IWc/6750thePearcl_thumb%5B5%5D.png?imgmax=800" width="644" border="0" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The call stack window did a wonderful job and I even got pointed to the corresponding source code.&lt;/p&gt;  &lt;p&gt;As it is the same sos, a !DumpStack did not do the job in 6.7.5.0 either.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;So please Microsoft, give us back the this very very helpful feature of 6.7.5.0!&lt;br /&gt;Or at least make SOS working like the stack window of 6.7.5.0.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-2278609588268760696?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/2278609588268760696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=2278609588268760696' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2278609588268760696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2278609588268760696'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2009/02/keeping-pearl.html' title='Keeping the Pearl'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_Lghuvt1vgPY/SZP9trr6hXI/AAAAAAAAAHY/1PxxyNA6IWc/s72-c/6750thePearcl_thumb%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-3578482258979918002</id><published>2009-02-10T08:41:00.001+01:00</published><updated>2009-02-10T08:41:46.697+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Article about Remote Debugging</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/ntdebugging/archive/tags/Mark/default.aspx"&gt;Mark?&lt;/a&gt; has published a very good &lt;a href="http://blogs.msdn.com/ntdebugging/archive/2009/02/09/remote-debugging-connecting-to-a-remote-stub-using-the-microsoft-debugging-tools-for-windows.aspx"&gt;article about Remote Debugging&lt;/a&gt; on the &lt;a href="http://blogs.msdn.com/ntdebugging/"&gt;Microsoft Advanced Windows Debugging and Troubleshooting Blog&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-3578482258979918002?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/3578482258979918002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=3578482258979918002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3578482258979918002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3578482258979918002'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2009/02/article-about-remote-debugging.html' title='Article about Remote Debugging'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-7929414729465237102</id><published>2008-12-18T14:50:00.002+01:00</published><updated>2008-12-19T06:15:18.606+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Symbol Server'/><title type='text'>Symbol Server Performance Improvement</title><content type='html'>&lt;p&gt;Once you've fallen in love with your own symbol server you might discover bad performance the bigger the symbol store grows.   &lt;br /&gt;We've recently moved our private symbol server onto a new server and found in the symhttp.doc the following:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Normally files are placed in a symbol store with a single tier directory structure in which a single subdirectory exists to store all versions of a certain filename. Such a tree may look like this&lt;/p&gt;    &lt;p&gt;c:\symstore\ntdll.dll\&lt;/p&gt;    &lt;p&gt;c:\symstore\ntdll.pdb\&lt;/p&gt;    &lt;p&gt;c:\symstore\kernel32.dll\&lt;/p&gt;    &lt;p&gt;c:\symstore\kernel32.pdb\&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;However if you are going to store a massive amount of filenames, you may prefer to use the two-tier structure. To do this, place a file called &lt;i&gt;index2.txt&lt;/i&gt; in the root of &lt;i&gt;c:\symstore&lt;/i&gt;&lt;/span&gt;&lt;/strong&gt;. The contents of the file are of no importance. This would result in a tree that looks like this&lt;/p&gt;    &lt;p&gt;c:\symstore\&lt;b&gt;nt&lt;/b&gt;\ntdll.dll\&lt;/p&gt;    &lt;p&gt;c:\symstore\&lt;b&gt;nt&lt;/b&gt;\ntdll.pdb\&lt;/p&gt;    &lt;p&gt;c:\symstore\&lt;b&gt;ke&lt;/b&gt;\kernel32.dll\&lt;/p&gt;    &lt;p&gt;c:\symstore\&lt;b&gt;ke&lt;/b&gt;\kernel32.pdb\&lt;/p&gt;    &lt;p&gt;The added layer of directories allows you to use DFS or directory junctions to manage and split up your files.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Putting the empty index2.txt in the root is not really a task to mention, but what happens to all the files you have added over time?  &lt;br /&gt;As a software developer I tend to do things the lazy way. So rerunning symstore on the old configurations is something for those having killed father and mother.    &lt;br /&gt;Thanks to the power of &lt;a href="http://en.wikipedia.org/wiki/Language_Integrated_Query"&gt;LINQ&lt;/a&gt; and &lt;a href="http://code.google.com/p/nconsoler/"&gt;NConsoler&lt;/a&gt; I could write a handy &lt;a href="http://vve.gmxhome.de/docs/MigrateSymbolStoreToIndex.zip"&gt;tool&lt;/a&gt; in minutes that does the migration stuff for me (and you).&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_Lghuvt1vgPY/SUpVFejfLII/AAAAAAAAAG0/aQJLBLk3U_Q/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border: 0px none ;" alt="image" src="http://lh5.ggpht.com/_Lghuvt1vgPY/SUpVG3X3WzI/AAAAAAAAAG4/AUsLBsWblcU/image_thumb%5B3%5D.png?imgmax=800" border="0" height="318" width="644" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Lay back and feel the speed ;-)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;[Please backup the symbol store before migration - I give no warranty!]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-7929414729465237102?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/7929414729465237102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=7929414729465237102' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7929414729465237102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7929414729465237102'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/12/symbol-server-performance-improvement.html' title='Symbol Server Performance Improvement'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_Lghuvt1vgPY/SUpVG3X3WzI/AAAAAAAAAG4/AUsLBsWblcU/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-7510854582198528721</id><published>2008-11-24T16:23:00.001+01:00</published><updated>2008-11-25T09:31:18.688+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Releases'/><title type='text'>Windbg version 6.10.3.233 is out (I'm still keeping 6.7.5.0)</title><content type='html'>&lt;p&gt;As some blogs (&lt;a href="http://shellexecute.wordpress.com/2008/11/23/windbg-new-release-6103233/"&gt;here&lt;/a&gt; and &lt;a href="http://www.dumpanalysis.org/blog/index.php/2008/11/24/windbg-release-6103233/"&gt;here&lt;/a&gt;) already published there is a new version of windbg 6.10.3.233 out:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_Lghuvt1vgPY/SSrG-DnY6CI/AAAAAAAAAFs/4s-UmWz_gLk/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="125" alt="image" src="http://lh4.ggpht.com/_Lghuvt1vgPY/SSrG-3_GHaI/AAAAAAAAAFw/po7DOCwvU74/image_thumb.png?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here's the direct download &lt;a href="http://msdl.microsoft.com/download/symbols/debuggers/dbg_x86_6.10.3.233.msi"&gt;link&lt;/a&gt;. Unfortunately there's still no inherent &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;managed debugging support as we had with 6.7.5.0&lt;/a&gt; so I'll keep this version (until the end of days?)...&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;UPDATE&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Pat Styles &lt;/font&gt;&lt;/strong&gt;&lt;a href="http://groups.google.com/group/microsoft.public.windbg/browse_thread/thread/03530a0643372f66#"&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;explains&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt; in the &lt;/font&gt;&lt;/strong&gt;&lt;a href="http://groups.google.com/group/microsoft.public.windbg/topics"&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;windbg newsgroup&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt; the background why this managed debugging feature made it's way in public and why it has been taken way very soon.       &lt;br /&gt;So sad it is: likely there&amp;#160; will be NO managed debugging support for windbg in the future. So be happy if you kept your 6.7.5.0 and make an extra backup!&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As &lt;a href="http://voneinem-windbg.blogspot.com/2007/10/windbg-version-6840-is-out-im-still.html"&gt;last time&lt;/a&gt; the highlights are very roughly described so I pasting the full list of relnotes.txt here for googles convenience ;-)&lt;/p&gt;  &lt;p&gt;I marked the features I very personally like in &lt;font color="#00ff00"&gt;green&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Important changes in WinDbg 6.10: &lt;/p&gt;  &lt;p&gt;&amp;#160; * CE6 dump processing now works.    &lt;br /&gt;&amp;#160; * NT4 no longer supported.     &lt;br /&gt;&amp;#160; * Enable installation of the USB debug driver on 64bit versions of Windows.     &lt;br /&gt;&amp;#160; * Install USBView.exe as part of the debugger package.     &lt;br /&gt;&amp;#160; * Enable use of any 1394 cards in target machines.     &lt;br /&gt;&amp;#160; * Improve 1394 debug driver reliability, responsiveness and performance.     &lt;br /&gt;&amp;#160; * Improve error messages for specific 1394 driver installation failures.     &lt;br /&gt;&amp;#160; * Prevent loss of 1394 debug connections after host sleep or hibernate.     &lt;br /&gt;&amp;#160; * Change the 1394 debug driver to write every sent packet to the target     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; regardless of whether the previously sent packet was acknowleged.     &lt;br /&gt;&amp;#160; * Ensure the installed 1394 debug driver is new enough to work properly with     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; the current release of the debugger.&amp;#160; (Update the 1394 driver to the     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; version shipped in this debugger package.)     &lt;br /&gt;&amp;#160; * Automatically reconnect to broken in target machines when doing 1394     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; kernel debugging.     &lt;br /&gt;&lt;font color="#00ff00"&gt;&amp;#160; * Introduce new &amp;quot;.dump /mA ...&amp;quot; option to generate user-mode minidump.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; The new behaiour is the same as &amp;quot;.dump /ma&amp;quot; except that it will ignore       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; inacessable memory read failure and continue minidump generation,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; instead of bailing out immediately. &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&amp;gt;I've seen this behavior quite often - so thank's for that!&amp;lt;&amp;lt;&lt;/font&gt;     &lt;br /&gt;&amp;#160; * Add CHK/FRE information in user-mode minidump. Only dumps generated from     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; the new debugger will carry this information.     &lt;br /&gt;&amp;#160; * Include breakpoint exception in user-mode minidump when the dump is     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; generated after a breakpoint hits. This enables debugger to show the     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; current process/thread information when debugging a dump file.     &lt;br /&gt;&amp;#160; * Fix debugger hang when writing lsass dump files.     &lt;br /&gt;&amp;#160; * Fix debugging of WOW64 minidumps containing managed code.     &lt;br /&gt;&amp;#160; * Force the WOW64 extension to convert contexts as appropriate.     &lt;br /&gt;&amp;#160; * Don't sign extend addresses of 32 bit user mode processes in the 64 bit     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; debugger.     &lt;br /&gt;&amp;#160; * Set 64bit debugger as the postmortem debugger for WOW64 applications.     &lt;br /&gt;&amp;#160; * Disable adding user-mode breakpoints in kd when KdIgnoreUmException is set.     &lt;br /&gt;&amp;#160; * Fix escape character (&amp;quot;\&amp;quot;) parsing problem in the bl command.     &lt;br /&gt;&amp;#160; * Force bu breakpoint removal for unloaded modules.     &lt;br /&gt;&amp;#160; * Add automatic IPv6 detection to the &amp;quot;-remote tcp:...&amp;quot; remote protocol.     &lt;br /&gt;&amp;#160; * Fix .sleep to work when -ddefer is used.     &lt;br /&gt;&amp;#160; * Fix .tlist command     &lt;br /&gt;&amp;#160; * Performance improvements to windbg and other debuggers.     &lt;br /&gt;&amp;#160; * Notify users when workspace corruption is detected.     &lt;br /&gt;&amp;#160; * Fix the infinite recursion with corrupt workspaces in windbg.     &lt;br /&gt;&amp;#160; * Report the correct processor family values in !cpuid for all processors.     &lt;br /&gt;&amp;#160; * Attempt to breakin only once per ctrl-c, ctrl-break instead of spinning     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; in a loop on packet write failure.     &lt;br /&gt;&amp;#160; * Print the target computername in the debugger vertarget output when symbol     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; information is available.     &lt;br /&gt;&lt;font color="#00ff00"&gt;&amp;#160; * Tell debugger users how to break out of symbol loading, if it does not      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; complete within a reasonable amount of time.       &lt;br /&gt;&lt;/font&gt;&amp;#160; * Display source server spew state when .srcnoisy is run. Also display the     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; source server only output filter state.     &lt;br /&gt;&amp;#160; * Workaround for Vista/DWM unpainted captions.     &lt;br /&gt;&amp;#160; * Add host debugger time when remote kernel target boots and shuts down.     &lt;br /&gt;&amp;#160; * Symstore: don't truncate long file names when compressing files.     &lt;br /&gt;&amp;#160; * Symchk: Add recursive symbol search option (&amp;quot;/sr&amp;quot;) to force SymChk to     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; recursively search (non-symbol server) symbol paths for matching symbols.     &lt;br /&gt;&amp;#160; * Add support in symsrv for getting file pointers from an http store and     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; using them as is without caching them to the default downstream store.     &lt;br /&gt;&amp;#160; * Agestore tool should not run on computers that do not update the     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; last-access-time on files.     &lt;br /&gt;&lt;font color="#00ff00"&gt;&amp;#160; * Many !analyze improvements.      &lt;br /&gt;&amp;#160; * Extensive debugger documentation updates.&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-7510854582198528721?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/7510854582198528721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=7510854582198528721' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7510854582198528721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7510854582198528721'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/11/windbg-version-6103233-is-out-i-still.html' title='Windbg version 6.10.3.233 is out (I&amp;#39;m still keeping 6.7.5.0)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_Lghuvt1vgPY/SSrG-3_GHaI/AAAAAAAAAFw/po7DOCwvU74/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-8493719658214817932</id><published>2008-10-07T09:05:00.001+02:00</published><updated>2008-10-07T09:05:20.740+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to modify memory of a running process</title><content type='html'>&lt;p&gt;Kahled &lt;a href="http://voneinem-windbg.blogspot.com/2007/06/scan-full-process-memory-for-pattern.html?showComment=1223334000000#c246344058147996839"&gt;asked&lt;/a&gt; me how to modify memory at a certain addess.&lt;/p&gt;  &lt;p&gt;So here we go...&lt;/p&gt;  &lt;p&gt;Launch notepad and type &amp;quot;hallo&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/VolkerVonEinem/SOsKKhSGEOI/AAAAAAAAAFc/hIo7OpUkGvE/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="127" alt="image" src="http://lh5.ggpht.com/VolkerVonEinem/SOsKLBuVS-I/AAAAAAAAAFg/W_-nklopE9U/image_thumb.png?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now attach windbg to it and search for the &amp;quot;hallo&amp;quot; string using the &lt;a href="http://voneinem-windbg.blogspot.com/2007/06/scan-full-process-memory-for-pattern.html"&gt;scan memory pattern&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;0:001&amp;gt; s -u 0x00000000 L?0xffffffff &amp;quot;hallo&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;00184958&lt;/font&gt;&amp;#160; 0068 0061 006c 006c 006f 0000 0000 0000&amp;#160; h.a.l.l.o.......&lt;/p&gt;  &lt;p&gt;You can now modify the string at memory location &lt;font color="#ff0000"&gt;00184958&lt;/font&gt; with the &lt;a href="http://msdn.microsoft.com/en-us/library/cc266701.aspx"&gt;e (Enter Values) command&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;0:001&amp;gt; eu &lt;font color="#ff0000"&gt;00184958&lt;/font&gt; &amp;quot;hello&amp;quot;&lt;/p&gt;  &lt;p&gt;You will see after letting the process run again (g) that the german &amp;quot;hallo&amp;quot; switched to an english &amp;quot;hello&amp;quot;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/VolkerVonEinem/SOsKLsHjfuI/AAAAAAAAAFk/7rJb0jJaxKY/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="152" alt="image" src="http://lh6.ggpht.com/VolkerVonEinem/SOsKMNN2yRI/AAAAAAAAAFo/0uf7A5MN38Y/image_thumb%5B8%5D.png?imgmax=800" width="632" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-8493719658214817932?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/8493719658214817932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=8493719658214817932' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8493719658214817932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8493719658214817932'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/10/how-to-modify-memory-of-running-process.html' title='How to modify memory of a running process'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/VolkerVonEinem/SOsKLBuVS-I/AAAAAAAAAFg/W_-nklopE9U/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-2332844975007247347</id><published>2008-09-17T10:44:00.001+02:00</published><updated>2008-09-17T15:51:00.690+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Amazing helper .cmdtree</title><content type='html'>&lt;p&gt;In &lt;a href="http://blogs.msdn.com/debuggingtoolbox/about.aspx"&gt;Roberto Farah's&lt;/a&gt; most recent &lt;a href="http://blogs.msdn.com/debuggingtoolbox/archive/2008/09/17/special-command-execute-commands-from-a-customized-user-interface-with-cmdtree.aspx"&gt;post&lt;/a&gt; he mentions the command .cmdtree which is available since version 6.6.7.5.     &lt;br /&gt;The result looks amazing and makes debugging with windbg a lot more productive and it makes it much more useful for especially for newbies:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/VolkerVonEinem/SNDDUryVr4I/AAAAAAAAAFU/GweP5C3QQcI/s1600-h/image%5B22%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="688" alt="image" src="http://lh6.ggpht.com/VolkerVonEinem/SNDDWLtBwpI/AAAAAAAAAFY/HJFgnmpVHIw/image_thumb%5B20%5D.png?imgmax=800" width="684" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I've put the &lt;a href="http://vve.gmxhome.de/docs/CMDTREE.TXT"&gt;text file&lt;/a&gt; proposed by Roberto on my public share for your (and my) convenience and added some stuff, that I found to be useful...     &lt;br /&gt;Currently I don't know how to put comments into this file format.     &lt;br /&gt;If anyone can tell me I would like to add a tribute notice into the text.&lt;/p&gt;  &lt;p&gt;PS: Unfortunately I was not able to set the command .cmdtree CMDTREE.TXT as initial command via -c switch in&amp;#160; [HKEY_CLASSES_ROOT\WinDbg.DumpFile.1\shell\Open\command]. For some reasons windbg doesn't find the file via startup command. Any advice on how to achieve this is welcome.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-2332844975007247347?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/2332844975007247347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=2332844975007247347' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2332844975007247347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2332844975007247347'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/09/amazing-helper-cmdtree.html' title='Amazing helper .cmdtree'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/VolkerVonEinem/SNDDWLtBwpI/AAAAAAAAAFY/HJFgnmpVHIw/s72-c/image_thumb%5B20%5D.png?imgmax=800' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-3400408607886432604</id><published>2008-09-11T09:29:00.001+02:00</published><updated>2008-09-11T09:29:22.066+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>Interview with Mario Hewardt and Daniel Pravat on Channel9</title><content type='html'>&lt;p&gt;The authors of the excellent &lt;a href="http://advancedwindowsdebugging.com/"&gt;book Advanced Windows Debugging&lt;/a&gt; &lt;a href="http://advancedwindowsdebugging.com/portal/portal_m_blog.htm"&gt;Mario Hewardt&lt;/a&gt; and &lt;a href="http://www.advancedwindowsdebugging.com/forums/blogs/daniel/default.aspx"&gt;Daniel Pravat&lt;/a&gt; are &lt;a href="http://channel9.msdn.com/posts/Charles/Advanced-Windows-Debugging-An-Introduction/"&gt;talking&lt;/a&gt; about debugging windows and the drivers to write the book on &lt;a href="http://channel9.msdn.com"&gt;Channel9&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The book is great and should be in the book shelf of every windows developer, because it describes a structured way of doing common windows debugging tasks. As the authors state, an important reason for writing this book was the fact, that there was no such resource available.&lt;/p&gt;  &lt;p&gt;There's a lot talking about debugging threading issues which is sometimes really hard stuff. Looking at the fact that modern computers have more and more cores, writing, understanding and debugging multithreaded code will become more and more important.&lt;/p&gt;  &lt;p&gt;One might argue that in times of managed code unmanaged debugging is out of date. Mario and Daniel explain in this interview that understanding the details behind the scenes is essential for doing efficient debugging. You have to understand the basics on how the CLR works and the CLR is written in unmanaged code.&lt;/p&gt;  &lt;p&gt;(If you interesting in more debugging of managed code I strongly recommend &lt;a href="http://www.wintellect.com/BookInformation.aspx?ASIN=0735622027"&gt;Debugging Microsoft .NET 2.0 Applications&lt;/a&gt; by &lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/default.aspx"&gt;John Robbins&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;At the end of the interview they do a little live debugging on a program producing resource leaks... nice.    &lt;br /&gt;(I've been looking into code analysis tools in the last couple of weeks and I bet the resource leak would have been found by some of those tools without running the program a single time. But it's just for demo and the best code analysis tools will leave enough bugs in your code that will push you in front of the debugger)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-3400408607886432604?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/3400408607886432604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=3400408607886432604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3400408607886432604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3400408607886432604'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/09/interview-with-mario-hewardt-and-daniel.html' title='Interview with Mario Hewardt and Daniel Pravat on Channel9'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-5865471132245286587</id><published>2008-05-30T15:00:00.003+02:00</published><updated>2009-03-30T12:30:45.921+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Debugging reference count leaks</title><content type='html'>&lt;p&gt;One of the hardest things is debugging a reference count leak. &lt;a href="http://msdn.microsoft.com/en-us/library/ms680573%28VS.85%29.aspx"&gt;COM&lt;/a&gt; objects lifetime depends on the reference count (read &lt;a href="http://msdn.microsoft.com/en-us/library/ms687260%28VS.85%29.aspx"&gt;here&lt;/a&gt; for more...). So each client of a COM object must call &lt;a href="http://msdn.microsoft.com/en-us/library/ms691379.aspx"&gt;AddRef&lt;/a&gt; on the &lt;a href="http://msdn.microsoft.com/en-us/library/ms680509%28VS.85%29.aspx"&gt;IUnknown&lt;/a&gt; interface when going to use it and it must call &lt;a href="http://msdn.microsoft.com/en-us/library/ms682317%28VS.85%29.aspx"&gt;Release&lt;/a&gt; when done. If any client (and there might be many many of a single one) violates this rule you get into severe trouble. &lt;/p&gt;  &lt;h3&gt;Scenarios&lt;/h3&gt;  &lt;h4&gt;1.) Number of Release calls = Number of AddRef calls&lt;/h4&gt;  &lt;p&gt;This is the normal scenario: As soon as no client needs the server object anymore it is getting destroyed&lt;/p&gt;  &lt;h4&gt;2.) Number of Release calls &amp;gt; Number of AddRef calls&lt;/h4&gt;  &lt;p&gt;If Release is called one time too often another client might crash because the server get's destroyed too early - bad thing here is that you see the crash in some place but this does not tell you where is root cause is located. All you know is which objects reference count has been corrupted.&lt;/p&gt;  &lt;h4&gt;3.) Number of AddRef calls &amp;gt; Number of Release calls&lt;/h4&gt;  &lt;p&gt;If AddRef is called one time too often the reference count never reaches 0 and hence the server object never get's destroyed. This is causing memory leaks and also might cause resource leaks. The effect of this scenario is much less obvious: You might see memory increasing over time and/or performance degrade and/or resources to be locked when they should be unlocked again.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Finding the place where the unbalanced AddRef/Release occurred might be like finding the needle in the hay. I did research in the Google reachable web but didn't find a good tool available that really assist's in this task. Luckily &lt;a href="http://blogs.msdn.com/saraford/articles/454276.aspx"&gt;Sara Ford&lt;/a&gt; described in this &lt;a href="http://blogs.msdn.com/saraford/archive/2005/05/03/414385.aspx"&gt;post&lt;/a&gt; the first step you need to take in order to get the data necessary to drill down into the problem.&lt;/p&gt;  &lt;p&gt;Somehow I didn't manage to set the trace points in Visual Studio 2005 (can anybody tell me how to set a break point on a single objects AddRef, Release methods?) so I launched my beloved WinDbg.&lt;/p&gt;  &lt;p&gt;First I created script to create me an xml snippet for an event that alters the ref count (I didn't find a better name so I called it ToXml.txt and placed it into my scripts folder):&lt;/p&gt;  &lt;p&gt;.printf "--&amp;gt;\n&amp;lt;Event&amp;gt;&amp;lt;Ref&amp;gt;%d&amp;lt;/Ref&amp;gt;&amp;lt;![CDATA[",poi(${$arg1})  &lt;br /&gt;k100   &lt;br /&gt;.printf "]]&amp;gt;&amp;lt;/Event&amp;gt;\n&amp;lt;!--\n"&lt;/p&gt;  &lt;p&gt;Then I placed a break point on the server objects constructor&lt;/p&gt;  &lt;p&gt;bp MyServer!CMyClass::CMyClass&lt;/p&gt;  &lt;p&gt;When the breakpoint hit, I stepped out &amp;lt;Shift&amp;gt;+&amp;lt;H11&amp;gt; into CComCreator::CreateInstance and then stepped over the p-&amp;gt;SetVoid(pv); call in this class.  &lt;br /&gt;(I think it should be possible to set a breakpoint directly at MyServer!ATL::CComCreator&amp;lt;ATL::CComObject&amp;lt;CMyClass&amp;gt; &amp;gt;::CreateInstance+0xb1, but I didn't try...)&lt;/p&gt;  &lt;p&gt;Now I gathered the address of m_dwRef by:&lt;/p&gt;  &lt;p&gt;0:000&amp;gt; ?? &amp;amp;(p-&amp;gt;m_dwRef)  &lt;br /&gt;long * &lt;span style="color: rgb(51, 204, 0);"&gt;0x110d724c&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Next thing to do is setting the data breakpoint by:&lt;/p&gt;  &lt;p&gt;ba w4 &lt;span style="color: rgb(51, 204, 0);"&gt;0x110d724c &lt;/span&gt;"$$&amp;gt;a&amp;lt;C:/windbg/scripts/ToXml.txt 0f084cb4;gc"&lt;/p&gt;  &lt;p&gt;(you might need to change the path 'C:/windbg/scripts/')&lt;/p&gt;  &lt;p&gt;With &lt;a href="http://msdn.microsoft.com/en-us/library/cc266851.aspx"&gt;.logopen&lt;/a&gt; we make sure that we directly write all events into an logfile:&lt;/p&gt;  &lt;p&gt;.logopen c:\temp\Events.xml&lt;/p&gt;  &lt;p&gt;Now let the application run with 'g' or &amp;lt;F5&amp;gt; and do whatever creates your ref counting problem.&lt;/p&gt;  &lt;p&gt;When done break into and close the log with &lt;a href="http://msdn.microsoft.com/en-us/library/cc266834.aspx"&gt;.logclose&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;At this point we are half the way through. The Events.xml we created is not valid xml. You need to add &lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;  &lt;br /&gt;&amp;lt;Events&amp;gt;   &lt;br /&gt;&amp;lt;!--&lt;/p&gt;  &lt;p&gt;at the beginning and&lt;/p&gt;  &lt;p&gt;--&amp;gt;&amp;lt;/Events&amp;gt;&lt;/p&gt;  &lt;p&gt;at the end.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Now comes the tooling. In my scenario I had around 1400 Events - a little tedious to analyze all by hand.&lt;/p&gt;  &lt;p&gt;So I created "Volkers RefCount Buster" which does the following:&lt;/p&gt;  &lt;p&gt;1.) After loading the file (enter path in first text box and press Start) all events are identified for either beeing AddRef or Release&lt;/p&gt;  &lt;p&gt;2.) Then the call stack is taken to group the events:&lt;/p&gt;  &lt;p&gt;First action is to exclude events that match the pattern entered in the second text box (exclude pattern):&lt;/p&gt; &lt;!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red43\green145\blue175;}??\fs24 \cf1 var\cf0  includeQuery = \cf1 from\cf0  frame \cf1 in\cf0  \cf1 this\cf0 .StackFrames.Frames\par ??                                   \cf1 where\cf0  \cf4 String\cf0 .IsNullOrEmpty(ExcludePattern) ? \cf1 true\cf0  : !excludePattern.IsMatch(frame)\par ??                                   \cf1 select\cf0  frame;} --&gt;  &lt;div    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:courier new;font-size:12pt;color:black;"&gt;   &lt;p style="margin: 0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; includeQuery = &lt;span style="color:blue;"&gt;from&lt;/span&gt; frame &lt;span style="color:blue;"&gt;in&lt;/span&gt; &lt;span style="color:blue;"&gt;this&lt;/span&gt;.StackFrames.Frames&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                   &lt;span style="color:blue;"&gt;where&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;String&lt;/span&gt;.IsNullOrEmpty(ExcludePattern) ? &lt;span style="color:blue;"&gt;true&lt;/span&gt; : !excludePattern.IsMatch(frame)&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                   &lt;span style="color:blue;"&gt;select&lt;/span&gt; frame;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt; Then the remaining frames are searched for the selection pattern:&lt;/p&gt;  &lt;div    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:courier new;font-size:12pt;color:black;"&gt;   &lt;p style="margin: 0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; selectionQuery = &lt;span style="color:blue;"&gt;from&lt;/span&gt; frame &lt;span style="color:blue;"&gt;in&lt;/span&gt; includeQuery&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                     &lt;span style="color:blue;"&gt;let&lt;/span&gt; match = selectionPattern.Match(frame)&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                     &lt;span style="color:blue;"&gt;where&lt;/span&gt; match.Success&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                     &lt;span style="color:blue;"&gt;select&lt;/span&gt; match.Value;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;and the top most match is taken:&lt;/p&gt;  &lt;p&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; sourceGroup = selectionQuery.FirstOrDefault();&lt;/p&gt;  &lt;p&gt;the all events are grouped into the found source groups:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:courier new;font-size:12pt;color:black;"&gt;   &lt;p style="margin: 0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; ResultQuery = &lt;span style="color:blue;"&gt;from&lt;/span&gt; refCountEvent &lt;span style="color:blue;"&gt;in&lt;/span&gt; refCountEvents&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                  &lt;span style="color:blue;"&gt;group&lt;/span&gt; refCountEvent &lt;span style="color:blue;"&gt;by&lt;/span&gt; refCountEvent.SourceGroup &lt;span style="color:blue;"&gt;into&lt;/span&gt; g&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                  &lt;span style="color:blue;"&gt;select&lt;/span&gt; g;&lt;/p&gt;    &lt;p style="margin: 0px;"&gt; &lt;/p&gt;    &lt;p style="margin: 0px;"&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;span style="font-size:85%;"&gt;Then the number of AddRefs and Releases is calculated for each group and accumulated:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;div    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:courier new;font-size:12pt;color:black;"&gt; &lt;/div&gt; &lt;/div&gt;  &lt;div    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:courier new;font-size:12pt;color:black;"&gt;&lt;span style=";font-family:Trebuchet MS;font-size:85%;"  &gt;&lt;/span&gt;&lt;/div&gt;  &lt;div face="courier new" size="12pt" color="black" style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p style="margin: 0px;"&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color:blue;"&gt;var&lt;/span&gt; ResultSet &lt;span style="color:blue;"&gt;in&lt;/span&gt; ResultQuery)&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;    &lt;span style="color:blue;"&gt;long&lt;/span&gt; numOfAddRefs = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; rce &lt;span style="color:blue;"&gt;in&lt;/span&gt; ResultSet.AsEnumerable()&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                        &lt;span style="color:blue;"&gt;where&lt;/span&gt; rce.RefCountType == &lt;span style="color: rgb(43, 145, 175);"&gt;EventType&lt;/span&gt;.AddRef&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                        &lt;span style="color:blue;"&gt;select&lt;/span&gt; rce).Count();&lt;/p&gt;    &lt;p style="margin: 0px;"&gt; &lt;/p&gt;    &lt;p style="margin: 0px;"&gt;    &lt;span style="color:blue;"&gt;long&lt;/span&gt; numOfReleases = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; rce &lt;span style="color:blue;"&gt;in&lt;/span&gt; ResultSet.AsEnumerable()&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                          &lt;span style="color:blue;"&gt;where&lt;/span&gt; rce.RefCountType == &lt;span style="color: rgb(43, 145, 175);"&gt;EventType&lt;/span&gt;.Release&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;                          &lt;span style="color:blue;"&gt;select&lt;/span&gt; rce).Count();&lt;/p&gt;    &lt;p style="margin: 0px;"&gt; &lt;/p&gt;    &lt;p style="margin: 0px;"&gt;    &lt;span style="color:blue;"&gt;long&lt;/span&gt; balance = numOfAddRefs - numOfReleases;&lt;/p&gt;    &lt;p style="margin: 0px;"&gt;...&lt;/p&gt;    &lt;p style="margin: 0px;"&gt; &lt;/p&gt;    &lt;p style="margin: 0px;"&gt;Now it's up to you to find the Exclude Pattern and Selection Pattern that will directly point you to the component or file, that is the culprit. Then you just need to look at those stacks that belong to the found bad guy and you will also be able to see the source line that created the problem.&lt;/p&gt;    &lt;p style="margin: 0px;"&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/VolkerVonEinem/SD_6aK-RJVI/AAAAAAAAAEU/PUqV6wkJR58/VolkersRefCountBuster%5B13%5D.png"&gt;&lt;img style="border-width: 0px;" alt="VolkersRefCountBuster" src="http://lh5.ggpht.com/VolkerVonEinem/SD_6bK-RJWI/AAAAAAAAAEc/LGhZpiOjWjE/VolkersRefCountBuster_thumb%5B9%5D.png" width="677" border="0" height="417" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; You can download the sources and binaries &lt;a href="http://www.vve.gmxhome.de/docs/RefCountBuster.zip"&gt;here...&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Have fun,&lt;/p&gt;  &lt;p&gt;Volker&lt;/p&gt;  &lt;p&gt;  &lt;/p&gt; &lt;!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;}??\fs24 \cf1 var\cf0  selectionQuery = \cf1 from\cf0  frame \cf1 in\cf0  includeQuery\par ??                                     \cf1 let\cf0  match = selectionPattern.Match(frame)\par ??                                     \cf1 where\cf0  match.Success\par ??                                     \cf1 select\cf0  match.Value;} --&gt;  &lt;div style="background: white none repeat scroll 0% 0%; font-size: 12pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; font-family: courier new;"&gt;   &lt;p style="margin: 0px;"&gt;&lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-5865471132245286587?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/5865471132245286587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=5865471132245286587' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/5865471132245286587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/5865471132245286587'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/05/debugging-reference-count-leaks.html' title='Debugging reference count leaks'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/VolkerVonEinem/SD_6bK-RJWI/AAAAAAAAAEc/LGhZpiOjWjE/s72-c/VolkersRefCountBuster_thumb%5B9%5D.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-3087983998049395513</id><published>2008-05-08T08:49:00.001+02:00</published><updated>2008-05-08T08:49:26.920+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Windbg help is online...</title><content type='html'>&lt;p&gt;Please correct me if I'm wrong, but at least some month ago there was online help for Debugging Tools for Windows on MSDN or anywhere else.&lt;/p&gt;  &lt;p&gt;Now Microsoft put the (very good and helpful!) help &lt;a href="http://msdn.microsoft.com/en-us/library/cc267445.aspx"&gt;online&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc267445.aspx"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="435" alt="image" src="http://lh4.ggpht.com/VolkerVonEinem/SCKidSK0egI/AAAAAAAAAEM/_0c5ueRusFU/image%5B11%5D.png" width="679" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Have fun...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-3087983998049395513?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/3087983998049395513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=3087983998049395513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3087983998049395513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3087983998049395513'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/05/windbg-help-is-online.html' title='Windbg help is online...'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/VolkerVonEinem/SCKidSK0egI/AAAAAAAAAEM/_0c5ueRusFU/s72-c/image%5B11%5D.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-5469487741389441184</id><published>2008-05-06T09:45:00.002+02:00</published><updated>2008-07-25T15:55:31.908+02:00</updated><title type='text'>Windbg version 6.9.3.113 is out (I'm still keeping 6.7.5.0)</title><content type='html'>&lt;p&gt;Microsoft &lt;a href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2008/05/05/windbg-6-9-3-113-released.aspx"&gt;released&lt;/a&gt; a new version of Debugging Tools for windows. As usual the installation bits can be grabbed &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a"&gt;here..&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Unfortunately the &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;integrated managed debugging&lt;/a&gt; that accidentally came in with version 6.7.5.0 is still missing :-(&lt;/p&gt;  &lt;p&gt;Anyway here's the &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/whatsnew.mspx"&gt;list of changes&lt;/a&gt;:&lt;/p&gt;  &lt;h4&gt;Highlights in Version 6.9.3.113&lt;/h4&gt;  &lt;p&gt;In this release, you will find better performance on systems with greater memory as well as those with large CPU counts. Better performance and reliability on transport initialization. Enhancements to &lt;b&gt;dt, sx, z, !defwrites, !sysinfo, !gflags, Symsrv,&lt;/b&gt; as well as several others. For further details, please read the RELNOTES.TXT provided in the package. &lt;/p&gt;  &lt;p&gt;Taken from the installation relnotes.txt:&lt;/p&gt;  &lt;p&gt;* Fix kd to function properly when debugging 256 processor machine.   &lt;br /&gt;* Fix windbg window dragging performance problems when running under AERO    &lt;br /&gt;  on Vista.    &lt;br /&gt;* Alert the user when a debug transport is already opened by another    &lt;br /&gt;  instance of the debugger.    &lt;br /&gt;* Only attempt driver install after opening the transport fails with file    &lt;br /&gt;  not found.    &lt;br /&gt;* Add /LARGEADDRESSAWARE to debugger executables (cdb/kd/ntsd/windbg).    &lt;br /&gt;* Update vmdemux tool    &lt;br /&gt;* Fix pdbcopy.exe tool    &lt;br /&gt;* "dt" would display enumerant symbolic names for enumeration-typed bit-    &lt;br /&gt;  field members.    &lt;br /&gt;* Make "dt" member field match case-insensitive.    &lt;br /&gt;* Support wildcard module name in "dt" command. For example, "dt    &lt;br /&gt;  adv!*RegQuery*".    &lt;br /&gt;* "dt/dv" would output more information indicating that this is an empty    &lt;br /&gt;  string (the default display "") or this is memory read failure (new output    &lt;br /&gt;  "--- memory read error at address ...").    &lt;br /&gt;* "sx? ud" commands can now use an image name (for example, ntdll.dll) as    &lt;br /&gt;  well as a module name (ntdll).    &lt;br /&gt;* Fix ".dbgdbg" command failure when debugger is installed in a directory    &lt;br /&gt;  that contains spaces (for example, "c:\Program Files\Debuggers").    &lt;br /&gt;* Fix "z" command loop counter reset problem.    &lt;br /&gt;* Debugger extension would be loaded using LOAD_WITH_ALTERED_SEARCH_PATH    &lt;br /&gt;  so that dependent binaries could be loaded from the same directory where    &lt;br /&gt;  loaded extension resides (and the directory is not part of search path).    &lt;br /&gt;* "!defwrites" (in kdexts.dll) will not query nt!MmThrottleTop and    &lt;br /&gt;  nt!MmThrottleBottom values in Windows Vista.    &lt;br /&gt;* Fix for "!sysinfo cpuinfo".    &lt;br /&gt;* Fix for "!sysinfo gbl" infinite loop problem.    &lt;br /&gt;* Fix for DisplayFlags() has output string buffer overrun when using    &lt;br /&gt;  "!handle" (in ntsdexts.dll).    &lt;br /&gt;* Fix for "!gflags" command.    &lt;br /&gt;* Fix so that "fltkd" and "boot" debugger extensions run on pre-Win7 OS.    &lt;br /&gt;* Fix Symstore/SymChk improved detection for resource-only binaries    &lt;br /&gt;* Continued on-going improvements to !analyze &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Good to know, that you can have multiple versions of windbg on the same machine by simply x-copying it - hope that someday there's no need to write: "I'm still keeping 6.7.5.0"&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-5469487741389441184?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/5469487741389441184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=5469487741389441184' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/5469487741389441184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/5469487741389441184'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/05/windbg-version-693113-is-out-i-still.html' title='Windbg version 6.9.3.113 is out (I&amp;#39;m still keeping 6.7.5.0)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-4467685340723166366</id><published>2008-03-06T15:54:00.001+01:00</published><updated>2008-03-06T15:54:22.053+01:00</updated><title type='text'>Slow symbol loads because of unresolved breakpoints</title><content type='html'>&lt;p&gt;I was wondering why debugging one specific application took much more time than it used before.    &lt;br /&gt;Additionally I always got this suspicious message:&lt;/p&gt;  &lt;p&gt;&amp;gt;&amp;gt;   &lt;br /&gt;Integrated managed debugging does not support enumeration of symbols.     &lt;br /&gt;See http://dbg/managed.htm for more details.    &lt;br /&gt;&amp;lt;&amp;lt;&lt;/p&gt;  &lt;p&gt;The root cause of the slow down was a unresolved breakpoint that caused searching for a match after each module load.&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;     &lt;br /&gt;0:012&amp;gt; bl      &lt;br /&gt; 0 eu&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0001 (0001) (v)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;(the u in eu stands for unresolved...)   &lt;br /&gt;It is a common illness I'm suffering from to miss the Ctrl button when doing cut and paste. The result is a breakpoint on 'v' :-(&lt;/p&gt;  &lt;p&gt;What helped was a simple 'bc*' to clear all breakpoints and I was able to debug at the speed I was used to...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-4467685340723166366?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/4467685340723166366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=4467685340723166366' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/4467685340723166366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/4467685340723166366'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/03/slow-symbol-loads-because-of-unresolved.html' title='Slow symbol loads because of unresolved breakpoints'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-8091003126002309646</id><published>2008-02-21T16:57:00.008+01:00</published><updated>2008-02-22T08:04:46.380+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bugs'/><title type='text'>Shooting the PAGE_GUARD flag with MiniDumpWithIndirectlyReferencedMemory</title><content type='html'>A colleague of mine (thanks Ralf for pointing this out!) told me that using &lt;a href="http://msdn2.microsoft.com/en-us/library/ms680519.aspx"&gt;MiniDumpWithIndirectlyReferencedMemory&lt;/a&gt; in &lt;a href="http://msdn2.microsoft.com/en-us/library/ms680360%28VS.85%29.aspx"&gt;MiniDumpWriteDump&lt;/a&gt; can cause a nasty crashes.&lt;br /&gt;Following the "in 99.9% of the cases it is your own fault" pattern I suspected the problem to be somewhere else but in dbghelp. Ralf kindly provided me with a sample project which I condensed a bit to fit on a single page:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="comment"&gt;// GuardPageDump.cpp : Defines the entry point for the console application.&lt;br /&gt;//&lt;br /&gt;&lt;/span&gt;&lt;span class="pre"&gt;#include "stdafx.h"&lt;br /&gt;#include "C:/Program Files/Debugging Tools for Windows/sdk/inc/dbghelp.h"&lt;br /&gt;#pragma comment( lib, "C:/Program Files/Debugging Tools for Windows/sdk/lib/i386/dbghelp.lib")&lt;br /&gt;&lt;br /&gt;#include "process.h"&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;void&lt;/span&gt; BigFunc&lt;span class="operator"&gt; ()&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;char&lt;/span&gt; sBigBuffer&lt;span class="operator"&gt; [&lt;/span&gt;&lt;span class="int"&gt;20000&lt;/span&gt;&lt;span class="operator"&gt;] = {&lt;/span&gt;&lt;span class="char"&gt;'\0'&lt;/span&gt;&lt;span class="operator"&gt;};&lt;/span&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"BigFunc was called!\nsBigBuffer: %s\n"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;sBigBuffer&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; ProblemFunc&lt;span class="operator"&gt;(&lt;/span&gt;HANDLE hWaitForMe&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;char&lt;/span&gt;   sDummy1&lt;span class="operator"&gt;[] = {&lt;/span&gt;&lt;span class="char"&gt;'A'&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="char"&gt;'\0'&lt;/span&gt;&lt;span class="operator"&gt;};&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;unsigned long&lt;/span&gt; iDummy&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="keyword"&gt; reinterpret_cast&lt;/span&gt;&lt;span class="operator"&gt;&amp;lt;&lt;/span&gt;&lt;span class="type"&gt;unsigned long&lt;/span&gt;&lt;span class="operator"&gt;&amp;gt;(&amp;amp;(&lt;/span&gt;sDummy1&lt;span class="operator"&gt;[&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;]));&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;// let iDummp seem like a pointer pointing to the guarded page&lt;br /&gt;&lt;/span&gt;     iDummy&lt;span class="operator"&gt; -=&lt;/span&gt;&lt;span class="int"&gt; 0x2000&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"Integer value: %d\n"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; iDummy&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//make sure the integer value pointing to the guard page area is on the stack, when MiniDumpWriteDump is called from another stack&lt;br /&gt;//during wait we will issue a dump creation on the main thread&lt;br /&gt;&lt;/span&gt; WaitForSingleObject&lt;span class="operator"&gt;(&lt;/span&gt;hWaitForMe&lt;span class="operator"&gt;,&lt;/span&gt;INFINITE&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"Calling BigFunc crashes since stack can no longer be extended\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;BigFunc&lt;span class="operator"&gt;();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"Integer value: %d\n"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; iDummy&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; ProblemFuncThread&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;void&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; p&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;ProblemFunc&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="keyword"&gt;reinterpret_cast&lt;/span&gt;&lt;span class="operator"&gt;&amp;lt;&lt;/span&gt;HANDLE&lt;span class="operator"&gt;&amp;gt;(&lt;/span&gt;p&lt;span class="operator"&gt;));&lt;/span&gt;&lt;br /&gt;_endthread&lt;span class="operator"&gt;();&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt; _tmain&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; argc&lt;span class="operator"&gt;,&lt;/span&gt; _TCHAR&lt;span class="operator"&gt;*&lt;/span&gt; argv&lt;span class="operator"&gt;[])&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"This program demonstrates the damaging effect of creating a userdump with MiniDumpWithIndirectlyReferencedMemory\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span class="operator"&gt;&lt;/span&gt;&lt;br /&gt;HANDLE hWaitForMe&lt;span class="operator"&gt; =&lt;/span&gt; CreateEvent&lt;span class="operator"&gt;(&lt;/span&gt;NULL&lt;span class="operator"&gt;,&lt;/span&gt;FALSE&lt;span class="operator"&gt;,&lt;/span&gt;FALSE&lt;span class="operator"&gt;,&lt;/span&gt;NULL&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"Calling ProblemFunc on a different thread\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;br /&gt;&lt;/span&gt; uintptr_t hThread&lt;span class="operator"&gt; =&lt;/span&gt; _beginthread&lt;span class="operator"&gt;(&lt;/span&gt;ProblemFuncThread&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;hWaitForMe&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;// give the thread time to start&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt; ::&lt;/span&gt;Sleep&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="int"&gt;1000&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"Creating a userdump of type MiniDumpWithIndirectlyReferencedMemory\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;printf&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"Resets guard page flag on the page pointed to by iDummy\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;HANDLE hFile&lt;span class="operator"&gt; =&lt;/span&gt; CreateFile&lt;span class="operator"&gt;(&lt;/span&gt;_T&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"c:\\temp\\test_indirect.dmp"&lt;/span&gt;&lt;span class="operator"&gt;),&lt;/span&gt; GENERIC_READ&lt;span class="operator"&gt; |&lt;/span&gt; GENERIC_WRITE&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; NULL&lt;span class="operator"&gt;,&lt;/span&gt; CREATE_ALWAYS&lt;span class="operator"&gt;,&lt;/span&gt; FILE_ATTRIBUTE_NORMAL&lt;span class="operator"&gt;,&lt;/span&gt; NULL&lt;span class="operator"&gt; );&lt;/span&gt;&lt;br /&gt;MiniDumpWriteDump&lt;span class="operator"&gt;(&lt;/span&gt;GetCurrentProcess&lt;span class="operator"&gt;(),&lt;/span&gt;GetCurrentProcessId&lt;span class="operator"&gt;(),&lt;/span&gt;hFile&lt;span class="operator"&gt;,(&lt;/span&gt;MINIDUMP_TYPE&lt;span class="operator"&gt;) (&lt;/span&gt;MiniDumpWithIndirectlyReferencedMemory&lt;span class="operator"&gt;),&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CloseHandle&lt;span class="operator"&gt;(&lt;/span&gt;hFile&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SetEvent&lt;span class="operator"&gt;(&lt;/span&gt;hWaitForMe&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;CloseHandle&lt;span class="operator"&gt;(&lt;/span&gt;hWaitForMe&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;WaitForSingleObject&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="keyword"&gt;reinterpret_cast&lt;/span&gt;&lt;span class="operator"&gt;&amp;lt;&lt;/span&gt;HANDLE&lt;span class="operator"&gt;&amp;gt;(&lt;/span&gt;hThread&lt;span class="operator"&gt;),&lt;/span&gt;INFINITE&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;return&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This sample assumes you have installed Debugging Tools for Windows to the default location (C:/Program Files/Debugging Tools for Windows) and you have selected to install the SDK as well.&lt;br /&gt;&lt;br /&gt;I'm setting two breakpoints: One on the line that is calling MiniDumpWriteDump - another on the line before calling BicFunc.&lt;br /&gt;&lt;br /&gt;First let's have a look at the state before calling MiniDumpWriteDump:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Lghuvt1vgPY/R729sU-KG1I/AAAAAAAAAD4/sorzCKwMUls/s1600-h/GuardPageDump1.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_Lghuvt1vgPY/R729sU-KG1I/AAAAAAAAAD4/sorzCKwMUls/s320/GuardPageDump1.png" alt="" id="BLOGGER_PHOTO_ID_5169496516532509522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Switching to thread 001 we will notice the value of  iDummy = 0x88df38 on the stack that is waiting:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Lghuvt1vgPY/R72_SU-KG2I/AAAAAAAAAEA/qCDlQ2RBY70/s1600-h/GuardPageDump2.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_Lghuvt1vgPY/R72_SU-KG2I/AAAAAAAAAEA/qCDlQ2RBY70/s320/GuardPageDump2.png" alt="" id="BLOGGER_PHOTO_ID_5169498268879166306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now before calling MiniDumpWriteDump let's have a look at the memory layout:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;0:001&gt; !vadump&lt;br /&gt;&lt;br /&gt;[...]&lt;br /&gt;&lt;br /&gt;BaseAddress:       &lt;span style="color: rgb(255, 0, 0);"&gt;00125000&lt;/span&gt;&lt;br /&gt;RegionSize:        &lt;span style="color: rgb(255, 0, 0);"&gt;00001000&lt;/span&gt;&lt;br /&gt;State:             00001000  MEM_COMMIT&lt;br /&gt;Protect:           00000104  PAGE_READWRITE + PAGE_GUARD&lt;br /&gt;Type:              00020000  MEM_PRIVATE&lt;br /&gt;&lt;br /&gt;[...]&lt;br /&gt;&lt;br /&gt;BaseAddress:       &lt;span style="color: rgb(255, 0, 0);"&gt;0088d000&lt;/span&gt;&lt;br /&gt;RegionSize:        &lt;span style="color: rgb(255, 0, 0);"&gt;00001000&lt;/span&gt;&lt;br /&gt;State:             00001000  MEM_COMMIT&lt;br /&gt;Protect:           00000104  PAGE_READWRITE + PAGE_GUARD&lt;br /&gt;Type:              00020000  MEM_PRIVATE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ok, there is a PAGE_GUARD flag for each thread...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; ~0s;!teb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;GuardPageDump!wmain+0x91:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;00401991 6a00            push    0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;TEB at 7ffdf000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    StackLimit:           00126000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; ~1s;!teb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ntdll!KiFastSystemCallRet:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;771d9a94 c3              ret&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;TEB at 7ffde000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    StackLimit:           0088e000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Adding the RegionSize to BaseAddress gives us the StackLimit observed by !teb.&lt;br /&gt;&lt;br /&gt;Now comes the clue: iDummy  holds the value 0x88df38 (no pointer) that represents an address in the guarded page. Dbghelp does not know by looking at the stack if this is a pointer or value and follows the indirections. Looking at the memory layout after call to MiniDumpWriteDump reveals the problem:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:001&gt; !vadump&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BaseAddress:       00125000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RegionSize:        00001000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;State:             00001000  MEM_COMMIT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Protect:           00000104  PAGE_READWRITE + PAGE_GUARD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Type:              00020000  MEM_PRIVATE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BaseAddress:       0088d000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RegionSize:        00003000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;State:             00001000  MEM_COMMIT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;Protect:           00000004  PAGE_READWRITE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Type:              00020000  MEM_PRIVATE&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The PAGE_GUARD flag for thread 001 is gone! Now it's just a question of time until your application will crash without giving you any clue on the root cause of the problem:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;0:001&gt; g&lt;br /&gt;(13e0.ee4): Access violation - code c0000005 (first chance)&lt;br /&gt;First chance exceptions are reported before any exception handling.&lt;br /&gt;This exception may be expected and handled.&lt;br /&gt;eax=0088c000 ebx=00bc2e30 ecx=0088b100 edx=771d9a94 esi=00000000 edi=00000000&lt;br /&gt;eip=00401a07 esp=0088ff24 ebp=0088ff2c iopl=0         nv up ei pl nz na pe nc&lt;br /&gt;cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206&lt;br /&gt;GuardPageDump!_chkstk+0x27:&lt;br /&gt;00401a07 8500            test    dword ptr [eax],eax  ds:0023:0088c000=????????&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0:001&gt; g&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);font-family:courier new;" &gt;(13e0.ee4): Access violation - code c0000005 (!!! second chance !!!)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next thing I will do is to tell Microsoft about this. Meanwhile I'll try to restore the PAGE_GUARD flag as a workaround fix using &lt;a href="http://msdn2.microsoft.com/en-us/library/aa366898%28VS.85%29.aspx"&gt;VirtualProtext&lt;/a&gt; but I'm not sure if this is really a good idea.&lt;br /&gt;&lt;br /&gt;BTW: I've tested this the latest version of dbghelp.dll I know:&lt;br /&gt;A colleague of mine recently investigated a crash that could be deducted to the usage of MiniDumpWriteDump along with MiniDumpWithIndirectlyReferencedMemory flag. The problem is, that MiniDumpWriteDump clears the PAGE_GUARD flag if a value or pointer is on the a stack other than the stack that calls MiniDumpWriteDump.&lt;br /&gt;As a result the process will crash later if the stack needs to be extended.&lt;br /&gt;I've described the problem in detail here:&lt;br /&gt;http://voneinem-windbg.blogspot.com/2008/02/shooting-pageguard-flag-with.html&lt;br /&gt;&lt;br /&gt;I would be nice to see fix for this, because the MiniDumpWithIndirectlyReferencedMemory is really useful.&lt;br /&gt;I didn't investigate into the other flags of MINIDUMP_TYPE Enumeration but MiniDumpNormal and MiniDumpWithFullMemory seem to work without a problem.&lt;br /&gt;&lt;br /&gt;I've been testing this with the latest public version of dbghelp.dll&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:001&gt; lmvm dbghelp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;start    end        module name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;68af0000 68c05000   dbghelp    (deferred)             &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Image path: C:\Users\voneinem\Documents\Visual Studio 2008\Projects\GuardPageDump\Release\dbghelp.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Image name: dbghelp.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Timestamp:        Thu Sep 27 23:27:05 2007 (46FC2029)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    CheckSum:         0010087A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    ImageSize:        00115000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    File version:     6.8.4.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Product version:  6.8.4.0&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-8091003126002309646?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/8091003126002309646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=8091003126002309646' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8091003126002309646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8091003126002309646'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/02/shooting-pageguard-flag-with.html' title='Shooting the PAGE_GUARD flag with MiniDumpWithIndirectlyReferencedMemory'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_Lghuvt1vgPY/R729sU-KG1I/AAAAAAAAAD4/sorzCKwMUls/s72-c/GuardPageDump1.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-4033468699942244328</id><published>2008-02-13T10:42:00.007+01:00</published><updated>2008-02-13T13:41:07.766+01:00</updated><title type='text'>Digging into Kernel Space</title><content type='html'>The company I am working for manufactures a laboratory device that is getting conntected via RS232 interface. As many laptop computers today do not have such an interface we must provide our customers with a good solution how to operate their instruments in such an environment. Therefore we identified a USB to RS232 adapter as a good solution and selected a cable with &lt;a href="http://www.prolific.com.tw/eng/downloads.asp?ID=31"&gt;prolific&lt;/a&gt; chipset &lt;span style="width: 500px;"&gt;&lt;span style=""&gt;PL-2303HX and drivers&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Lately I have seen sporadic cases of strange process hangs. The process that in writing into RS232 is stuck. I was able to attach windbg to that process and quickly realized that it was hanging in a call to &lt;a href="http://msdn2.microsoft.com/en-us/library/aa365747%28VS.85%29.aspx"&gt;Kernel32!WriteFile&lt;/a&gt;. As we are setting com timeouts via &lt;a href="http://msdn2.microsoft.com/en-us/library/aa363437%28VS.85%29.aspx"&gt;kernel32!SetCommTimeouts&lt;/a&gt; to 10 seconds in the worst case I would have expected the function to return in any case. This did not happen :-(&lt;br /&gt;&lt;br /&gt;Strange enough, killing the process was not possible anymore. No Task Manager, no Process Explorer and no kill -f was working. Finally I wasn't even able to shut down the system properly (XP SP2) and needed to kill it the hard way.&lt;br /&gt;&lt;br /&gt;OK I could not do anything more in user mode space that saying WriteFile is the bad guy. This is a bad explanation for customers. They want the system to work - regardless of how is the culprit.&lt;br /&gt;&lt;br /&gt;So I was entering new spaces - the kernel space...&lt;br /&gt;&lt;br /&gt;First task was to get a dump. &lt;a href="http://www.osronline.com/index.cfm"&gt;OSR Online&lt;/a&gt; offers a tool called &lt;a href="http://www.osronline.com/article.cfm?article=153"&gt;Bang&lt;/a&gt; which did the job.&lt;br /&gt;Before I needed to configure the system to generate a full dump. Therefore right click on computer and select properties. Go to the advanced tab and click on Settings for Startup and recovery. In the 'Write debugging information' frame select 'Complete memory dump' and the dump file name:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Lghuvt1vgPY/R7LTgE-KGzI/AAAAAAAAADo/YIZh6vTqVHw/s1600-h/KernelDump.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_Lghuvt1vgPY/R7LTgE-KGzI/AAAAAAAAADo/YIZh6vTqVHw/s320/KernelDump.png" alt="" id="BLOGGER_PHOTO_ID_5166424270591105842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finish with OK and now start the Bang.exe (it seems to require a local admin account - so I used the runas...):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_Lghuvt1vgPY/R7LVG0-KG0I/AAAAAAAAADw/45nW7t2F5pM/s1600-h/Bang.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_Lghuvt1vgPY/R7LVG0-KG0I/AAAAAAAAADw/45nW7t2F5pM/s320/Bang.png" alt="" id="BLOGGER_PHOTO_ID_5166426035822664514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is not hard to hit the nice red button and you'll see a nice blue screen ;-)&lt;br /&gt;&lt;br /&gt;After reboot the promised memory.dmp was available.&lt;br /&gt;&lt;br /&gt;But what next? I'm fully unexperienced in kernel debugging and I tried the 'poking around until you find something' pattern without success. Fortunately I have a MSDN subscription that offers two free support incidents. So I went to Bill and told him that I'm not happy with this. He said, please give me the dump and I'll see. Then he said it'll take songer than a day but not much. Finally took nearly tree weeks - never mind ;-)&lt;br /&gt;I got the dump analysis out of Microsoft hands and this was pretty much pointing to the place I suspected (the USB to RS232 driver). Additionally he said that my process was accessing the same port from two different threads. This touched my pride as a developer and I needed to understand the magic bill was doing my dump. Finally I discovered that it was quite true as the two threads were accessing two different ports (I had in sum 4 ports on the system) - but that's forgiven.&lt;br /&gt;&lt;br /&gt;Now to the internals of the kernel dump analyis:&lt;br /&gt;&lt;br /&gt;I know the name of the hanging process. So first we need to get the processes:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;0: kd&gt; !process 0 0&lt;br /&gt;[...]&lt;br /&gt;PROCESS 820f4838  SessionId: 0  Cid: 01d4    Peb: 7ffd8000  ParentCid: 0608&lt;br /&gt; DirBase: 02a00440  ObjectTable: e4b36400  HandleCount: 209.&lt;br /&gt; Image: MyProcess.exe&lt;br /&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we need to get the details of the process:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;0: kd&gt; !process 820f4838   f&lt;br /&gt;PROCESS 820f4838  SessionId: 0  Cid: 01d4    Peb: 7ffd8000  ParentCid: 0608&lt;br /&gt; DirBase: 02a00440  ObjectTable: e4b36400  HandleCount: 209.&lt;br /&gt; Image: &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;MyProcess&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.exe&lt;br /&gt; VadRoot 81b9ffa8 Vads 288 Clone 0 Private 61253. Modified 84841. Locked 0.&lt;br /&gt; DeviceMap e4c3b450&lt;br /&gt; Token                             e4c02030&lt;br /&gt; ElapsedTime                       1 Day 04:24:53.014&lt;br /&gt; UserTime                          00:00:23.156&lt;br /&gt; KernelTime                        00:00:20.000&lt;br /&gt; QuotaPoolUsage[PagedPool]         156580&lt;br /&gt; QuotaPoolUsage[NonPagedPool]      12612&lt;br /&gt; Working Set Sizes (now,min,max)  (25572, 50, 345) (102288KB, 200KB, 1380KB)&lt;br /&gt; PeakWorkingSetSize                52956&lt;br /&gt; VirtualSize                       372 Mb&lt;br /&gt; PeakVirtualSize                   379 Mb&lt;br /&gt; PageFaultCount                    203878&lt;br /&gt; MemoryPriority                    BACKGROUND&lt;br /&gt; BasePriority                      8&lt;br /&gt; CommitCharge                      63188&lt;br /&gt; DebugPort                         81905360&lt;br /&gt;&lt;br /&gt;     THREAD 81a81020  Cid 01d4.0c20  Teb: 7ffaf000 Win32Thread: e397ceb0 WAIT: (DelayExecution) KernelMode Non-Alertable&lt;br /&gt;         81a81110  NotificationTimer&lt;br /&gt;     &lt;span style="font-weight: bold;"&gt;IRP List:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;            &lt;span style="color: rgb(255, 0, 0);"&gt;816ecde0&lt;/span&gt;: (0006,0220) Flags: 00000a30  Mdl: 00000000&lt;/span&gt;&lt;br /&gt;     Not impersonating&lt;br /&gt;     DeviceMap                 e4c3b450&lt;br /&gt;     Owning Process            820f4838       Image: &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;MyProcess&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.exe&lt;br /&gt;     Wait Start TickCount      6562217        Ticks: 0&lt;br /&gt;     Context Switch Count      408541                 LargeStack&lt;br /&gt;     UserTime                  00:00:00.109&lt;br /&gt;     KernelTime                00:00:00.421&lt;br /&gt;     Win32 Start Address 0x77c3a341&lt;br /&gt;     Start Address 0x7c810659&lt;br /&gt;     Stack Init a9910000 Current a990fc04 Base a9910000 Limit a990d000 Call 0&lt;br /&gt;     Priority 10 BasePriority 10 PriorityDecrement 0 DecrementCount 16&lt;br /&gt;     ChildEBP RetAddr&lt;br /&gt;     a990fc1c 80502e56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])&lt;br /&gt;     a990fc28 804faa13 nt!KiSwapThread+0x8a (FPO: [0,0,0])&lt;br /&gt;     a990fc54 8057ca62 nt!KeDelayExecutionThread+0x1c9 (FPO: [Non-Fpo])&lt;br /&gt;     a990fc78 8057e7ff nt!IopCancelAlertedRequest+0x52 (FPO: [Non-Fpo])&lt;br /&gt;     a990fc94 8057c341 nt!IopSynchronousServiceTail+0xe1 (FPO: [Non-Fpo])&lt;br /&gt;     &lt;span style="font-weight: bold;"&gt;a990fd38 805409ac nt!NtWriteFile+0x5d7 (FPO: [Non-Fpo])&lt;/span&gt;&lt;br /&gt;     a990fd38 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a990fd64)&lt;br /&gt;WARNING: Frame IP not in any known module. Following frames may be wrong.&lt;br /&gt;     0208fd70 00000000 0x7c90eb94&lt;br /&gt;&lt;br /&gt;     THREAD 8169da90  Cid 01d4.0ef0  Teb: 7ff9f000 Win32Thread: 00000000 WAIT: (DelayExecution) KernelMode Non-Alertable&lt;br /&gt;         8169db80  NotificationTimer&lt;br /&gt;     &lt;span style="font-weight: bold;"&gt;IRP List:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;            &lt;span style="color: rgb(51, 204, 0);"&gt;816b3710&lt;/span&gt;: (0006,0220) Flags: 00000a30  Mdl: 00000000&lt;/span&gt;&lt;br /&gt;     Not impersonating&lt;br /&gt;     DeviceMap                 e4c3b450&lt;br /&gt;     Owning Process            820f4838       Image: &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;MyProcess&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.exe&lt;br /&gt;     Wait Start TickCount      6562217        Ticks: 0&lt;br /&gt;     Context Switch Count      64786         &lt;br /&gt;     UserTime                  00:00:00.000&lt;br /&gt;     KernelTime                00:00:00.000&lt;br /&gt;     Win32 Start Address 0x77c3a341&lt;br /&gt;     Start Address 0x7c810659&lt;br /&gt;     Stack Init a9a5c000 Current a9a5bc04 Base a9a5c000 Limit a9a59000 Call 0&lt;br /&gt;     Priority 6 BasePriority 6 PriorityDecrement 0 DecrementCount 0&lt;br /&gt;     ChildEBP RetAddr&lt;br /&gt;     a9a5bc1c 80502e56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])&lt;br /&gt;     a9a5bc28 804faa13 nt!KiSwapThread+0x8a (FPO: [0,0,0])&lt;br /&gt;     a9a5bc54 8057ca62 nt!KeDelayExecutionThread+0x1c9 (FPO: [Non-Fpo])&lt;br /&gt;     a9a5bc78 8057e7ff nt!IopCancelAlertedRequest+0x52 (FPO: [Non-Fpo])&lt;br /&gt;     a9a5bc94 8057c341 nt!IopSynchronousServiceTail+0xe1 (FPO: [Non-Fpo])&lt;br /&gt;     &lt;span style="font-weight: bold;"&gt;a9a5bd38 805409ac nt!NtWriteFile+0x5d7 (FPO: [Non-Fpo])&lt;/span&gt;&lt;br /&gt;     a9a5bd38 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a9a5bd64)&lt;br /&gt;WARNING: Frame IP not in any known module. Following frames may be wrong.&lt;br /&gt;     04dcfd9c 00000000 0x7c90eb94&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here we can see the two hanging threads in NtWriteFile I already have seen in user space.&lt;br /&gt;&lt;br /&gt;I also was able to go that far without Bill's help - now comes the special magic:&lt;br /&gt;The key to the success is lying in the IRP ( &lt;a href="http://msdn2.microsoft.com/en-us/library/aa491631.aspx"&gt;&lt;i&gt;I/O request packet&lt;/i&gt;&lt;/a&gt;) list!&lt;br /&gt;&lt;br /&gt;So let's have at the details of the IRPs:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;1: kd&gt; !irp &lt;span style="color: rgb(255, 0, 0);"&gt;816ecde0&lt;/span&gt;&lt;br /&gt;Irp is active with 5 stacks 5 is current (= 0x816ecee0)&lt;br /&gt;No Mdl: System buffer=81e316a8: Thread 81a81020:  Irp stack trace.&lt;br /&gt;  cmd  flg cl Device   File     Completion-Context&lt;br /&gt;[...]&lt;br /&gt;&gt;[  4, 0]   0  1 &lt;span style="color: rgb(102, 102, 204);"&gt;81e36040 &lt;/span&gt;81ca1798 00000000-00000000    pending&lt;br /&gt;       *** ERROR: Module load completed but symbols could not be loaded for ser2pl.sys&lt;br /&gt;\Driver\Ser2pl&lt;br /&gt;         Args: 00000002 00000000 00000000 00000004&lt;br /&gt;1: kd&gt; !irp &lt;span style="color: rgb(51, 204, 0);"&gt;816b3710&lt;/span&gt;&lt;br /&gt;Irp is active with 5 stacks 5 is current (= 0x816b3810)&lt;br /&gt;No Mdl: System buffer=821b62f0: Thread 8169da90:  Irp stack trace.&lt;br /&gt;  cmd  flg cl Device   File     Completion-Context&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;[...]&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&gt;[  4, 0]   0  1 &lt;span style="color: rgb(204, 102, 204);"&gt;81e37040 &lt;/span&gt;81e06a78 00000000-00000000    pending&lt;br /&gt;        \Driver\Ser2pl&lt;br /&gt;         Args: 00000001 00000000 00000000 00000004&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In both cases it is the Ser2pl driver (from prolific) that it not working it's queue with status pending.&lt;br /&gt;&lt;br /&gt;But now to Bill statement that two threads are accessing the same port:&lt;br /&gt;Let's see were the data is directed to:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;1: kd&gt; !object &lt;/span&gt;&lt;span style="color: rgb(102, 102, 204);font-size:85%;" &gt;81e36040 &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Object: 81e36040  Type: (823b1958) Device&lt;br /&gt; ObjectHeader: 81e36028 (old version)&lt;br /&gt; HandleCount: 0  PointerCount: 3&lt;br /&gt; Directory Object: e10023d0  Name: &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-size:85%;" &gt;Serial3&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;1: kd&gt; !object &lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);font-size:85%;" &gt;81e37040 &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Object: 81e37040  Type: (823b1958) Device&lt;br /&gt; ObjectHeader: 81e37028 (old version)&lt;br /&gt; HandleCount: 0  PointerCount: 3&lt;br /&gt; Directory Object: e10023d0  Name: &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-size:85%;" &gt;Serial2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally we can get the port mapping:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;1: kd&gt; !object \GLOBAL??&lt;br /&gt;[...]&lt;br /&gt;  08  e1632920 SymbolicLink  COM2&lt;br /&gt;[...]&lt;br /&gt;      e1789a58 SymbolicLink  COM3&lt;br /&gt;[...]&lt;br /&gt;      e37b2e40 SymbolicLink  COM4&lt;br /&gt;[...]&lt;br /&gt;      e383d438 SymbolicLink  COM5&lt;br /&gt;&lt;br /&gt;1: kd&gt; !object e1632920&lt;br /&gt;Object: e1632920  Type: (823ed398) SymbolicLink&lt;br /&gt; ObjectHeader: e1632908 (old version)&lt;br /&gt; HandleCount: 0  PointerCount: 1&lt;br /&gt; Directory Object: e1000788  Name: COM2&lt;br /&gt; Target String is '\Device\Serial0'&lt;br /&gt;1: kd&gt; !object e1789a58&lt;br /&gt;Object: e1789a58  Type: (823ed398) SymbolicLink&lt;br /&gt; ObjectHeader: e1789a40 (old version)&lt;br /&gt; HandleCount: 0  PointerCount: 1&lt;br /&gt; Directory Object: e1000788  Name: &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;font-size:85%;"  &gt;COM3&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt; Target String is '\Device\&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;font-size:85%;"  &gt;Serial2&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;'&lt;br /&gt;1: kd&gt; !object e37b2e40&lt;br /&gt;Object: e37b2e40  Type: (823ed398) SymbolicLink&lt;br /&gt; ObjectHeader: e37b2e28 (old version)&lt;br /&gt; HandleCount: 0  PointerCount: 1&lt;br /&gt; Directory Object: e1000788  Name: &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;font-size:85%;"  &gt;COM4&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt; Target String is '\Device\&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;font-size:85%;"  &gt;Serial3&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;'&lt;br /&gt;1: kd&gt; !object e383d438&lt;br /&gt;Object: e383d438  Type: (823ed398) SymbolicLink&lt;br /&gt; ObjectHeader: e383d420 (old version)&lt;br /&gt; HandleCount: 0  PointerCount: 1&lt;br /&gt; Directory Object: e1000788  Name: COM5&lt;br /&gt; Target String is '\Device\Serial4'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So one thread was writing on to COM3 and the other to COM4. I was a bit less concerned that it was not obviously my fault but of course the problem is not gone. Now I hope to get fix from the cable supplier or select different hardware.&lt;br /&gt;I must say I  learned a lot with this case but it is not the type of issue I'm begging for!&lt;br /&gt;&lt;br /&gt;BTW: after all this investigations I found post on Marks blog about this class of defect: &lt;a href="http://blogs.technet.com/markrussinovich/archive/2005/08/17/unkillable-processes.aspx"&gt;Unkillable Processes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally a big thanks to Microsoft Support!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-4033468699942244328?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/4033468699942244328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=4033468699942244328' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/4033468699942244328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/4033468699942244328'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/02/digging-into-kernel-space.html' title='Digging into Kernel Space'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_Lghuvt1vgPY/R7LTgE-KGzI/AAAAAAAAADo/YIZh6vTqVHw/s72-c/KernelDump.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-712919771104749164</id><published>2008-02-12T09:52:00.000+01:00</published><updated>2008-02-12T10:04:31.525+01:00</updated><title type='text'>Getting the GCRoot on a range of objects</title><content type='html'>Recently I was in the situation to look at the GCRoot of a bunch of objects in a range.&lt;br /&gt;Eran &lt;a href="http://dotnetdebug.net/2005/12/04/dumpobj-on-multiple-objects/"&gt;posted&lt;/a&gt; on how to do this taks for getting detailed object information. I used this as a template for my needs:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.foreach (obj { !DumpHeap -short &lt;span style="color: rgb(51, 204, 0);"&gt;start_address end_&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(51, 204, 0);"&gt;address&lt;/span&gt; &lt;/span&gt;&lt;start_address&gt;&lt;end_address&gt;&lt;/end_address&gt;&lt;/start_address&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; &lt;start_address&gt;  &lt;end_address&gt; &lt;/end_address&gt;&lt;/start_address&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;}) { !GCRoot ${obj} }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now replace &lt;start_address style="color: rgb(51, 204, 0);"&gt;&lt;end_address&gt;&lt;/end_address&gt;&lt;/start_address&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(51, 204, 0);"&gt;start_address&lt;/span&gt; &lt;/span&gt;and&lt;span style=";font-family:courier new;font-size:85%;"  &gt; &lt;span style="color: rgb(51, 204, 0);"&gt;end_address&lt;/span&gt; &lt;/span&gt;&lt;start_address&gt;&lt;end_address&gt;with your adresses...&lt;/end_address&gt;&lt;/start_address&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-712919771104749164?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/712919771104749164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=712919771104749164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/712919771104749164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/712919771104749164'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/02/getting-gcroot-on-range-of-objects.html' title='Getting the GCRoot on a range of objects'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-9005640039500928793</id><published>2008-02-08T08:39:00.000+01:00</published><updated>2008-02-08T08:58:31.573+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Meta'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Rank four on Google for my Blog?</title><content type='html'>Today I was curious and just &lt;a href="http://www.google.com/search?q=windbg"&gt;googled for windbg.&lt;/a&gt;&lt;br /&gt;Surprisingly I noticed, that my blog got rank 4:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Lghuvt1vgPY/R6wKjHnC-QI/AAAAAAAAADg/eKXGjJvChGY/s1600-h/Windbg_Google_Rank.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_Lghuvt1vgPY/R6wKjHnC-QI/AAAAAAAAADg/eKXGjJvChGY/s320/Windbg_Google_Rank.png" alt="" id="BLOGGER_PHOTO_ID_5164514471141636354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I do not understand this, because there are lots of blogs (&lt;a href="http://blogs.msdn.com/tess/"&gt;Tess&lt;/a&gt;, &lt;a href="http://www.dumpanalysis.org/blog/"&gt;Dimtry&lt;/a&gt;, &lt;a href="http://www.wintellect.com/cs/blogs/jrobbins/default.aspx"&gt;John&lt;/a&gt; just to name three of the best) outside that earn a much higher ranking than this one. The primary intent of this blog was to extend my brain which unfortunately is easily loosing things over time. So if you should hit my blog just googling for windbg make sure to visit the blogs on my roll...&lt;br /&gt;&lt;br /&gt;BTW: Tess is currently conducting an online &lt;a href="http://blogs.msdn.com/tess/pages/net-debugging-demos-information-and-setup-instructions.aspx"&gt;training on windbg&lt;/a&gt;. Check it out...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-9005640039500928793?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/9005640039500928793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=9005640039500928793' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/9005640039500928793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/9005640039500928793'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/02/rank-four-on-google-for-my-blog.html' title='Rank four on Google for my Blog?'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Lghuvt1vgPY/R6wKjHnC-QI/AAAAAAAAADg/eKXGjJvChGY/s72-c/Windbg_Google_Rank.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1659103462058443380</id><published>2008-01-31T10:26:00.000+01:00</published><updated>2008-01-31T10:46:46.417+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Setting multiple breakpoints via wildcard pattern</title><content type='html'>Sometimes I need a break point on a specific funtion in multiple classes. Examples are the use of templates,  interfaces or inheritence.&lt;br /&gt;&lt;br /&gt;This can be easily achived via the bm (I translate as break match).&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;bm /a MyModule!!CComCollectionMap*::*get_Exists*&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will set a deferred breakpoint on every function that matches the given expression.&lt;br /&gt;It is a good idea to check the matches upfront with the following expression:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;x MyModule!!CComCollectionMap*::*get_Exists*&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to clear all currently set break points use:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;bc *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For more details refer to the very good Online Help under "bp, bu, bm (Set Breakpoint)"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1659103462058443380?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1659103462058443380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1659103462058443380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1659103462058443380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1659103462058443380'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/01/setting-multiple-breakpoints-via.html' title='Setting multiple breakpoints via wildcard pattern'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1619807573722063765</id><published>2008-01-30T11:08:00.000+01:00</published><updated>2008-01-30T13:52:08.445+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>List source lines at current scope ip</title><content type='html'>To list the source at the currently selected frame (which can be set by either the .frame command or by clicking into the call stack window) use the lsa (List Source Lines) command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; lsa @$scopeip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   578:     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   579:     ' Setting device name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   580:     If (gPrintContext.strPrinter = "") Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   581:         If (rpt.Printer.NDevices &gt; 0) Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&gt;  582:             gPrintContext.strPrinter = rpt.Printer.DeviceName&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   583:             ' "Device Name is empty hence setting it to the default printer."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   584:         Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   585:             ' the .PageSetup will show the system message&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   586:             ' "No printer installed."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   587:         End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1619807573722063765?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1619807573722063765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1619807573722063765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1619807573722063765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1619807573722063765'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/01/list-source-lines-at-current-scope-ip.html' title='List source lines at current scope ip'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1604528286006167657</id><published>2008-01-28T13:57:00.001+01:00</published><updated>2008-02-08T08:58:16.938+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Meta'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Custom Search for WinDbg</title><content type='html'>&lt;div&gt;I often came across the point where I needed to search the web for a common phrases used in very special technical manner. One example is &lt;a href="http://msdn2.microsoft.com/en-us/library/bb190764.aspx"&gt;sos&lt;/a&gt; or son of strike. If you simply search for sos you will get everything but not what you are interested in.&lt;br /&gt;&lt;br /&gt;For getting help finding the needle in the hay when it comes to windbg I created a &lt;a href="http://www.google.com/coop/cse/"&gt;Google Custom Search Engine&lt;/a&gt; for windbg.&lt;br /&gt;&lt;br /&gt;You can find the CSE &lt;a href="http://www.google.com/coop/cse?cx=018352668946159089029%3Ajx_rdg4340u&amp;amp;hl=en"&gt;here&lt;/a&gt; or directly on my page here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_Lghuvt1vgPY/R53q_nnC-PI/AAAAAAAAADU/XWrikw8tsHw/s1600-h/GoogleCustomSearchWindbg.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_Lghuvt1vgPY/R53q_nnC-PI/AAAAAAAAADU/XWrikw8tsHw/s320/GoogleCustomSearchWindbg.png" alt="" id="BLOGGER_PHOTO_ID_5160539126721870066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have additional sites for me to add, please drop a comment here....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1604528286006167657?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1604528286006167657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1604528286006167657' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1604528286006167657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1604528286006167657'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/01/google-custom-search-for-windbg.html' title='Google Custom Search for WinDbg'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_Lghuvt1vgPY/R53q_nnC-PI/AAAAAAAAADU/XWrikw8tsHw/s72-c/GoogleCustomSearchWindbg.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-6889160522953432404</id><published>2008-01-24T09:59:00.000+01:00</published><updated>2008-01-30T16:19:06.762+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>CoCreateInstance: Which object in which dll</title><content type='html'>&lt;div&gt;I came across a process that was consuming statically 25% CPU which I didn't understand why.&lt;br /&gt;So I attached windbg and issued&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;0:004&gt; !runaway&lt;br /&gt;User Mode Time&lt;br /&gt;Thread Time&lt;br /&gt; 4:328 0 days 0:07:22.015&lt;br /&gt; 0:2a0 0 days 0:00:25.078&lt;br /&gt; 5:228 0 days 0:00:00.000&lt;br /&gt; 3:324 0 days 0:00:00.000&lt;br /&gt; 2:320 0 days 0:00:00.000&lt;br /&gt;1:31c 0 days 0:00:00.000&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;So switch to that thread&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:004&gt; ~4 s&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And issue a stack dump:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;0:004&gt; kb 100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;ChildEBP RetAddr Args to Child&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;010be7a0 &lt;span style="color: rgb(0, 0, 0);"&gt;77f6946c &lt;/span&gt;&lt;span style="color: rgb(204, 51, 204);"&gt;010bec5c &lt;/span&gt;00000000 00000401 ole32!&lt;/span&gt;&lt;a style="font-family: arial;" href="http://msdn2.microsoft.com/en-us/library/ms686615%28VS.85%29.aspx"&gt;CoCreateInstance&lt;/a&gt;&lt;span style="font-family:arial;"&gt;+0x37&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;010bfe7c &lt;span style="color: rgb(0, 0, 0);"&gt;0052770f &lt;/span&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;010bfe98 &lt;/span&gt;010bfee0 0052773f shell32!&lt;/span&gt;&lt;a style="font-family: arial;" href="http://msdn2.microsoft.com/en-us/library/bb762154.aspx"&gt;ShellExecuteExA&lt;/a&gt;&lt;span style="font-family:arial;"&gt;+0x203&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So I had two questions:&lt;br /&gt;&lt;br /&gt;1.) Which process should be launched by ShellExecute&lt;br /&gt;2.) Which object should be created by CoCreateInstance&lt;br /&gt;&lt;br /&gt;ad 1.) First param passed to ShellExecute is of type &lt;a href="http://msdn2.microsoft.com/en-us/library/bb759784%28VS.85%29.aspx"&gt;LPSHELLEXECUTEINFO&lt;/a&gt;&lt;br /&gt;dt _SHELLEXECUTEINFO 010bfe98  didn't work for me although having symbol server setup correctly. So I needed the fifth pointer in the struct:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;0:004&gt; dda &lt;span style="color: rgb(51, 204, 0);"&gt;010bfe98 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;did the job:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;010bfe98  0000003c&lt;br /&gt;010bfe9c  00000440&lt;br /&gt;010bfea0  00000000&lt;br /&gt;010bfea4  00527768 "open"&lt;br /&gt;010bfea8  00527758 "Viewer.exe" &lt;== 010bfeac  00000000 &lt;/span&gt;&lt;br /&gt;ad 2.)  First param passed is of type REFCLSID or &lt;a href="http://msdn2.microsoft.com/en-us/library/aa373931%28VS.85%29.aspx"&gt;GUID&lt;/a&gt;&lt;br /&gt;Then I got it via:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;0:004&gt; dt ntdll!_GUID &lt;span style="color: rgb(204, 51, 204);"&gt;010bec5c &lt;/span&gt;&lt;br /&gt;{871c5380-42a0-1069-a2ea-08002b30309d}&lt;br /&gt;  +0x000 Data1            : 0x871c5380&lt;br /&gt;  +0x004 Data2            : 0x42a0&lt;br /&gt;  +0x006 Data3            : 0x1069&lt;br /&gt;  +0x008 Data4            : [8]  "???"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now use either regedit or more elegantly:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;0:005&gt; !dreg hkcr\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\InProcServer32\!*&lt;br /&gt;Value: "" - REG_EXPAND_SZ: "%SystemRoot%\system32\shdocvw.dll"&lt;br /&gt;expanded = "C:\WINDOWS\system32\shdocvw.dll"&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Value: "ThreadingModel" - REG_SZ: "Apartment"&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;That's it!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-6889160522953432404?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/6889160522953432404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=6889160522953432404' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6889160522953432404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6889160522953432404'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/01/cocreateinstance-which-object-in-which.html' title='CoCreateInstance: Which object in which dll'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-520474802642887189</id><published>2008-01-17T13:53:00.000+01:00</published><updated>2008-01-30T16:20:20.611+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Setting a thread sensitive Breakpoint</title><content type='html'>I just came across the problem that I needed to break at a function just in case this function is executed in one specific thread.&lt;br /&gt;&lt;br /&gt;In Visual Studio 2008 (and also earlier) you can achieve this via Breakpoint filters:&lt;br /&gt;1.) Right click on the Breakpoint and click on Filter...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Lghuvt1vgPY/R49SEmM9X3I/AAAAAAAAABs/AMQi8b6Zgvs/s1600-h/VisualStudioBPFilter1.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_Lghuvt1vgPY/R49SEmM9X3I/AAAAAAAAABs/AMQi8b6Zgvs/s320/VisualStudioBPFilter1.png" alt="" id="BLOGGER_PHOTO_ID_5156430337290362738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2.) Now specify the thread id you want to break in...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_Lghuvt1vgPY/R49Se2M9X4I/AAAAAAAAAB0/T_W9QVDyBrE/s1600-h/VisualStudioBPFilter2.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_Lghuvt1vgPY/R49Se2M9X4I/AAAAAAAAAB0/T_W9QVDyBrE/s320/VisualStudioBPFilter2.png" alt="" id="BLOGGER_PHOTO_ID_5156430788261928834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In windbg you can achieve it like this:&lt;br /&gt;&lt;br /&gt;Instead of typing:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;bp MyModule!MyClass::MyFunction+MyOffset&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;type:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;~ 13 bp MyModule!MyClass::MyFunction+MyOffset&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to break in just if this function is executed in thread with id 13&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-520474802642887189?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/520474802642887189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=520474802642887189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/520474802642887189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/520474802642887189'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/01/setting-thread-sensitive-breakpoint.html' title='Setting a thread sensitive Breakpoint'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Lghuvt1vgPY/R49SEmM9X3I/AAAAAAAAABs/AMQi8b6Zgvs/s72-c/VisualStudioBPFilter1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-50778056304539963</id><published>2008-01-17T09:56:00.000+01:00</published><updated>2008-01-30T22:43:21.155+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Extensions'/><title type='text'>Wishlist: Writing Debugger extension program in C#</title><content type='html'>In xqiu's blog I found an interesting post about &lt;a href="http://blogs.gotdotnet.com/xqiu/archive/2008/01/15/writing-debugger-extension-program-in-c.aspx"&gt;Writing Debugger extension program in C# &lt;/a&gt;. Unfortunately the mentioned mdbeng.dll is not public yet. I contacted the Debugger Team with the wish to get it. Let's see what comes...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-50778056304539963?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/50778056304539963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=50778056304539963' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/50778056304539963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/50778056304539963'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2008/01/wishlist-writing-debugger-extension.html' title='Wishlist: Writing Debugger extension program in C#'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-4753162157671691088</id><published>2007-10-30T15:18:00.000+01:00</published><updated>2008-01-30T22:58:05.411+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Failed to load data access DLL, 0x80004005 - hm</title><content type='html'>Me and some colleagues of mine recently all stumbled over the following error when analyzing .NET minidumps:&lt;br /&gt;I opened a the minidump and typed !CLRStack. What I got was:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Failed to load data access DLL, 0x80004005&lt;br /&gt;Verify that 1) you have a recent build of the debugger (6.2.14 or newer)&lt;br /&gt;          2) the file mscordacwks.dll that matches your version of mscorwks.dll is&lt;br /&gt;              in the version directory&lt;br /&gt;          3) or, if you are debugging a dump file, verify that the file&lt;br /&gt;              mscordacwks_&lt;arch&gt;_&lt;arch&gt;_&lt;version&gt;.dll is on your symbol path.&lt;br /&gt;          4) you are debugging on the same architecture as the dump file.&lt;br /&gt;              For example, an IA64 dump file must be debugged on an IA64&lt;br /&gt;              machine.&lt;br /&gt;&lt;br /&gt;You can also run the debugger command .cordll to control the debugger's&lt;br /&gt;load of mscordacwks.dll.  .cordll -ve -u -l will do a verbose reload.&lt;br /&gt;If that succeeds, the SOS command should work on retry.&lt;br /&gt;&lt;br /&gt;If you are debugging a minidump, you need to make sure that your executable&lt;br /&gt;path is pointing to mscorwks.dll as well.&lt;/version&gt;&lt;/arch&gt;&lt;/arch&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;OK, so I followed the step 1 through 4...&lt;br /&gt;ad 1) I'm using version 6.7.5.0 for good &lt;a href="http://voneinem-windbg.blogspot.com/2007/10/windbg-version-6840-is-out-im-still.html"&gt;reasons&lt;/a&gt;&lt;br /&gt;ad 2) Don't know what that means...&lt;br /&gt;ad 3) Why should a dll be in my symbol path?!?&lt;br /&gt;ad 4) The architecture is x86_32 on both machines&lt;br /&gt;&lt;br /&gt;So I tried&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:courier new;"&gt;.cordll -ve -u -l&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; .cordll -ve -u -l&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CLRDLL: Unknown processor type in image C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CLR DLL status: No load attempts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;The following sentence finally helped me:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;If you are debugging a minidump, you need to make sure that your executable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;path is pointing to mscorwks.dll as well.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;So I executed:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; lmv m mscorwks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;start    end        module name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;79e70000 7a3d6000   mscorwks T (pdb symbols)          C:\windbg\symbols\mscorwks.pdb\6D3E0DE91A284256A48A60718DC9CDEB2\mscorwks.pdb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Loaded symbol image file: mscorwks.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Image path: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Image name: mscorwks.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Timestamp:        Fri Apr 13 09:15:54 2007 (461F2E2A)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    CheckSum:         005635C7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    ImageSize:        00566000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    File version:     2.0.50727.832&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Product version:  2.0.50727.832&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    File flags:       0 (Mask 3F)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    File OS:          4 Unknown Win32&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    File type:        2.0 Dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    File date:        00000000.00000000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Translations:     0000.04b0 0000.04e0 0409.04b0 0409.04e0&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;And...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; .exepath+ C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; .reload&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;...................................................................................................................................................................................................................................................&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CLRDLL: Loaded DLL C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;And my !CLRStack worked ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-4753162157671691088?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/4753162157671691088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=4753162157671691088' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/4753162157671691088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/4753162157671691088'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/10/failed-to-load-data-access-dll.html' title='Failed to load data access DLL, 0x80004005 - hm'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1612295993105299580</id><published>2007-10-25T13:07:00.000+02:00</published><updated>2008-01-30T22:57:27.878+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><title type='text'>SOSAssist &gt;&gt; Toolbox</title><content type='html'>Tess mentioned in her recent post &lt;a href="http://blogs.msdn.com/tess/archive/2007/10/19/net-finalizer-memory-leak-debugging-with-sos-dll-in-visual-studio.aspx"&gt;'.NET Finalizer Memory Leak: Debugging with sos.dll in Visual Studio'&lt;/a&gt; a tool named &lt;a href="http://old.thinktecture.com/SOSAssist/default.html"&gt;SOSAssis&lt;/a&gt; written by &lt;a href="http://old.thinktecture.com/staff/ingo/default.html"&gt;Ingo Rammer&lt;/a&gt;. I was curious, clicked on the link and looked at the &lt;a href="http://old.thinktecture.com/SOSAssist/Screenshots.htm"&gt;screenshots&lt;/a&gt;.&lt;br /&gt;I couldn't believe that there is a tool out there that eases .NET production debugging in such a way. If you ever walked down the objects tree via sos commands you will get tears in your eyes when you look at the Stack Objects window!!!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Lghuvt1vgPY/RyB_3XptzNI/AAAAAAAAABk/C2OIJ6EUsC0/s1600-h/SOSAssist_StackObjects.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_Lghuvt1vgPY/RyB_3XptzNI/AAAAAAAAABk/C2OIJ6EUsC0/s320/SOSAssist_StackObjects.png" alt="" id="BLOGGER_PHOTO_ID_5125236965166140626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;[click to enlarge...]&lt;br /&gt;&lt;br /&gt;I &lt;a href="http://www.google.com/search?q=sosassist+rammer"&gt;googled&lt;/a&gt; for sosassist and rammer and just got 4 relevant hits?!&lt;br /&gt;&lt;br /&gt;So I needed to update on this after my very first look at the tool as I'm totally amazed! This thing should be in the toolbox of every .NET developer.&lt;br /&gt;&lt;br /&gt;Next I will follow up on this tool soon with more experiences.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1612295993105299580?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1612295993105299580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1612295993105299580' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1612295993105299580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1612295993105299580'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/10/sosassist-toolbox.html' title='SOSAssist &gt;&gt; Toolbox'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Lghuvt1vgPY/RyB_3XptzNI/AAAAAAAAABk/C2OIJ6EUsC0/s72-c/SOSAssist_StackObjects.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-816186560017050942</id><published>2007-10-23T09:33:00.000+02:00</published><updated>2008-01-30T22:45:08.861+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Releases'/><title type='text'>Windbg version 6.8.4.0 is out (I'm still keeping 6.7.5.0)</title><content type='html'>Microsoft released a new version of &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx/"&gt;Debugging Tools for Windows&lt;/a&gt; (containing Windbg). The &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/whatsnew.mspx"&gt;Highlights&lt;/a&gt; in Version 6.8.4.0 are very roughly described. Still the &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;integrated .NET Support&lt;/a&gt; that came up with version 6.7.5.0 by accident (see Pat Styles [MSFT] comment in this &lt;a href="http://www.eggheadcafe.com/software/aspnet/30425514/windbg-and-sos-20--wher.aspx"&gt;post&lt;/a&gt;) is not available.&lt;br /&gt;Luckily different versions of windbg can be installed side by side (via XCopy) and I'm keeping my 6.7.5.0 for managed debugging as it works pretty well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-816186560017050942?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/816186560017050942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=816186560017050942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/816186560017050942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/816186560017050942'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/10/windbg-version-6840-is-out-im-still.html' title='Windbg version 6.8.4.0 is out (I&apos;m still keeping 6.7.5.0)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-3979724100688222735</id><published>2007-08-13T14:57:00.000+02:00</published><updated>2008-01-30T22:45:58.687+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Symbol table tab completion</title><content type='html'>I just stumbled over a feature which is either new or I didn't realize before.&lt;br /&gt;It is support of tab completion in the command window.&lt;br /&gt;&lt;br /&gt;When I'm going to set a breakpoint I normall execute an 'x' command with a good guess about the signature:&lt;br /&gt;E.g. :&lt;br /&gt;&lt;br /&gt;x kernel32!*ToWideChar&lt;br /&gt;&lt;br /&gt;Giving:&lt;br /&gt;7c809bf8 kernel32!MultiByteToWideChar = &lt;no&gt;&lt;br /&gt;&lt;br /&gt;Then I can set the breakpoint either by:&lt;br /&gt;bp 7c809bf8&lt;br /&gt;or&lt;br /&gt;bp kernel32!MultiByteToWideChar&lt;br /&gt;&lt;br /&gt;Now by accident (I'm used to that from the console) I wrote just a few letters and pressed the tab key and surprise windbg did the rest ;-)&lt;br /&gt;&lt;br /&gt;Try the following:&lt;br /&gt;&lt;br /&gt;1.) bp ker&lt;2*tab&gt; gives bp kernel32!&lt;br /&gt;2.) bp kernel32!Mul&lt;tab&gt; gives bp kernel32!MultiByteToWideChar&lt;br /&gt;3.) &lt;return&gt; and the breakpoint is set&lt;br /&gt;&lt;br /&gt;Those little enhancements can significantly make your life easier.&lt;br /&gt;&lt;br /&gt;I observed it with windbg 6.7.5.1. Please tell me if it was there before and I'm telling old stories.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Volker&lt;br /&gt;&lt;br /&gt;...&lt;/return&gt;&lt;/tab&gt;&lt;/no&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-3979724100688222735?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/3979724100688222735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=3979724100688222735' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3979724100688222735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3979724100688222735'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/08/symbol-table-tab-completion.html' title='Symbol table tab completion'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-3285643697918051119</id><published>2007-07-09T10:55:00.000+02:00</published><updated>2008-01-30T22:46:19.358+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Releases'/><title type='text'>First look at windbg 6.7.5.1 disappointing</title><content type='html'>As Dmitry just &lt;a href="http://www.dumpanalysis.org/blog/index.php/2007/07/08/windbg-update-6751/"&gt;mentioned&lt;/a&gt; a new version of windbg, I downloaded and installed it. I was curious, if the new version will provide better support for managed dumps as i could see big &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;improvements&lt;/a&gt; in the last version.&lt;br /&gt;&lt;br /&gt;So I loaded my standard managed crash dump file and...&lt;br /&gt;where version 6.7.5.0 delivered nicely the stack by 'k':&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;0:000&gt; k *** Stack trace for last set context - .thread/.cxr resets itChildEBP RetAddr 0012f094 00db0581 Demo1!&lt;span style="color: rgb(255, 0, 0);"&gt;Demo1._FormDemo1.ItsNorMe()+0x44 [E:\My Projects\TechChannel\Demo1\Demo1\Form1.cs @ 36]0012f094 00db054d Demo1!Demo1._FormDemo1.ItsNeitherMe()+0x19 [E:\My Projects\TechChannel\Demo1\Demo1\Form1.cs @ 28]0012f094 7b060a6b Demo1!Demo1._FormDemo1.button1_Click(System.Object, System.EventArgs)+0x1d [E:\My Projects\TechChannel\Demo1&lt;/span&gt;\Demo1\Form1.cs @ 23]0012f094 7b105379 System_Windows_Forms_ni!System.Windows.Forms.Control.OnClick(System.EventArgs)+0x570012f094 7b10547f System_Windows_Forms_ni!System.Windows.Forms.Button.OnClick(System.EventArgs)+0x490012f094 7b0d02d2 System_Windows_Forms_ni!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)+0xc30012f094 7b072c74 System_Windows_Forms_ni!System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)+0xf20012f100 7b0815a6 System_Windows_Forms_ni!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)+0x5440012f13c 7b0814c3 System_Windows_Forms_ni!System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)+0xce0012f19c 7b07a72d System_Windows_Forms_ni!System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)+0x2b0012f19c 7b07a706 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)+0xd0012f19c 7b07a515 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)+0xd60012f19c 00342124 System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)+0x75WARNING: Frame IP not in any known module. Following frames may be wrong.0012f1c0 7e418734 0x3421240012f1ec 7e418816 user32!InternalCallWinProc+0x280012f254 7e4189cd user32!UserCallWinProcCheckWow+0x1500012f2b4 7e418a10 user32!DispatchMessageWorker+0x3060012f2c4 00f20e4e user32!DispatchMessageW+0xf0012f2e0 7b084766 CLRStub[StubLinkStub]@f20e4e0012f398 7b08432d System_Windows_Forms_ni!System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)+0x2ea&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I now get this with the new version:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;0:000&gt; k *** Stack trace for last set context - .thread/.cxr resets itChildEBP RetAddr WARNING: Frame IP not in any known module. Following frames may be wrong.0012f094 7b072c74 0xdb05dc0012f100 7b0815a6 &lt;span style="color: rgb(255, 0, 0);"&gt;System_Windows_Forms_ni+0xa2c740012f13c 7b0814c3 System_Windows_Forms_ni+0xb15a60012f1c0 7e418734 System_Windows_Forms_ni+0xb14c30012f1ec 7e418816 user32!InternalCallWinProc+0x280012f254 7e4189cd user32!&lt;/span&gt;UserCallWinProcCheckWow+0x1500012f2b4 7e418a10 user32!DispatchMessageWorker+0x3060012f2c4 00f20e4e user32!DispatchMessageW+0xf0012f2e0 7b084766 0xf20e4e0012f398 7b08432d System_Windows_Forms_ni+0xb47660012f408 7b08416b System_Windows_Forms_ni+0xb432d0012f438 7b0c69fe System_Windows_Forms_ni+0xb416b0012f480 79e88f63 System_Windows_Forms_ni+0xf69fe0012f490 79e88ee4 mscorwks!CallDescrWorker+0x330012f510 79e88e31 mscorwks!CallDescrWorkerWithHandler+0xa30012f650 79e88d19 mscorwks!MethodDesc::CallDescr+0x19c0012f668 79e88cf6 mscorwks!MethodDesc::CallTargetWorker+0x200012f67c 79f084b0 mscorwks!MethodDescCallSite::Call+0x180012f7e0 79f082a9 mscorwks!ClassLoader::RunMain+0x2200012fa48 79f0817e mscorwks!Assembly::ExecuteMainMethod+0xa6 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Needless to say that the 'Calls' window does show the same and there is no click on a frame that brings to directly to the sources :-(&lt;/p&gt;&lt;p&gt;'!DumpStack -ee'  still works, but this didn't change...&lt;/p&gt;&lt;p&gt;Resume: I will try the see the new improvements but I will not uninstall 6.7.5.0!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-3285643697918051119?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/3285643697918051119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=3285643697918051119' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3285643697918051119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3285643697918051119'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/07/first-look-at-windbg-6751-disappointing.html' title='First look at windbg 6.7.5.1 disappointing'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-7070931633387595231</id><published>2007-06-25T13:22:00.000+02:00</published><updated>2008-01-30T22:49:01.531+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Scan the full process memory for a pattern</title><content type='html'>Very often I need to scan the process memory for a specific pattern.&lt;br /&gt;This can be either a pointer or a string or whatever and I want to find out, which other memory references this pointer or pattern.&lt;br /&gt;&lt;br /&gt;Simply type ''s -d 0x00000000 L?0xffffffff &lt;dword&gt;' to find a referenced pointer on a x32 architecture.&lt;br /&gt;&lt;br /&gt;E.g.:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0:000&gt; s -d 0x00000000 L?0xffffffff &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt;&lt;br /&gt;0012b2b0 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 00000000 00000000 00000000 ...0............&lt;br /&gt;0012b2f8 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 9955d404 0badf00d 3e4d1f74 ...0..U.....t.M&gt;&lt;br /&gt;0012b340 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 3e4d1f70 9955d450 0badf00d ...0p.M&gt;P.U.....&lt;br /&gt;0012b374 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 3e4d1f70 9955d49c 00000001 ...0p.M&gt;..U.....&lt;br /&gt;3e4d1f7c &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 00000000 00000000 00000001 ...0............&lt;br /&gt;3e4d1f90 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 00000000 00000000 00000000 ...0............&lt;br /&gt;3e4d1fd0 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 30c5bf9c 00000000 00000001 ...0...0........&lt;br /&gt;3e4d1fd4 &lt;span style="color: rgb(255, 0, 0);"&gt;30c5bf9c&lt;/span&gt; 00000000 00000001 33522fc0 ...0........./R3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first column lists the locations that matched the pattern.&lt;br /&gt;&lt;br /&gt;For more information refer to windbg online help: s (Search Memory)&lt;/dword&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-7070931633387595231?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/7070931633387595231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=7070931633387595231' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7070931633387595231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7070931633387595231'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/06/scan-full-process-memory-for-pattern.html' title='Scan the full process memory for a pattern'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-6112911529878654930</id><published>2007-06-19T14:20:00.000+02:00</published><updated>2008-01-30T22:58:36.501+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><category scheme='http://www.blogger.com/atom/ns#' term='Extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><title type='text'>New must-have Windbg extension SOSEX</title><content type='html'>John Robbins &lt;a href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/06/19/great-sosex-a-phenomenal-net-debugging-extension-to-see-the-hard-stuff-steve-johnson-is-my-hero.aspx"&gt;latest blog post&lt;/a&gt; pointed me to a new Windbg extension &lt;a href="http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx"&gt;SOSEX&lt;/a&gt; written by Steve Johnson. This extension greatly simplifies many tasks that are tedious to achive with original SOS extension provided by Microsoft.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-6112911529878654930?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/6112911529878654930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=6112911529878654930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6112911529878654930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6112911529878654930'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/06/new-must-have-windbg-extension-sosex.html' title='New must-have Windbg extension SOSEX'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1084355158475813651</id><published>2007-06-18T12:37:00.000+02:00</published><updated>2008-01-30T22:50:36.814+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Root Out Elusive Production Bugs with These Effective Techniques</title><content type='html'>Reading Matt Adams &lt;a href="http://mattadamson.blogspot.com/"&gt;Blog&lt;/a&gt; latest Post brought me to an interesting &lt;a href="http://msdn.microsoft.com/msdnmag/issues/05/07/Debugging/"&gt;article&lt;/a&gt; called "Root Out Elusive Production Bugs with These Effective Techniques" which I would suggest as possible starting point getting familiar with windbg.&lt;br /&gt;&lt;br /&gt;Contents:&lt;br /&gt;&lt;br /&gt;Debugging Tools for Windows&lt;br /&gt;Using ADPlus&lt;br /&gt;Debugging Symbols&lt;br /&gt;First-Chance Exceptions&lt;br /&gt;Unmanaged First-Chance Exceptions&lt;br /&gt;Managed First-Chance Exception&lt;br /&gt;Unmanaged Thread Executing Endlessly&lt;br /&gt;Managed Thread Executing Endlessly&lt;br /&gt;Deadlocks&lt;br /&gt;Unmanaged Deadlock Application&lt;br /&gt;Managed Deadlock Application&lt;br /&gt;Crashing&lt;br /&gt;Conclusion&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1084355158475813651?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1084355158475813651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1084355158475813651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1084355158475813651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1084355158475813651'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/06/root-out-elusive-production-bugs-with.html' title='Root Out Elusive Production Bugs with These Effective Techniques'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-6021760884382637607</id><published>2007-06-18T11:32:00.000+02:00</published><updated>2008-01-30T22:51:03.003+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>New Debugging Blog hosted by the Microsoft Critical Problem Resolution (CPR) Platforms Team</title><content type='html'>&lt;a href="http://www.google.com/alerts"&gt;Google Alerts&lt;/a&gt; on keyword 'windbg' delivered me an interesting new blog hosted by the &lt;a href="http://blogs.msdn.com/ntdebugging/about.aspx"&gt;Microsoft Critical Problem Resolution (CPR) Platforms Team&lt;/a&gt;. Especially the article '&lt;a id="ctl00___ctl00___ctl01___Results___postlist___EntryItems_ctl00_PostTitle" href="http://blogs.msdn.com/ntdebugging/archive/2007/06/15/this-button-doesn-t-do-anything.aspx"&gt;This button doesn’t do anything!&lt;/a&gt;'  got my interest as I needed to do nearly the same thing some days ago. This will definitely go onto by blog roll.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-6021760884382637607?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/6021760884382637607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=6021760884382637607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6021760884382637607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6021760884382637607'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/06/new-debugging-blog-hosted-by-microsoft.html' title='New Debugging Blog hosted by the Microsoft Critical Problem Resolution (CPR) Platforms Team'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-8551687074321075283</id><published>2007-06-18T11:22:00.000+02:00</published><updated>2008-01-30T22:51:28.084+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='VB6'/><title type='text'>Getting VB6 Err Object from a dump</title><content type='html'>Once again (sigh) looking at vb6 crash dumps I found this very interesting article from &lt;a href="http://mattadamson.blogspot.com/"&gt;Matt Adamson&lt;/a&gt; about &lt;a href="http://mattadamson.blogspot.com/2005/08/visual-basic-production-debugging.html"&gt;Visual Basic Production Debugging&lt;/a&gt;. He did a great job reversing data structures used by VB6 error handling. When you need to get the VB6 Err Object information from a crash dump you should read it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-8551687074321075283?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/8551687074321075283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=8551687074321075283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8551687074321075283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8551687074321075283'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/06/getting-vb6-err-object-from-dump.html' title='Getting VB6 Err Object from a dump'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-3007151772758347607</id><published>2007-05-30T11:39:00.000+02:00</published><updated>2008-01-30T22:51:46.526+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Meta'/><title type='text'>John Robbins blogged me!</title><content type='html'>&lt;a href="http://www.wintellect.com/TechnicalBioDetail.aspx?Tech=4"&gt;John Robbins&lt;/a&gt;, the author of the must read &lt;a href="http://www.wintellect.com/BookInformation.aspx?ASIN=0735622027"&gt;book&lt;/a&gt; 'Debugging .NET 2.0 Applications', blogged me in his latest &lt;a href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/05/16/windbg-starts-to-show-a-little-clr-love-finally.aspx"&gt;post&lt;/a&gt; :-)&lt;br /&gt;&lt;br /&gt;I was very excited to read, that he considered my blog as 'excellent'. But I must say, that I have a different understanding about this adjective.&lt;br /&gt;&lt;br /&gt;First I must say that Johns book is 'excellent' and every developer should read it, beacuse it's not just about fixing what is already broken, it's very focused on avoiding errors in the first place.&lt;br /&gt;&lt;br /&gt;Secondly, if you want to read an 'excellent' blog about windbg goto &lt;a href="http://blogs.msdn.com/tess/"&gt;Tess&lt;/a&gt;. This blog is 'excellent'.&lt;br /&gt;&lt;br /&gt;Finally this might be a matter of culture. I think my blog is something away from 'excellent', but I hope some day I get near to it. I'm a european and we seem to have a different scale ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-3007151772758347607?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/3007151772758347607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=3007151772758347607' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3007151772758347607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/3007151772758347607'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/05/john-robbins-blogge-me.html' title='John Robbins blogged me!'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1260411701556093574</id><published>2007-05-29T11:14:00.000+02:00</published><updated>2008-01-30T22:52:16.092+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>Creating and analyzing minidumps in .NET production applications (continued)</title><content type='html'>In my &lt;a href="http://voneinem-windbg.blogspot.com/2007/03/creating-and-analyzing-minidumps-in-net.html"&gt;previous&lt;/a&gt; post I delivered a small receipt how to create and analyze minidumps from .NET applications. Then I &lt;a href="http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html"&gt;discovered&lt;/a&gt; that version 6.7.5.0 of windbg shows some nice integrations of sos. Now, I was curious if the same integration also works for crash dumps and it does:&lt;br /&gt;Opening a crash dump and processing .ecxr brings me directly to the source code line, without much peeking and poking:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_Lghuvt1vgPY/Rlvyr31j_FI/AAAAAAAAAAs/arDtqoTXSJU/s1600-h/image3.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5069912641072528466" style="width: 622px; height: 414px;" alt="" src="http://bp3.blogger.com/_Lghuvt1vgPY/Rlvyr31j_FI/AAAAAAAAAAs/arDtqoTXSJU/s320/image3.png" border="0" height="330" width="454" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;Only thing, I discovered: When I did a 'analyze -v' windbg crashed - reliably!&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1260411701556093574?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1260411701556093574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1260411701556093574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1260411701556093574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1260411701556093574'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/05/creating-and-analyzing-minidumps-in-net.html' title='Creating and analyzing minidumps in .NET production applications (continued)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_Lghuvt1vgPY/Rlvyr31j_FI/AAAAAAAAAAs/arDtqoTXSJU/s72-c/image3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-686786045899147207</id><published>2007-05-15T09:07:00.000+02:00</published><updated>2008-01-30T22:59:31.273+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Borland'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>Oh Borland, oh Microsoft, oh boy</title><content type='html'>What a wonderful world would it be, if you could develop your applications just on a single frameworks. Reality looks different. Me and many others need to cope with applications constructed from MSVC + or - MFC, VB6, Borland C++ and/or Delphi and other frameworks.&lt;br /&gt;At first it looks like there is a more or less seamless integration possible. Later you discover all those little nasty glitches. In this post I will cover one of those glitches I really didn't know how to solve it but were I finally found a strange solution which I want to share.&lt;br /&gt;&lt;br /&gt;To demonstrate the problem create a small C# application like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; CLRvsBorland&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Program&lt;br /&gt;{&lt;br /&gt;[DllImport(&lt;span class="str"&gt;"kernel32.dll"&lt;/span&gt;, CharSet = CharSet.Auto)]&lt;br /&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; IntPtr LoadLibrary(&lt;span class="kwrd"&gt;string&lt;/span&gt; lpFileName);&lt;br /&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main()&lt;br /&gt;{&lt;br /&gt;IntPtr res = LoadLibrary(&lt;span class="str"&gt;@"CC3250MT.DLL"&lt;/span&gt;);&lt;br /&gt;&lt;span class="rem"&gt;//try&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//{&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//// Throw an exception..&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//throw new Exception();&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//}&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//catch&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//{&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//// .. and just catch it&lt;/span&gt;&lt;span class="rem"&gt;&lt;br /&gt;//}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Double a1 = Double.NaN;&lt;br /&gt;MessageBox.Show(&lt;span class="str"&gt;"Doh"&lt;/span&gt; + a1.CompareTo(Double.NaN).ToString());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When you start it in the debugger, you will get the following exception at instruction 'a1.CompareTo(Double.NaN)':&lt;br /&gt;&lt;br /&gt;System.ArithmeticException was unhandled&lt;br /&gt;Message="Overflow or underflow in the arithmetic operation."&lt;br /&gt;Source="mscorlib"&lt;br /&gt;StackTrace:&lt;br /&gt;at System.Double.CompareTo(Double value)&lt;br /&gt;[...]&lt;br /&gt;at System.Threading.ThreadHelper.ThreadStart()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now remove the comments - and surprise - it works!&lt;br /&gt;&lt;br /&gt;I don't know, how it works. I assume it has to do with the order of jit-ing.&lt;br /&gt;Explanations are highly wellcome ;-)&lt;br /&gt;&lt;br /&gt;Update: Explanation found! Please have a look into the first 2 comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-686786045899147207?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/686786045899147207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=686786045899147207' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/686786045899147207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/686786045899147207'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/05/oh-borland-oh-microsoft-oh-boy.html' title='Oh Borland, oh Microsoft, oh boy'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-8387868549705838901</id><published>2007-05-02T15:12:00.000+02:00</published><updated>2008-01-30T22:53:58.639+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Calling functions and methods</title><content type='html'>&lt;p&gt;Great article from Raymond Chen about calling functions and methods in a windbg debugging session. Must read!&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/oldnewthing/archive/2007/04/27/2292037.aspx"&gt;http://blogs.msdn.com/oldnewthing/archive/2007/04/27/2292037.aspx&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-8387868549705838901?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/8387868549705838901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=8387868549705838901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8387868549705838901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8387868549705838901'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/05/calling-functions-and-methods.html' title='Calling functions and methods'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-8239599799862387644</id><published>2007-04-27T12:55:00.000+02:00</published><updated>2008-01-30T22:54:22.163+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Releases'/><title type='text'>Windbg 6.7.5.0 released</title><content type='html'>&lt;p&gt;A long awaited new release of windbg is available. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx"&gt;http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The greates thing, I observed so far, is the embedded support of SOS which I didn't see in the new features list. There is no direct need to call !CLRStack or !DumpStack as the managed (along with the unmanaged) stack get's listed in the 'Calls' Window ;-)&lt;/p&gt;&lt;p&gt;And I couln't believe - a click on the frame brought me directly to the source code :-) :-) :-)&lt;/p&gt;&lt;p&gt;Only this thing that didn't work is the locals window. Then I get the message:&lt;/p&gt;&lt;p&gt;Integrated managed debugging does not support enumeration of local variables.See &lt;a href="http://dbg/managed.htm"&gt;http://dbg/managed.htm&lt;/a&gt; for more details.&lt;/p&gt;&lt;p&gt;But in &lt;a class="ln" href="http://groups.google.com/group/microsoft.public.windbg"&gt;microsoft.public.windbg&lt;/a&gt; no one (at Microsoft) wanted to comment on this:&lt;/p&gt;&lt;p&gt;&lt;a href="http://groups.google.com/group/microsoft.public.windbg/browse_frm/thread/85afed79ee62854f/"&gt;http://groups.google.com/group/microsoft.public.windbg/browse_frm/thread/85afed79ee62854f/&lt;/a&gt;#&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Anyways - I like the new windbg.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-8239599799862387644?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/8239599799862387644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=8239599799862387644' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8239599799862387644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8239599799862387644'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/04/windbg-6750-released.html' title='Windbg 6.7.5.0 released'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1773416325408726497</id><published>2007-03-22T18:04:00.000+01:00</published><updated>2008-01-30T22:56:10.648+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>Creating and analyzing minidumps in .NET production applications</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:180%;"&gt;Preface:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;Identifying the source of an error in production applications can be hard task. There are simple errors that can be reproduced with a 'steps to repeat' receipt. Other errors, that are logged as one time only or sporadic are much more difficult. In order to adress them, you can spent tons of time to find a way to create the bug and possibly you will never succeed. In deep this does not mean that this defect does not exist! It is just a matter of probability until it reoccurs. So it is aimed to catch that thing at the first occurrence and gather as much information as reasonable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;How to setup: &lt;/span&gt;&lt;br /&gt;First you must make sure your build creates pdbs for all release binaries. Those need to be checked in or sent to a symbol server.&lt;br /&gt;Next thing to do, is to catch all unhandled exceptions:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomainUnhandledException); (*)&lt;br /&gt;Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(*) needs&lt;br /&gt;[SecurityPermission(SecurityAction.Demand,ControlAppDomain=true)]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the exception handler, which is ideally ONE function, you need to implement the user notification and the dump generation:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;private static void HandleException(Exception ex)&lt;br /&gt;{&lt;br /&gt;if (ex == null)&lt;br /&gt;return;&lt;br /&gt;// ExceptionPolicy.HandleException(ex, "Default Policy");&lt;br /&gt;MessageBox.Show("An unhandled exception occurred, and the application is terminating. For more information, see your Application event log.");&lt;br /&gt;CCLRDump.Dump();&lt;br /&gt;Application.Exit();&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will notice two specialities in this function.&lt;br /&gt;One is the commented 'ExceptionPolicy.HandleException(ex, "Default Policy");'. This refers to &lt;a href="http://msdn2.microsoft.com/en-us/library/ms954830.aspx"&gt;Exception Handling Application Block&lt;/a&gt; which can be greatly combined with this mechanism.&lt;br /&gt;The other thing is "CCLRDump.Dump();" This is a wrapper class around &lt;a href="http://www.debuginfo.com/tools/clrdump.html"&gt;ClrDump (© Oleg Starodumov, 2004 - 2006 )&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The implementation is fairly easy :&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;[Flags]&lt;br /&gt;enum MINIDUMP_TYPE {&lt;br /&gt;MiniDumpNormal = 0x00000000,&lt;br /&gt;MiniDumpWithDataSegs = 0x00000001,&lt;br /&gt;MiniDumpWithFullMemory = 0x00000002,&lt;br /&gt;MiniDumpWithHandleData = 0x00000004,&lt;br /&gt;MiniDumpFilterMemory = 0x00000008,&lt;br /&gt;MiniDumpScanMemory = 0x00000010,&lt;br /&gt;MiniDumpWithUnloadedModules = 0x00000020,&lt;br /&gt;MiniDumpWithIndirectlyReferencedMemory = 0x00000040,&lt;br /&gt;MiniDumpFilterModulePaths = 0x00000080,&lt;br /&gt;MiniDumpWithProcessThreadData = 0x00000100,&lt;br /&gt;MiniDumpWithPrivateReadWriteMemory = 0x00000200,&lt;br /&gt;MiniDumpWithoutOptionalData = 0x00000400,&lt;br /&gt;MiniDumpWithFullMemoryInfo = 0x00000800,&lt;br /&gt;MiniDumpWithThreadInfo = 0x00001000,&lt;br /&gt;MiniDumpWithCodeSegs = 0x00002000,&lt;br /&gt;MiniDumpWithoutManagedState = 0x00004000,&lt;br /&gt;};&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;[...]&lt;br /&gt;[DllImport("clrdump.dll", CharSet = CharSet.Unicode, SetLastError = true)]&lt;br /&gt;private static extern Int32 CreateDump(Int32 ProcessId, string FileName,&lt;br /&gt;Int32 DumpType, Int32 ExcThreadId, IntPtr ExtPtrs);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;public static void Dump()&lt;br /&gt;{&lt;br /&gt;IntPtr pEP = System.Runtime.InteropServices.Marshal.GetExceptionPointers();&lt;br /&gt;CreateDump(&lt;br /&gt;System.Diagnostics.Process.GetCurrentProcess().Id,&lt;br /&gt;@"C:\temp\test.dmp",&lt;br /&gt;(Int32)MINIDUMP_TYPE.MiniDumpWithFullMemory,&lt;br /&gt;AppDomain.GetCurrentThreadId(),&lt;br /&gt;pEP);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ok, now we have setup everything to catch all the nasty stuff, that can happen in our application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Analyzing those MiniDumps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[please read this &lt;a href="http://voneinem-windbg.blogspot.com/2007/05/creating-and-analyzing-minidumps-in-net.html"&gt;post&lt;/a&gt;, before moving on...]&lt;br /&gt;&lt;br /&gt;In order to analyze those special minidumps some magic is needed. There are several blog posts, articles, books, etc. about how to deal with Dumps in managed and unmanaged manner. I will list some of them I found very supporting at the end of this post. As the most common question is: "Where is the source of ^%!&amp;amp;@ exception" I will deal with that:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open the crash dump in Windbg&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_Lghuvt1vgPY/RgOKd8Jp9FI/AAAAAAAAAAU/pboi3w0UBM8/s1600-h/OpenDump.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5045028254552552530" style="" alt="" src="http://bp1.blogger.com/_Lghuvt1vgPY/RgOKd8Jp9FI/AAAAAAAAAAU/pboi3w0UBM8/s320/OpenDump.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Make sure you have the correct symbol path (currently no symbol server as 6.6.7.5 has a bad &lt;a href="http://groups.google.com/group/microsoft.public.windbg/browse_frm/thread/55d176187e2cb492/914678c1b6697522#914678c1b6697522"&gt;bug &lt;/a&gt;with symbol loading - instead use C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\symbols\) and image path. Type .reload to get the correct symbols.&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_Lghuvt1vgPY/RgOK-8Jp9HI/AAAAAAAAAAk/frEewjo4TNY/s1600-h/ImgPath.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5045028821488235634" style="" alt="" src="http://bp1.blogger.com/_Lghuvt1vgPY/RgOK-8Jp9HI/AAAAAAAAAAk/frEewjo4TNY/s320/ImgPath.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;a href="http://bp1.blogger.com/_Lghuvt1vgPY/RgOK58Jp9GI/AAAAAAAAAAc/yCXQif01ztg/s1600-h/SymPath.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5045028735588889698" style="" alt="" src="http://bp1.blogger.com/_Lghuvt1vgPY/RgOK58Jp9GI/AAAAAAAAAAc/yCXQif01ztg/s320/SymPath.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Load correct sos (Son of Strike): .loadby sos mscorwks&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;em&gt;0:000&gt; .loadby &lt;/em&gt;sos&lt;em&gt; mscorwks&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;!Threads gives you on overview of managed threads (with exceptions)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;em&gt;0:000&gt; !&lt;/em&gt;Threads&lt;em&gt;&lt;br /&gt;ThreadCount: 2&lt;br /&gt;UnstartedThread: 0&lt;br /&gt;BackgroundThread: 1&lt;br /&gt;PendingThread: 0&lt;br /&gt;DeadThread: 0&lt;br /&gt;Hosted Runtime: no&lt;br /&gt;&lt;br /&gt;ID OSID ThreadOBJ State GC Context Domain Count APT Exception&lt;br /&gt;0 1 1224 001506c0 6020 Enabled 00000000:00000000 0014e808 0 STA &lt;/em&gt;&lt;em&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;System.NullReferenceException (0138fec8)&lt;br /&gt;&lt;/span&gt;2 2 153c 00156158 b220 Enabled 00000000:00000000 0014e808 0 MTA (Finalizer)&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;!pe will dump the last exception on the current thread. Unfortunately this will just give you the function name and not the source line - but with some effort, we can extract this information... For now remember the IP address of the function that threw (we need this later)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;0:000&gt; !pe&lt;br /&gt;Exception object: 0138fec8&lt;br /&gt;Exception type: System.NullReferenceException&lt;br /&gt;Message: Object reference not set to an instance of an object.&lt;br /&gt;InnerException: &lt;none&gt;&lt;br /&gt;StackTrace (generated):&lt;br /&gt;SP IP Function&lt;br /&gt;0012EFF0 &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;00DB04AD&lt;/strong&gt;&lt;/span&gt; Demo1._FormDemo1.ItsNorMe()&lt;br /&gt;0012F000 00DB0451 Demo1._FormDemo1.ItsNeitherMe()&lt;br /&gt;0012F008 00DB041D Demo1._FormDemo1.button1_Click(System.Object, System.EventArgs)&lt;br /&gt;0012F018 7B060A6B System.Windows.Forms.Control.OnClick(System.EventArgs)&lt;br /&gt;0012F028 7B105379 System.Windows.Forms.Button.OnClick(System.EventArgs)&lt;br /&gt;0012F034 7B10547F System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)&lt;br /&gt;0012F058 7B0D02D2 System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)&lt;br /&gt;0012F0A4 7B072C74 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)&lt;br /&gt;0012F108 7B0815A6 System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)&lt;br /&gt;0012F144 7B0814C3 System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)&lt;br /&gt;0012F14C 7B07A72D System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)&lt;br /&gt;0012F150 7B07A706 System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)&lt;br /&gt;0012F164 7B07A515 System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)&lt;br /&gt;&lt;/none&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;!DumpStack will give you full stack trace with all managed and unmanaged frames (pretty large...). In this stack search for "====&gt; Exception cxr@" and remember the return adress (2nd adress from the beginning)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;0:000&gt;&lt;br /&gt;0:000&gt; !DumpStack&lt;br /&gt;OS Thread Id: 0x1224 (0)&lt;br /&gt;Current frame: ntdll!KiFastSystemCallRet&lt;br /&gt;ChildEBP &lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;RetAddr&lt;/span&gt;&lt;/strong&gt; Caller,Callee&lt;br /&gt;[... lots of stuff ...]&lt;br /&gt;0012eff0 &lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;00db04ac&lt;/span&gt;&lt;/strong&gt; (MethodDesc 0xa25aa8 +0x44 Demo1._FormDemo1.ItsNorMe()) ====&gt; Exception cxr@12ed24&lt;br /&gt;[... lots of stuff ...]&lt;br /&gt;0012eff8 00db0451 (MethodDesc 0xa25aa0 +0x19 Demo1._FormDemo1.ItsNeitherMe()), calling 00a264d8&lt;br /&gt;0012f000 00db041d (MethodDesc 0xa25a98 +0x1d Demo1._FormDemo1.button1_Click(System.Object, System.EventArgs)), calling 00a264c4&lt;br /&gt;0012f00c 7b060a6b (MethodDesc 0x7b4a6598 +0x57 System.Windows.Forms.Control.OnClick(System.EventArgs))&lt;br /&gt;0012f020 7b105379 (MethodDesc 0x7b5ab788 +0x49 System.Windows.Forms.Button.OnClick(System.EventArgs)), calling (MethodDesc 0x7b4a6598 +0 System.Windows.Forms.Control.OnClick(System.EventArgs))&lt;br /&gt;0012f02c 7b10547f (MethodDesc 0x7b5ab798 +0xc3 System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs))&lt;br /&gt;0012f050 7b0d02d2 (MethodDesc 0x7b5a59d8 +0xf2 System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32))&lt;br /&gt;0012f094 7b072c74 (MethodDesc 0x7b5a5a50 +0x544 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)), calling (MethodDesc 0x7b5a59d8 +0 System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32))&lt;br /&gt;0012f100 7b0815a6 (MethodDesc 0x7b5aba60 +0xce System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)), calling (MethodDesc 0x7b5a5a50 +0 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef))&lt;br /&gt;0012f128 7b07a608 (MethodDesc 0x7b5af1c0 +0x48 System.Windows.Forms.Message.Create(IntPtr, Int32, IntPtr, IntPtr)), calling (JitHelp: CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE_NOCTOR)&lt;br /&gt;0012f13c 7b0814c3 (MethodDesc 0x7b5ab7c0 +0x2b System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)), calling (MethodDesc 0x7b5aba60 +0 System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef))&lt;br /&gt;0012f144 7b07a72d (MethodDesc 0x7b5a8168 +0xd System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef))&lt;br /&gt;0012f148 7b07a706 (MethodDesc 0x7b5a8180 +0xd6 System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)), calling 00a3704e&lt;br /&gt;0012f15c 7b07a515 (MethodDesc 0x7b4a7d60 +0x75 System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr))&lt;br /&gt;[... lots of stuff ...]&lt;br /&gt;0012ffb0 79011b5f mscoree!_CorExeMain+0x2c&lt;br /&gt;0012ffc0 7c816fd7 kernel32!RegisterWaitForInputIdle+0x49&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Now lets unassamble the function that threw (!u &lt;first&gt;).&lt;br /&gt;You'll get an machine code listing of that function. Now simply search for the second address to remember and there it is.All you need to do is to synchronise machine code with the source code, which is much easier with .NET code compared to C++ code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;0:000&gt; !u 00DB04AD&lt;br /&gt;Normal JIT generated code&lt;br /&gt;Demo1._FormDemo1.ItsNorMe()&lt;br /&gt;Begin 00db0468, size 51&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;private void ItsNorMe()&lt;br /&gt;{&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;00db0468 57 push edi&lt;br /&gt;00db0469 56 push esi&lt;br /&gt;00db046a 50 push eax&lt;br /&gt;00db046b 890c24 mov dword ptr [esp],ecx&lt;br /&gt;00db046e 833dc82da20000 cmp dword ptr ds:[0A22DC8h],0&lt;br /&gt;00db0475 7405 je 00db047c&lt;br /&gt;*** WARNING: Unable to verify checksum for mscorlib.ni.dll&lt;br /&gt;*** ERROR: Module load completed but symbols could not be loaded for mscorlib.ni.dll&lt;br /&gt;00db0477 e8821e2e79 call mscorlib_ni+0x221e82 (792e1e82) (mscorlib_ni)&lt;br /&gt;00db047c 33f6 xor esi,esi&lt;br /&gt;00db047e 90 nop&lt;br /&gt;00db047f b9fcf91979 mov ecx,offset mscorlib_ni+0xdf9fc (7919f9fc)&lt;br /&gt;00db0484 e8931bc6ff call 00a1201c (JitHelp: CORINFO_HELP_NEWSFAST)&lt;br /&gt;00db0489 8bf8 mov edi,eax&lt;br /&gt;00db048b 8bcf mov ecx,edi&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;List&lt;int32&gt; l = &lt;span style="color: rgb(51, 51, 255);"&gt;new&lt;/span&gt; List&lt;int&gt;();&lt;/int&gt;&lt;/int32&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;00db048d e83ea97a78 call mscorlib_ni+0x49add0 (7955add0) (System.Collections.Generic.List`1[[System.Int32, mscorlib]]..ctor(), mdToken: 0600194d)&lt;br /&gt;00db0492 8bf7 mov esi,edi&lt;br /&gt;00db0494 8bce mov ecx,esi&lt;br /&gt;00db0496 ba01000000 mov edx,1&lt;br /&gt;00db049b 3909 cmp dword ptr [ecx],ecx&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;l.&lt;span style="color: rgb(51, 51, 255);"&gt;Add&lt;/span&gt;(1);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;00db049d e8aec77a78 call mscorlib_ni+0x49cc50 (7955cc50) (System.Collections.Generic.List`1[[System.Int32, mscorlib]].Add(Int32), mdToken: 0600195e)&lt;br /&gt;00db04a2 90 nop&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;l = &lt;span style="color: rgb(51, 51, 255);"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;00db04a3 33f6 xor esi,esi&lt;br /&gt;00db04a5 8bce mov ecx,esi&lt;br /&gt;00db04a7 ba02000000 mov edx,2&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;00db04ac&lt;/strong&gt;&lt;/span&gt; 3909 cmp dword ptr [ecx],ecx&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;l.Add(2);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;00db04ae e89dc77a78 call mscorlib_ni+0x49cc50 (7955cc50) (System.Collections.Generic.List`1[[System.Int32, mscorlib]].Add(Int32), mdToken: 0600195e)&lt;br /&gt;00db04b3 90 nop&lt;br /&gt;00db04b4 90 nop&lt;br /&gt;00db04b5 59 pop ecx&lt;br /&gt;00db04b6 5e pop esi&lt;br /&gt;00db04b7 5f pop edi&lt;br /&gt;00db04b8 c3 ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/first&gt;&lt;/li&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;/span&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;References: &lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.wintellect.com/BookInformation.aspx?ASIN=0735622027"&gt;Debugging Microsoft .NET 2.0 Applications, John Robbins &lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/DBGrm.asp"&gt;Production Debugging for .NET Framework Applications&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/03/06/Bugslayer/"&gt;SOS: It's Not Just an ABBA Song Anymore&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/dougste/pages/clrdebug.aspx"&gt;A reading list for debugging, .NET, CLR, WinDBG etc&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms404370%28vs.80%29.aspx"&gt;SOS Debugging Extension Online Reference&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/05/18/601002.aspx"&gt;.Net exceptions - Tracking down where in the code the exceptions occurred&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/01/11/511773.aspx"&gt;Back to Basics - How do I get the memory dumps in the first place? And what is SOS.dll?&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/01/09/510773.aspx"&gt;A Hang Scenario, Locks and Critical Sections&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/10/16/net-hang-debugging-walkthrough.aspx"&gt;.NET Hang Debugging Walkthrough&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/mvstanton/archive/2005/10/11/479861.aspx"&gt;Some new SOS functions&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1773416325408726497?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1773416325408726497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1773416325408726497' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1773416325408726497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1773416325408726497'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/03/creating-and-analyzing-minidumps-in-net.html' title='Creating and analyzing minidumps in .NET production applications'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_Lghuvt1vgPY/RgOKd8Jp9FI/AAAAAAAAAAU/pboi3w0UBM8/s72-c/OpenDump.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-8991134906579126784</id><published>2007-03-20T18:08:00.000+01:00</published><updated>2008-01-30T22:55:45.426+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>SOS Debugging with the CLR (Part 1)</title><content type='html'>A very impressive demonstration on what can be achived with SOS. It also takes care of when to use windbg/sos and when it's just overkill.&lt;br /&gt;Must read:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.gotdotnet.com/jasonz/default.aspx"&gt;Jason Zander's WebLog (General Manager, .NET Framework - DevFX)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-8991134906579126784?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.gotdotnet.com/jasonz/archive/2003/10/21/53581.aspx' title='SOS Debugging with the CLR (Part 1)'/><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/8991134906579126784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=8991134906579126784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8991134906579126784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/8991134906579126784'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/03/sos-debugging-with-clr-part-1.html' title='SOS Debugging with the CLR (Part 1)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-7997828317124037900</id><published>2007-03-20T13:09:00.000+01:00</published><updated>2008-01-30T22:56:38.384+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>Reflector for .NET</title><content type='html'>&lt;p&gt;Must have tool for .NET debugging and reverse engineering:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.blogger.com/www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-7997828317124037900?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.aisto.com/roeder/dotnet/' title='Reflector for .NET'/><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/7997828317124037900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=7997828317124037900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7997828317124037900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/7997828317124037900'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/03/reflector-for-net.html' title='Reflector for .NET'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-2509595682276070727</id><published>2007-03-14T12:40:00.000+01:00</published><updated>2008-01-30T22:57:00.756+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>WinDbg tips and tricks: triple dereference</title><content type='html'>&lt;p&gt;A very helpful post from Dmitry Vostokov (Crash Dump Analysis) when you want to walk pointer to pointer structures:&lt;/p&gt;&lt;p&gt;&lt;a title="Permanent Link: WinDbg tips and tricks: triple dereference" href="http://www.dumpanalysis.org/blog/index.php/2007/03/13/windbg-tips-and-tricks-triple-dereference/" rel="bookmark"&gt;WinDbg tips and tricks: triple dereference&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-2509595682276070727?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/2509595682276070727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=2509595682276070727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2509595682276070727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/2509595682276070727'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/03/windbg-tips-and-tricks-triple.html' title='WinDbg tips and tricks: triple dereference'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-6984459414055779887</id><published>2007-03-05T11:01:00.000+01:00</published><updated>2008-01-30T23:00:17.446+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='VB6'/><title type='text'>Using .NET components in an VB6 host</title><content type='html'>In order to allow correct objects cleanup on process shutdown of a VB6 executable that uses .NET components via CCWs and RCWs you must explicitly shut down .NET runtime in the unload of the project. Otherwise you can observe nasty crahses.&lt;br /&gt;&lt;br /&gt;The easiest way to achive this is using mscoree.CorRuntimeHost.&lt;br /&gt;Simply create an instance of this server an call Stop when your project unloads. With Start you can also control, when the runtime is loaded.&lt;br /&gt;&lt;br /&gt;You need to reference mscoree.tlb and mscoree.dll needs to be registered via regasm.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-6984459414055779887?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/6984459414055779887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=6984459414055779887' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6984459414055779887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/6984459414055779887'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/03/using-net-components-in-vb6-host.html' title='Using .NET components in an VB6 host'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-553225254538707854</id><published>2007-03-05T10:50:00.000+01:00</published><updated>2008-01-30T23:00:42.367+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='VB6'/><title type='text'>How to load the correct sos.dll</title><content type='html'>In order to load the correct sos.dll for .NET debugging into WinDbg you can either do this by .load with the full path to the wanted version of sos or you can type the following:&lt;br /&gt;&lt;br /&gt;.loadby sos mscorwks&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-553225254538707854?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/553225254538707854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=553225254538707854' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/553225254538707854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/553225254538707854'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2007/03/how-to-load-correct-sosdll.html' title='How to load the correct sos.dll'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-1054125490190887153</id><published>2006-12-07T12:41:00.000+01:00</published><updated>2008-01-30T23:00:56.051+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Scan the stack for an exception record</title><content type='html'>In a comment of a blog post I found a trick, which I think it worth to mention here:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/oldnewthing/archive/2006/08/21/710754.aspx#710847"&gt;re: Sucking the exception pointers out of a stack trace&lt;/a&gt; which also refers to &lt;a href="http://blogs.msdn.com/jmstall/archive/2005/01/18/355697.aspx"&gt;Finding where unmanaged exceptions came from.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt;&lt;br /&gt;One technique that may be useful is actually searching the stack for the context flags (1003f on x86). It's quick, dirty, and doesn't require symbols, and works 99% of the time on x86.&lt;br /&gt;&lt;br /&gt;&gt; s -d esp Lffff 1003f&lt;br /&gt;0535ef48  0001003f 00000000 00000000 00000000  ?...............&lt;br /&gt;&gt; .cxr 0535ef48&lt;br /&gt;&lt;&lt;&lt;br /&gt;&lt;br /&gt;Where s -d esp L1000 searches for stack range for the pattern 1003f&lt;br /&gt;There might be one or more matches. Those maches can be passed to '.cxr' which sets the contxt record. Finally a k will dump the stack of the original exception.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-1054125490190887153?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/1054125490190887153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=1054125490190887153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1054125490190887153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/1054125490190887153'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/12/scan-stack-for-exception-record.html' title='Scan the stack for an exception record'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-116048156009439688</id><published>2006-10-10T13:47:00.000+02:00</published><updated>2008-01-30T23:01:23.999+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to trace function calls with windbg</title><content type='html'>Have a closer look at the 'wt' command.&lt;br /&gt;When using 'wt' you should not it carefully without specifying any of the -l, -m or -i options. In most cases it makes sense to use the -l option to limit the trace to a certain depth (e.g.: 2 to 5) or to limit it to a certain modult with the -m option.&lt;br /&gt;&lt;br /&gt;Output can look like this:&lt;br /&gt;&lt;br /&gt;Attach to notepad.exe&lt;br /&gt;&lt;br /&gt;Set a break point to...&lt;br /&gt;0:001&gt; bp notepad!FileDragOpen&lt;br /&gt;0:001&gt; g&lt;br /&gt;&lt;br /&gt;Now drag a text file into notepad, the breakpoint will hit...&lt;br /&gt;&lt;br /&gt;Breakpoint 1 hit&lt;br /&gt;eax=00000000 ebx=00000000 ecx=0007fdb0 edx=7c90eb94 esi=7ca10702 edi=00000000&lt;br /&gt;eip=0100337e esp=0007fdb8 ebp=0007fdc0 iopl=0 nv up ei pl zr na pe nc&lt;br /&gt;cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246&lt;br /&gt;notepad!FileDragOpen:&lt;br /&gt;0100337e 8bff mov edi,edi&lt;br /&gt;&lt;br /&gt;0:000&gt; wt -l 2&lt;br /&gt;Tracing notepad!FileDragOpen to return address 01003416&lt;br /&gt;7 0 [ 0] notepad!FileDragOpen&lt;br /&gt;155 0 [ 1] notepad!CheckSave&lt;br /&gt;24 0 [ 2] USER32!SendMessageW&lt;br /&gt;165 24 [ 1] notepad!CheckSave&lt;br /&gt;5 0 [ 2] notepad!__security_check_cookie&lt;br /&gt;167 29 [ 1] notepad!CheckSave&lt;br /&gt;18 196 [ 0] notepad!FileDragOpen&lt;br /&gt;19 0 [ 1] kernel32!CreateFileW&lt;br /&gt;96 0 [ 2] ntdll!RtlInitUnicodeString&lt;br /&gt;33 96 [ 1] kernel32!CreateFileW&lt;br /&gt;32 0 [ 2] kernel32!BaseIsThisAConsoleName&lt;br /&gt;42 128 [ 1] kernel32!CreateFileW&lt;br /&gt;30 0 [ 2] ntdll!RtlDosPathNameToNtPathName_U&lt;br /&gt;133 158 [ 1] kernel32!CreateFileW&lt;br /&gt;4 0 [ 2] ntdll!NtCreateFile&lt;br /&gt;140 162 [ 1] kernel32!CreateFileW&lt;br /&gt;79 0 [ 2] ntdll!RtlFreeHeap&lt;br /&gt;147 241 [ 1] kernel32!CreateFileW&lt;br /&gt;14 0 [ 2] ntdll!RtlFreeHeap&lt;br /&gt;155 255 [ 1] kernel32!CreateFileW&lt;br /&gt;17 0 [ 2] kernel32!SetLastError&lt;br /&gt;163 272 [ 1] kernel32!CreateFileW&lt;br /&gt;24 631 [ 0] notepad!FileDragOpen&lt;br /&gt;3 0 [ 1] notepad!LoadFile&lt;br /&gt;19 0 [ 2] notepad!_SEH_prolog&lt;br /&gt;20 19 [ 1] notepad!LoadFile&lt;br /&gt;91 0 [ 2] kernel32!GetFileInformationByHandle&lt;br /&gt;30 110 [ 1] notepad!LoadFile&lt;br /&gt;4 0 [ 2] USER32!NtUserSetCursor&lt;br /&gt;41 114 [ 1] notepad!LoadFile&lt;br /&gt;67 0 [ 2] kernel32!CreateFileMappingW&lt;br /&gt;50 181 [ 1] notepad!LoadFile&lt;br /&gt;12 0 [ 2] kernel32!MapViewOfFile&lt;br /&gt;53 193 [ 1] notepad!LoadFile&lt;br /&gt;24 0 [ 2] kernel32!CloseHandle&lt;br /&gt;57 217 [ 1] notepad!LoadFile&lt;br /&gt;24 0 [ 2] kernel32!CloseHandle&lt;br /&gt;75 241 [ 1] notepad!LoadFile&lt;br /&gt;12 0 [ 2] notepad!IsInputTextUnicode&lt;br /&gt;81 253 [ 1] notepad!LoadFile&lt;br /&gt;429224 0 [ 2] notepad!IsTextUTF8&lt;br /&gt;&lt;br /&gt;430213 instructions were executed in 430212 events (0 from other threads)&lt;br /&gt;&lt;br /&gt;Function Name Invocations MinInst MaxInst AvgInst&lt;br /&gt;USER32!NtUserSetCursor 1 4 4 4&lt;br /&gt;USER32!SendMessageW 1 24 24 24&lt;br /&gt;kernel32!BaseIsThisAConsoleName 1 32 32 32&lt;br /&gt;kernel32!CloseHandle 2 24 24 24&lt;br /&gt;kernel32!CreateFileMappingW 1 67 67 67&lt;br /&gt;kernel32!CreateFileW 1 163 163 163&lt;br /&gt;kernel32!GetFileInformationByHandle 1 91 91 91&lt;br /&gt;kernel32!MapViewOfFile 1 12 12 12&lt;br /&gt;kernel32!SetLastError 1 17 17 17&lt;br /&gt;notepad!CheckSave 1 167 167 167&lt;br /&gt;notepad!FileDragOpen 1 24 24 24&lt;br /&gt;notepad!IsInputTextUnicode 1 12 12 12&lt;br /&gt;notepad!IsTextUTF8 1 429224 429224 429224&lt;br /&gt;notepad!LoadFile 1 81 81 81&lt;br /&gt;notepad!_SEH_prolog 1 19 19 19&lt;br /&gt;notepad!__security_check_cookie 1 5 5 5&lt;br /&gt;ntdll!NtCreateFile 1 4 4 4&lt;br /&gt;ntdll!RtlDosPathNameToNtPathName_U 1 30 30 30&lt;br /&gt;ntdll!RtlFreeHeap 2 14 79 46&lt;br /&gt;ntdll!RtlInitUnicodeString 1 96 96 96&lt;br /&gt;&lt;br /&gt;0 system calls were executed&lt;br /&gt;&lt;br /&gt;ps.: This should hide most of the OS stuff, when you are just interested in your own code:&lt;br /&gt;wt -i MSVCP60 -i OLEAUT32 -i SHLWAPI -i USER32 -i kernel32 -i msvcrt -i msxml4 -i ntdll&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-116048156009439688?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/116048156009439688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=116048156009439688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/116048156009439688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/116048156009439688'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/10/how-to-trace-function-calls-with.html' title='How to trace function calls with windbg'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-116048063512959164</id><published>2006-10-10T13:41:00.000+02:00</published><updated>2008-02-01T10:38:15.153+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='VB6'/><title type='text'>How to break on VB6 run time errors</title><content type='html'>In order to detect VB6 run time errors you need to set a break point to MSVBVM60!EbRaiseExceptionCode and MSVBVM60!EbRaiseException:&lt;br /&gt;&lt;br /&gt;bp MSVBVM60!EbRaiseExceptionCode&lt;br /&gt;bp MSVBVM60!EbRaiseException&lt;br /&gt;&lt;br /&gt;Or even simpler with e &lt;a href="http://voneinem-windbg.blogspot.com/2008/01/setting-multiple-breakpoints-via.html"&gt;wildcard&lt;/a&gt;:&lt;br /&gt;bm /a MSVBVM60!EbRaiseException*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-116048063512959164?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/116048063512959164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=116048063512959164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/116048063512959164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/116048063512959164'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/10/how-to-break-on-vb6-run-time-errors.html' title='How to break on VB6 run time errors'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-115821492066930230</id><published>2006-09-14T08:22:00.000+02:00</published><updated>2008-01-30T23:03:07.271+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Notes from a dark corner : A reading list for debugging, .NET, CLR, WinDBG etc</title><content type='html'>Here you can find a good comprehension of sources to start debugging with windbg...&lt;br /&gt;&lt;a href="http://blogs.msdn.com/dougste/archive/2006/09/07/743985.aspx"&gt;Notes from a dark corner : A reading list for debugging, .NET, CLR, WinDBG etc&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-115821492066930230?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.msdn.com/dougste/archive/2006/09/07/743985.aspx' title='Notes from a dark corner : A reading list for debugging, .NET, CLR, WinDBG etc'/><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/115821492066930230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=115821492066930230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115821492066930230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115821492066930230'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/09/notes-from-dark-corner-reading-list.html' title='Notes from a dark corner : A reading list for debugging, .NET, CLR, WinDBG etc'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-115504334896277182</id><published>2006-08-08T12:29:00.000+02:00</published><updated>2008-01-30T23:03:25.709+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to write parts of the process memory to a file</title><content type='html'>In order to write parts of the process memory to a file use the .writemem command.&lt;br /&gt;Syntax is .writemem FileName Address Range&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;You want to dump a huge BSTR into a file:&lt;br /&gt;Address of the BSTR: 0x0d900024&lt;br /&gt;&lt;br /&gt;Get the size (The DWORD receedig the actual string contains the size):&lt;br /&gt;0:000&gt; dc 0x0d900024 - 4&lt;br /&gt;0d900020  005f7a1c ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.writemem c:\temp\string_content.txt  0x0d900024  L?005f7a1c&lt;br /&gt;&lt;br /&gt;Please note the "?" in the size parameter to avoid build in size checks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-115504334896277182?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/115504334896277182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=115504334896277182' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115504334896277182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115504334896277182'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/08/how-to-write-parts-of-process-memory.html' title='How to write parts of the process memory to a file'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-115501901203971776</id><published>2006-08-08T08:32:00.000+02:00</published><updated>2008-01-30T23:03:48.970+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Be aware of using the /b option with .dump!</title><content type='html'>When using /b with .dump in order to generate a cab file you will get the message:&lt;br /&gt;&lt;br /&gt;"Creating a cab file can take a VERY VERY long time" &lt;br /&gt;  - and this is VERY VERY (!) true.&lt;br /&gt;&lt;br /&gt;".Ctrl-C can only interrupt the command after a file has been added to the cab."&lt;br /&gt;  - so all you can do is wait and have one cup of coffe after the other :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-115501901203971776?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/115501901203971776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=115501901203971776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115501901203971776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115501901203971776'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/08/be-aware-of-using-b-option-with-dump.html' title='Be aware of using the /b option with .dump!'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-115470031598896007</id><published>2006-08-04T15:53:00.000+02:00</published><updated>2008-01-30T23:04:02.626+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Scan the stack for strings</title><content type='html'>It is very easy to find stirngs on the stack of life debugging session or in a crash dump.&lt;br /&gt;Simply set the  context  you are interested in with ~x s (replace x with the thread you are interested in) or set the excption context with .cxr 'address' or .ecxr (dump contains an excpetion record).&lt;br /&gt;&lt;br /&gt;Then type:&lt;br /&gt;0:000&gt; da @ebp&lt;br /&gt;&lt;br /&gt;You will likely get lots of trash, like this:&lt;br /&gt;0012bf30  "X.."&lt;br /&gt;&lt;br /&gt;then type&lt;br /&gt;0:000&gt; da&lt;br /&gt;0012bf34  ".a.w..."&lt;br /&gt;&lt;br /&gt;typing 'enter' repeats the last command, so we will walk down the stack by pressig 'enter'&lt;br /&gt;0:000&gt;&lt;br /&gt;0012bf3c  "8"&lt;br /&gt;[...]&lt;br /&gt;&lt;br /&gt;0:000&gt;&lt;br /&gt;0012c478  "Runtime Error!..Program: ...X.exe"&lt;br /&gt;0012c4b8  "........................................This app"&lt;br /&gt;0012c4d8  "lication has requested the Runti"&lt;br /&gt;0012c4f8  "me to terminate it in an unusual"&lt;br /&gt;0012c518  " way..Please contact the applica"&lt;br /&gt;0012c538  "tion's support team for more inf"&lt;br /&gt;0012c558  "ormation..."&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This of course does not not work with strings on the heap.&lt;br /&gt;Simply use 'dda' (or 'ddu' for unicode) to list those.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-115470031598896007?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/115470031598896007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=115470031598896007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115470031598896007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115470031598896007'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/08/scan-stack-for-strings.html' title='Scan the stack for strings'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-115399054364141986</id><published>2006-07-27T10:37:00.000+02:00</published><updated>2008-01-30T23:04:17.917+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to get the stack when 'k' tells you 'Stack unwind information not available. Following frames may be wrong.'</title><content type='html'>Sometimes Windbg is not able to recreate the stack when using the k command.&lt;br /&gt;This problem might come up with frame pointer optimization   for example.&lt;br /&gt;In such cases you can easily construct the call stack manually with some usage of your brain:&lt;br /&gt;&lt;br /&gt;First execute:&lt;br /&gt;0:000&gt; dps @ebp&lt;br /&gt;&lt;br /&gt;This will list the raw contents of the stack along with a matching symbol if available (top down)&lt;br /&gt;&lt;br /&gt;then execute 'd' (which repeats the last d* command) as long as you reach the bottom of the stack. Know you need to distinguish between calls on the stack and variables and so forth. With few knowledge of the code executed it is pretty obvious to devide the calls from the rest. I personally copy the calls to the scratch pad not to get lost.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-115399054364141986?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/115399054364141986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=115399054364141986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115399054364141986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/115399054364141986'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/07/how-to-get-stack-when-k-tells-you.html' title='How to get the stack when &apos;k&apos; tells you &apos;Stack unwind information not available. Following frames may be wrong.&apos;'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114968161763990452</id><published>2006-06-07T13:56:00.000+02:00</published><updated>2008-01-30T23:04:36.708+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to find out what code modifies memory</title><content type='html'>You can use 'ba' (Break on Access) to define a breakpoint that hits when the portion of memory is read and/or modified.&lt;br /&gt;&lt;br /&gt;ba w4 myPointer will cause the debugger to break, whenever myPointer is modified (assume a 32bit system)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114968161763990452?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114968161763990452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114968161763990452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114968161763990452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114968161763990452'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/06/how-to-find-out-what-code-modifies.html' title='How to find out what code modifies memory'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114966923158647294</id><published>2006-06-07T09:36:00.002+02:00</published><updated>2009-01-12T09:04:47.274+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to debug double deletes / access after delete</title><content type='html'>It can happen that you come along an access violation but the source of the error has occured long time back in the past, because your code tries to access memory that has alreafy been freed.&lt;br /&gt;&lt;br /&gt;I order to debug such a scenario you need to enable full page heap:&lt;br /&gt;&lt;br /&gt;gflags -p /enable YourApp.exe /full&lt;br /&gt;&lt;br /&gt;Then do the stuff to reproduce the AV. When you get it type this:&lt;br /&gt;&lt;br /&gt;!heap -p -a [address of AV]&lt;br /&gt;&lt;br /&gt;If you have luck you will get the call call stack of deallocation.&lt;/address&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114966923158647294?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114966923158647294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114966923158647294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114966923158647294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114966923158647294'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/06/how-to-debug-double-deletes-access.html' title='How to debug double deletes / access after delete'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114563248976188669</id><published>2006-04-21T17:07:00.000+02:00</published><updated>2008-01-30T23:05:35.171+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hangs'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>How to find out on which thread a blocked thread is waiting</title><content type='html'>&lt;span style="font-family:courier new;"&gt;First get the stack of the blocked thread by&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;0:002&gt; kb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ChildEBP RetAddr  Args to Child              &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;00edfdd8 7c90e9c0 7c8025db 0000026c 00000000 ntdll!KiFastSystemCallRet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;00edfddc 7c8025db 0000026c 00000000 00000000 ntdll!ZwWaitForSingleObject+0xc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;00edfe40 7c802542 &lt;span style="color: rgb(0, 0, 0);"&gt;0000026c &lt;/span&gt;ffffffff 00000000 kernel32!WaitForSingleObjectEx+0xa8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;00edfe54 6640114a &lt;span style="color: rgb(255, 0, 0);"&gt;0000026c &lt;/span&gt;ffffffff 00813190 kernel32!WaitForSingleObject+0x12&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The first parameter passed to WaitForSingleObject is the handle to the thread this thread is waiting for (Precondition: we are waiting for a thread and not another synchronisation object).&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We can get more information about this handle by&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;0:002&gt; !handle 0000026c f&lt;br /&gt;Handle 0000026c&lt;br /&gt; Type             Thread&lt;br /&gt; Attributes       0&lt;br /&gt; GrantedAccess    0x1f03ff:&lt;br /&gt;        Delete,ReadControl,WriteDac,WriteOwner,Synch&lt;br /&gt;        Terminate,Suspend,Alert,GetContext,SetContext,SetInfo,QueryInfo,SetToken,Impersonate,DirectImpersonate&lt;br /&gt; HandleCount      7&lt;br /&gt; PointerCount     10&lt;br /&gt; Name             &lt;none&gt;&lt;br /&gt; Object specific information&lt;br /&gt;   Thread Id   &lt;span style="color: rgb(255, 0, 0);"&gt;b94.ff4&lt;/span&gt;&lt;br /&gt;   Priority    3&lt;br /&gt;   Base Priority -16&lt;/none&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we identified the questionable thread with b94.ff4&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114563248976188669?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114563248976188669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114563248976188669' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114563248976188669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114563248976188669'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/04/how-to-find-out-on-which-thread.html' title='How to find out on which thread a blocked thread is waiting'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114311603128174828</id><published>2006-03-23T11:01:00.000+01:00</published><updated>2008-01-30T23:05:53.745+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hangs'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Use !critsec to find out, which thread is waiting for a critical section</title><content type='html'>If you need to find out which thread is owning a critical section a blocked thread is waiting for you can first get the stack args by&lt;br /&gt;&lt;br /&gt;kb&lt;br /&gt;&lt;br /&gt;Then you need to get the critical section address from the stack. This is an argument passed to ntdll!RtlEnterCriticalSection API as first parameter.&lt;br /&gt;&lt;br /&gt;By typing&lt;br /&gt;&lt;br /&gt;!critsec 'address'&lt;br /&gt;&lt;br /&gt;You'll get information about the section like: LockCount, RecursionCount, OwningThread, EntryCount, ContentionCount and the Locked state.&lt;br /&gt;&lt;br /&gt;CritSec +81347c at 0081347c&lt;br /&gt;LockCount          8&lt;br /&gt;RecursionCount     1&lt;br /&gt;OwningThread       c6c&lt;br /&gt;EntryCount         8&lt;br /&gt;ContentionCount    8&lt;br /&gt;*** Locked&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114311603128174828?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114311603128174828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114311603128174828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114311603128174828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114311603128174828'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/03/use-critsec-to-find-out-which-thread.html' title='Use !critsec to find out, which thread is waiting for a critical section'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114232240465765168</id><published>2006-03-14T08:43:00.000+01:00</published><updated>2008-01-30T23:06:04.769+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Debug Tutorial Part 4: Writing WINDBG Extensions</title><content type='html'>Cool article from Toby Opferman about how extending windbg. Must read:&lt;br /&gt;&lt;a href="http://www.codeproject.com/debug/cdbntsd4.asp"&gt;Debug Tutorial Part 4: Writing WINDBG Extensions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114232240465765168?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114232240465765168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114232240465765168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114232240465765168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114232240465765168'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/03/debug-tutorial-part-4-writing-windbg.html' title='Debug Tutorial Part 4: Writing WINDBG Extensions'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114197797326444594</id><published>2006-03-10T09:02:00.000+01:00</published><updated>2008-01-30T23:06:18.517+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>A word for WinDbg (Mike Taulty)</title><content type='html'>A very good starting point if you are planning to dig a bit into windbg:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mtaulty.com/blog/archive/2004/08/03/608.aspx"&gt;W word for WinDbg&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mtaulty.com/blog/archive/2004/08/03/609.aspx"&gt;W word for WinDbg (2)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114197797326444594?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114197797326444594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114197797326444594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114197797326444594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114197797326444594'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/03/word-for-windbg-mike-taulty.html' title='A word for WinDbg (Mike Taulty)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114122806320048380</id><published>2006-03-01T16:45:00.001+01:00</published><updated>2009-01-27T09:28:09.516+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Starting UltraEdit from WinDbg</title><content type='html'>By setting follwoing env variable:&lt;br /&gt;WINDBG_INVOKE_EDITOR=C:\PROGRA~1\ULTRAE~1\uedit32.exe %f/%l/1&lt;br /&gt;{you might need to adapt the path}&lt;br /&gt;&lt;br /&gt;You get the ability to open a source file from within windbg by simply right clicking on the source window header and then clicking "Edit this file..."&lt;br /&gt;&lt;br /&gt;(this works also with other editors ;-) )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114122806320048380?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114122806320048380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114122806320048380' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114122806320048380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114122806320048380'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/03/starting-ultraedit-from-windbg.html' title='Starting UltraEdit from WinDbg'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114120217837667532</id><published>2006-03-01T09:34:00.000+01:00</published><updated>2008-01-30T23:06:42.961+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>use "lmv m " to display detailed information about a specific module</title><content type='html'>e.g.:&lt;br /&gt;&lt;br /&gt;0:003&gt; lmv m actbar2&lt;br /&gt;start    end        module name&lt;br /&gt;35000000 350d0000   Actbar2    (export symbols)       C:\SnapShots\voneinem_view_a0032858_c\VespucciPool\common\bin\debug\Actbar2.ocx&lt;br /&gt;   Loaded symbol image file: C:\SnapShots\voneinem_view_a0032858_c\VespucciPool\common\bin\debug\Actbar2.ocx&lt;br /&gt;   Image path: C:\SnapShots\voneinem_view_a0032858_c\VespucciPool\common\bin\debug\Actbar2.ocx&lt;br /&gt;   Image name: Actbar2.ocx&lt;br /&gt;   Timestamp:        Wed Oct 27 16:52:02 2004 (417FB612)&lt;br /&gt;   CheckSum:         000D7481&lt;br /&gt;   ImageSize:        000D0000&lt;br /&gt;   File version:     2.5.2.121&lt;br /&gt;   Product version:  2.5.2.121&lt;br /&gt;   File flags:       0 (Mask 3F)&lt;br /&gt;   File OS:          40004 NT Win32&lt;br /&gt;   File type:        2.0 Dll&lt;br /&gt;   File date:        00000000.00000000&lt;br /&gt;   Translations:     0000.04b0 0409.04b0&lt;br /&gt;   CompanyName:      Data Dynamics&lt;br /&gt;   ProductName:      Data Dynamics ActiveBar 2.0 Control&lt;br /&gt;   InternalName:     ActiveBar 2.5&lt;br /&gt;   OriginalFilename: ActiveBar2.ocx&lt;br /&gt;   ProductVersion:   2, 5, 2, 121&lt;br /&gt;   FileVersion:      2, 5, 2, 121&lt;br /&gt;   PrivateBuild:     2, 5, 2, 121&lt;br /&gt;   SpecialBuild:     2, 5, 2, 121&lt;br /&gt;   FileDescription:  ActiveBar 2.5 Control&lt;br /&gt;   LegalCopyright:   Copyright © 1999-2004 Data Dynamics&lt;br /&gt;   LegalTrademarks:  Copyright © 1999-2004 Data Dynamics&lt;br /&gt;   Comments:         Copyright © 1999-2004 Data Dynamics&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To get a quick list of modules simply type "lm"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114120217837667532?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114120217837667532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114120217837667532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114120217837667532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114120217837667532'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/03/use-lmv-m-to-display-detailed.html' title='use &quot;lmv m &lt;module name&gt;&quot; to display detailed information about a specific module'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114119905016708687</id><published>2006-03-01T08:40:00.000+01:00</published><updated>2008-01-30T23:07:00.550+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><title type='text'>Display unicode strings the easy way</title><content type='html'>Did you ever wonder why windbg does not display unicode strings but simply shows the pointer?&lt;br /&gt;&lt;br /&gt;Try ".enable_unicode 1"! This causes all 16-bit (USHORT) arrays and pointers to be displayed as Unicode  strings.&lt;br /&gt;&lt;br /&gt;(".enable_unicode 0" restores the default)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114119905016708687?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114119905016708687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114119905016708687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114119905016708687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114119905016708687'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/02/display-unicode-strings-easy-way.html' title='Display unicode strings the easy way'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114001039848572255</id><published>2006-02-15T14:29:00.000+01:00</published><updated>2008-01-30T23:07:23.677+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Extensions'/><title type='text'>Where to get SieExtPub, AdPlus and Sos</title><content type='html'>The package contains helpful tools in oder to debug .NET and COM issues.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=7c6ec49c-a8f7-4323-b583-6a7a6aeb5e66&amp;amp;displayLang=en&amp;amp;amp;oRef=http%3a%2f%2fblogs.msdn.com%2ftess%2farchive%2f2006%2f01%2f20%2f515259.aspx"&gt;Debugging Tools Download&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114001039848572255?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114001039848572255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114001039848572255' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114001039848572255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114001039848572255'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/02/where-to-get-sieextpub-adplus-and-sos.html' title='Where to get SieExtPub, AdPlus and Sos'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-114000620102282916</id><published>2006-02-15T13:13:00.000+01:00</published><updated>2008-01-30T23:07:41.093+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Some helpful links provided by my colleague Uwe</title><content type='html'>&lt;a href="http://blogs.msdn.com/greggm/default.aspx"&gt;greggm's WebLog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/jmstall/default.aspx"&gt;Mike Stall's .NET Debugging Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/tess/default.aspx"&gt;Tess Ferrandez's WebLog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/dougste/default.aspx"&gt;Notes from a dark corner&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-114000620102282916?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/114000620102282916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=114000620102282916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114000620102282916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/114000620102282916'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/02/some-helpful-links-provided-by-my.html' title='Some helpful links provided by my colleague Uwe'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-113982875727286417</id><published>2006-02-13T12:03:00.000+01:00</published><updated>2008-01-30T23:08:29.797+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>.NET debugging using WinDbg</title><content type='html'>This is a very good step by step cook book about .NET debugging using WinDbg&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mtaulty.com/blog/%28ypexycaezqpljo55mhfxqpal%29/archive/2004/08/03/609.aspx"&gt;A word for WinDbg (2)&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-113982875727286417?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/113982875727286417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=113982875727286417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113982875727286417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113982875727286417'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2006/02/net-debugging-using-windbg.html' title='.NET debugging using WinDbg'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-113222855949887838</id><published>2005-11-17T12:15:00.000+01:00</published><updated>2008-01-30T23:08:45.993+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Borland'/><title type='text'>Using DbgHelp.dll MiniDumpWriteDump function with Borland C++ Builder 5</title><content type='html'>I have written a handy class that allows to use the DbgHelp.dll MiniDumpWriteDump function in Borland C++ Builder 5 environment. Feel free to use it:&lt;br /&gt;&lt;br /&gt;//DLL wrapper class&lt;br /&gt;#define CALLING_CONVENTION __stdcall&lt;br /&gt;&lt;br /&gt;class CDbgHelpDLL&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;   CDbgHelpDLL()&lt;br /&gt;   {&lt;br /&gt;      m_hDLL = ::LoadLibraryA("dbghelp.dll");&lt;br /&gt;      if(NULL != m_hDLL)&lt;br /&gt;      {&lt;br /&gt;          //CodeSite API                   &lt;br /&gt;          DLLMiniDumpWriteDump    = (BOOL (CALLING_CONVENTION *)&lt;br /&gt;                  (HANDLE,&lt;br /&gt;                  DWORD,&lt;br /&gt;                  HANDLE,&lt;br /&gt;                  MINIDUMP_TYPE,&lt;br /&gt;                  CONST PMINIDUMP_EXCEPTION_INFORMATION,&lt;br /&gt;                  CONST PMINIDUMP_USER_STREAM_INFORMATION,&lt;br /&gt;                  CONST PMINIDUMP_CALLBACK_INFORMATION))                          &lt;br /&gt;                  ::GetProcAddress(m_hDLL, "MiniDumpWriteDump");&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            DLLMiniDumpWriteDump = NULL;  &lt;br /&gt;        }&lt;br /&gt;   }&lt;br /&gt;   ~CDbgHelpDLL()&lt;br /&gt;   {&lt;br /&gt;      if(NULL != m_hDLL)&lt;br /&gt;      {&lt;br /&gt;          ::FreeLibrary(m_hDLL);&lt;br /&gt;          m_hDLL = NULL;&lt;br /&gt;      } &lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;   BOOL MiniDumpWriteDump(&lt;br /&gt;     HANDLE hProcess,&lt;br /&gt;     DWORD ProcessId,&lt;br /&gt;     HANDLE hFile,&lt;br /&gt;     MINIDUMP_TYPE DumpType,&lt;br /&gt;     PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,&lt;br /&gt;     PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,&lt;br /&gt;     PMINIDUMP_CALLBACK_INFORMATION CallbackParam&lt;br /&gt;   )&lt;br /&gt;   {&lt;br /&gt;           if (DLLMiniDumpWriteDump){&lt;br /&gt;               return DLLMiniDumpWriteDump(    hProcess,&lt;br /&gt;                                                                                                         ProcessId,&lt;br /&gt;                                                                                                         hFile,&lt;br /&gt;                                                                                                         DumpType,&lt;br /&gt;                                                                                                         ExceptionParam,&lt;br /&gt;                                                                                                         UserStreamParam,&lt;br /&gt;                                                                                                         CallbackParam);&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;           return FALSE;  &lt;br /&gt;       }                                                                                                        &lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;private:&lt;br /&gt;  HINSTANCE    m_hDLL;&lt;br /&gt;  //DLL functions&lt;br /&gt;  BOOL (CALLING_CONVENTION *DLLMiniDumpWriteDump)( HANDLE hProcess,&lt;br /&gt;                                                                                                     DWORD ProcessId,&lt;br /&gt;                                                                                                     HANDLE hFile,&lt;br /&gt;                                                                                                     MINIDUMP_TYPE DumpType,&lt;br /&gt;                                                                                                     CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,&lt;br /&gt;                                                                                                     CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,&lt;br /&gt;                                                                                                     CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;In order to compile with dbghelp.h from ms, you need to "patch" it:&lt;br /&gt;&lt;br /&gt;before // for those without specstrings.h add:&lt;br /&gt;&lt;br /&gt;//CBuilder&lt;br /&gt;#ifdef __BORLANDC__&lt;br /&gt;using namespace System;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;Change this:&lt;br /&gt;#ifdef __BORLANDC__&lt;br /&gt;enum hdEnums {&lt;br /&gt;#else&lt;br /&gt;typedef enum {&lt;br /&gt;#endif&lt;br /&gt;   hdBase = 0, // root directory for dbghelp&lt;br /&gt;   hdSym,      // where symbols are stored&lt;br /&gt;   hdSrc,      // where source is stored&lt;br /&gt;   hdMax       // end marker&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;and this:&lt;br /&gt;#ifdef __BORLANDC__&lt;br /&gt;enum sfEnums {&lt;br /&gt;#else&lt;br /&gt;typedef enum {&lt;br /&gt;#endif&lt;br /&gt;   sfImage = 0,&lt;br /&gt;   sfDbg,&lt;br /&gt;   sfPdb,&lt;br /&gt;   sfMpd,&lt;br /&gt;   sfMax&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;and here we go ...&lt;br /&gt;Happy crash dumping with borland ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-113222855949887838?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/113222855949887838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=113222855949887838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113222855949887838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113222855949887838'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2005/11/using-dbghelpdll-minidumpwritedump.html' title='Using DbgHelp.dll MiniDumpWriteDump function with Borland C++ Builder 5'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-113214599799704111</id><published>2005-11-16T13:40:00.000+01:00</published><updated>2008-01-30T23:09:49.450+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Borland'/><title type='text'>Using WinDbg with Borland</title><content type='html'>I'm using this tool and I must say it's great! Of course you just get the info that is there in the map file. Therefore no info about local variables. But with a bit knowledge, you can oracle those from the stack memory :-)&lt;b&gt;&lt;br /&gt;&lt;br /&gt;Ms-dbg&lt;/b&gt; brings microsoft-compatible debugging to Borland. With "map2dbg" you can convert from a borland MAP file to a ms DBG file. This lets you use standard debugging tools like DrWatson and imagehlp.dll. For instance, in "calldemo" we use it to generate a callstack of the current program. Helpful for debugging clients a thousand miles away.&lt;br /&gt;&lt;br /&gt;Source:&lt;br /&gt;&lt;a href="http://www.wischik.com/lu/programmer/"&gt;http://www.wischik.com/lu/programmer/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-113214599799704111?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/113214599799704111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=113214599799704111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113214599799704111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113214599799704111'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2005/11/using-windbg-with-borland.html' title='Using WinDbg with Borland'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-113214469146840876</id><published>2005-11-16T13:36:00.000+01:00</published><updated>2008-01-30T23:10:29.512+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Application debugging in a production environment (Hans De Smaele)</title><content type='html'>Very, very cool article:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/belux/nl/msdn/community/articles/feb05_applicationdebugging.mspx"&gt;http://www.microsoft.com/belux/nl/msdn/community/articles/feb05_applicationdebugging.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Application debugging in a production environment&lt;/h1&gt; &lt;div class="footer"&gt; Hans De Smaele&lt;br /&gt;February 2005    &lt;/div&gt;&lt;br /&gt;&lt;div class="summery"&gt;&lt;b&gt;Summary:&lt;/b&gt; This document is made for people who have to support and maintain a production environment. Answers are given on questions like: "Yesterday it still worked and now it doesn't anymore, what did happen?" or "Why does it work on this computer and not on another one?". Every part of the paper is explained as a walkthrough in order to use it as reference material and/or as a workbook to learn some particular debugging scenarios. (125 printed pages) &lt;/div&gt;&lt;br /&gt;&lt;div class="subtitle"&gt;This article covers the following topics:&lt;/div&gt; &lt;ul&gt; &lt;li&gt;Debugging and instrumenting scripts&lt;/li&gt;&lt;li&gt;Using tools to do first analysis (FileMon, RegMon, Dependency Walker, ...)&lt;/li&gt;&lt;li&gt;A step-by-step guide for using the WinDbg debugger&lt;/li&gt;&lt;li&gt;Symbol and symbol servers&lt;/li&gt;&lt;li&gt;Calling conventions&lt;/li&gt;&lt;li&gt;Stack tracing and related subjects&lt;/li&gt;&lt;li&gt;Debugging of "free builds"&lt;/li&gt;&lt;li&gt;Creation and debugging of "dump files"&lt;/li&gt;&lt;li&gt;Working with ILDASM and ILASM&lt;/li&gt;&lt;li&gt;Other useful WinDbg extensions&lt;/li&gt;&lt;li&gt;Remote debugging&lt;/li&gt;&lt;li&gt;Debug scenarios&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-113214469146840876?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/113214469146840876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=113214469146840876' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113214469146840876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113214469146840876'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2005/11/application-debugging-in-production.html' title='Application debugging in a production environment (Hans De Smaele)'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18989586.post-113205752231187480</id><published>2005-11-15T13:24:00.000+01:00</published><updated>2008-01-30T23:11:00.196+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Found'/><title type='text'>Debugging Tools for Windows - Overview</title><content type='html'>The root page from MS:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;http://www.microsoft.com/whdc/devtools/debugging/default.mspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18989586-113205752231187480?l=voneinem-windbg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voneinem-windbg.blogspot.com/feeds/113205752231187480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18989586&amp;postID=113205752231187480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113205752231187480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18989586/posts/default/113205752231187480'/><link rel='alternate' type='text/html' href='http://voneinem-windbg.blogspot.com/2005/11/debugging-tools-for-windows-overview.html' title='Debugging Tools for Windows - Overview'/><author><name>Volker von Einem</name><uri>http://www.blogger.com/profile/03633759507649031608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/hello/159/9841/640/Volker.jpg'/></author><thr:total>0</thr:total></entry></feed>
