<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BasementJack &#187; debug</title>
	<atom:link href="http://basementjack.com/tag/debug/feed/" rel="self" type="application/rss+xml" />
	<link>http://basementjack.com</link>
	<description>Jack&#039;s basement and some other stuff...</description>
	<lastBuildDate>Tue, 27 Dec 2011 20:28:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Getting started with Debugging Part2: Checking out a Crash Dump File.</title>
		<link>http://basementjack.com/uncategorized/getting-started-with-debugging-part2-checking-out-a-crash-dump-file/</link>
		<comments>http://basementjack.com/uncategorized/getting-started-with-debugging-part2-checking-out-a-crash-dump-file/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 22:33:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Debugging tools for windows]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=213</guid>
		<description><![CDATA[In Part 1, I showed how to install and configure the debugging tools for windows, and setup the symbol files to download from Microsoft. In this part, I&#8217;ll show how to use the debugging tools to analyze crash dumps from windows when it crashes and gives the &#8216;blue screen of death&#8217; Precusor: Setup Windows to [...]]]></description>
			<content:encoded><![CDATA[<p>In Part 1, I showed how to install and configure the debugging tools for windows, and setup the symbol files to download from Microsoft.</p>
<p>In this part, I&#8217;ll show how to use the debugging tools to analyze crash dumps from windows when it crashes and gives the &#8216;blue screen of death&#8217;</p>
<p><strong>Precusor: Setup Windows to generate a crash dump file</strong></p>
<p>Windows doesn&#8217;t necessarily need to create a crash dump file, but it&#8217;s a good idea to do so.</p>
<p>In the system properties control panel, On the advanced tab, click &#8216;Startup and Recovery-&gt;Settings&#8217; (This is right above where you had to set the environment variable from part1)</p>
<p>Be sure there&#8217;s a memory dump type selected. Note that &#8220;Kernel memory Dump&#8221; = &#8220;full memory dump&#8221; and you&#8217;ll need a swap file on your C drive thats at least as big as your RAM.</p>
<p>Memory dump locations:</p>
<ul>
<li>Kernel/Full: c:\windows\MEMORY.DMP (Only one copy kept unless moved/renamed)</li>
<li>Small/Minidump: c:\windows\minidumps</li>
</ul>
<p>One more interesting tidbit &#8211; you can set windows up to allow you to crash it at will &#8211; That&#8217;s a topic for another article.</p>
<p>&#8212;&#8212;&#8212;&#8211;</p>
<p>Checking out your first crash dump file:<br />
Start WinDbg<br />
(the first time you do this it takes a while as it downloads the symbols)<br />
File-&gt;Open Crash Dump&#8230;<br />
Find your crash dump file.<br />
watch the output&#8230;</p>
<p>If you&#8217;re lucky, You&#8217;ll see a line such as:<br />
<strong>Probably caused by: filename.ext</strong></p>
<p>Many times, this first step of opening the crash dump tells you what you need to know.</p>
<p>Sometimes it doesn&#8217;t and you want to look a little deeper.</p>
<p>The next thing to try is often<br />
<strong>!analyze -v</strong></p>
<p>think of the debugger as a CMD window &#8211; you won&#8217;t find !analyze -v in the menus, but you can type it in at the &gt; prompt.<br />
(You can also click it if you see it in the display)</p>
<p> If this doesn&#8217;t work the options get a little tricker&#8230;</p>
<p>In my next post, I&#8217;ll show a few hand picked commands that let you see what was running.</p>
<p><a href="http://blogs.technet.com/petergal/archive/2006/03/23/422993.aspx"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/getting-started-with-debugging-part2-checking-out-a-crash-dump-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Debugging Part1: Setting up the Debugger and Symbols</title>
		<link>http://basementjack.com/uncategorized/getting-started-with-debugging-part1-setting-up-the-debugger-and-symbols/</link>
		<comments>http://basementjack.com/uncategorized/getting-started-with-debugging-part1-setting-up-the-debugger-and-symbols/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 21:42:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Debugging tools for windows]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=202</guid>
		<description><![CDATA[Overview:    This article will show you what you need to read into a windows crash dump file&#8230;    What you&#8217;ll need: Debugging tools for windows Symbol files   Download Debugging tools for windows -   Rather than including a link, I recommend searching for &#8216;debugging tools for windows&#8217;   You should find a bunch [...]]]></description>
			<content:encoded><![CDATA[<p>Overview:</p>
<p>   This article will show you what you need to read into a windows crash dump file&#8230;</p>
<p>   What you&#8217;ll need:</p>
<ul>
<li>Debugging tools for windows</li>
<li>Symbol files</li>
</ul>
<p>  Download Debugging tools for windows -<br />
  Rather than including a link, I recommend searching for <a title="Debugging Tools For Windows" href="http://www.google.com/search?q=debugging+tools+for+windows" target="_blank">&#8216;debugging tools for windows&#8217;</a><br />
  You should find a bunch of links on a Microsoft site to download the latest version.</p>
<p>    What to download?</p>
<ul>
<li>if your OS is 32bit, download the x86 version</li>
<li>if your OS is 64 bit, download <strong>Both</strong> the x86 and x64 versions. (the reason for this is that you&#8217;ll use the 32 bit debugger to debug 32bit crash dumps from other machines, and also 32bit apps running on your 64 bit machine. &#8211; also note, there are 2 64 bit verisons on Microsoft&#8217;s website &#8211; 99% of us want x64, not Itanium)</li>
</ul>
<p>    I assume you can downl0ad the 1 or 2 debuggers you&#8217;ll need, Go ahead and run the setup for each and install them to thier default locations.<br />
We&#8217;re not quite ready to do anything with the debuggers yet, first we need to discuss Symbol Files&#8230;</p>
<p><strong>Symbol files:</strong><br />
      You&#8217;ll want symbol files when you look at a crash dump or debug an app.</p>
<p> </p>
<p>     Symbol files are tied to each piece of software &#8211; Ideally you&#8217;ll have them for everything on your system.</p>
<p>     Unforunately, that&#8217;s rarely possible. The good news is you can get them for Windows, and that&#8217;s often enough.</p>
<p>     In the old days, you&#8217;d download the symbols you think you&#8217;d need from Microsoft and install them on your machine.</p>
<p>     That&#8217;s no longer necessary. The current Debugging tools for windows supports auto downloading symbol files from microsoft as needed.<br />
Unfortunately, the debugging tools don&#8217;t work that way out of the box, so that&#8217;ll be the first thing we get setup&#8230;</p>
<p>  <strong>Setting up windows, so your debugger knows what to do about symbol files</strong><br />
  It&#8217;s a shame this isn&#8217;t default behavior, but at least it&#8217;s not that hard&#8230;  I&#8217;ll show you how to configure an environment variable in windows, which the debugger will use automatically each time it runs. You don&#8217;t <em>have</em> to do this, you can still run the debugger without doing this, or you can run the debugger and then tell it manually about the symbolfiles, but you&#8217;re better off doing the environment variable thing now &#8211; get it out of the way so you don&#8217;t have to worry about it later&#8230;</p>
<p>  Setup the Environment Variable _NT_SYMBOL_PATH <br />
  Set it to <strong>SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols</strong></p>
<p>  To do this, in windows, right click on &#8216;my computer&#8217; or &#8216;computer&#8217; and click &#8216;properties&#8217;.  Earlier versions of windows show a nice tab dialog, later versions of windows (Vista, 2008, 7&#8230;) show a fancy screen also known as the &#8216;system&#8217; control panel &#8211; if this iswhat you see, then click on &#8216;Advanced System Settings&#8217;. Now you should see what your XP friends saw 2 sentences ago- the &#8220;System properties&#8221; dialog &#8211; click on the &#8216;advanced&#8217; tab, then on the &#8216;environment variables&#8217; button.</p>
<p> Add a new system variable and name it _NT_SYMBOL_PATH (note the text begins with the underscore) <br />
  Set it to <strong>SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols</strong></p>
<p> Notice in the line above there&#8217;s some references to the directory c:\mysymbols &#8211; We need to create that directory now. (If you want it somewhere else, that&#8217;s fine, just be sure to change it in _NT_SYMBOL_PATH.</p>
<p>The other bit of interest is that link to microsoft&#8217;s symbol website..</p>
<p>Basically what we&#8217;ve told the debugger is:</p>
<ol>
<li>Look for symbol files in c:\mysymbols</li>
<li>If you can&#8217;t find them, look for them at the website <a href="http://msdl.microsoft.com/download/symbols">http://msdl.microsoft.com/download/symbols</a></li>
</ol>
<p>If you didn&#8217;t create the c:\mysymbols directory yet, do so now&#8230;</p>
<p>If you have 2 debuggers installed (x86 and x64) you only need to do the above once.</p>
<p>Congratulations! You&#8217;re all setup.</p>
<p><strong>Closing Comments:</strong></p>
<p>The easiest thing to forget here is likely the environment variable _NT_SYMBOL_PATH and what to point it to.  Fortunately, this is actually pretty easy information to find in the help file.<br />
After installing the debugging tools for windows, Open the help file, click the &#8216;index&#8217; tab, then enter the word &#8216;env&#8217; (you can type out environment variables if you want, but it finds them after env)</p>
<p>Environment variables brings up 2 sections, General and Kernel-Mode &#8211; you want General. The page that appears shows all the _NT_YADA_YADA_YADA variables. NT_SYMBOL_PATH is the 4th one down.<br />
You have to click one more time to find out what to set it to, in the description there&#8217;s a link to &#8216;Symbol Path&#8217; &#8211; click that and get a page talking about he symbol path &#8211; down towards the bottom in red, is the symbol path you need.</p>
<p>In my next part, I&#8217;ll show how to open a crash dump file and a few easy commands you can use <em>before</em> you go searching google for that long hex code you wrote down by hand when your system blue screened.</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/getting-started-with-debugging-part1-setting-up-the-debugger-and-symbols/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging app crashes on windows</title>
		<link>http://basementjack.com/uncategorized/debugging-app-crashes-on-windows/</link>
		<comments>http://basementjack.com/uncategorized/debugging-app-crashes-on-windows/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 10:57:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Crash]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=75</guid>
		<description><![CDATA[At some point or another it happens: either windows blue screens, or an application locks up. With a little effort, there&#8217;s no need to feel helpless nor to guess at what the problem might be, debugging tools for windows can help. below is a summary of some techniques &#8211; sorry that its not real descriptive. [...]]]></description>
			<content:encoded><![CDATA[<p>At some point or another it happens: either windows blue screens, or an application locks up.<br />
With a little effort, there&#8217;s no need to feel helpless nor to guess at what the problem might be,<br />
debugging tools for windows can help.</p>
<p>below is a summary of some techniques &#8211; sorry that its not real descriptive. I&#8217;ll add to it one day &#8211; I promise..</p>
<p>In vista, you need to attach to the dying process.<br />
Launch windebug and attach to the dying process.</p>
<p>Configure vista or 2008 to always generate a dump file (for application crashes)<br />
Create key named:<br />
Hklm\software\microsoft\windows\windows error reporting\localdumps</p>
<p>Dumps go to %localappdata%\crashdumps<br />
Override with a Dumpfolder (string) value<br />
Limit dump history with a dumpcount (dword) value</p>
<p>!analyze –v</p>
<p>If this doesn’t work –<br />
Look at the thread stack for functions with ‘fault’ ‘exception’ or ‘error’<br />
Open callstack window – the look at the threads looking for stacks</p>
<p>~0 kb (inspect call stack of CPU0)<br />
~1 kb  (inspect call stack of CPU1)<br />
Lm kvmvpn* (list driver version?)</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/debugging-app-crashes-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

