<?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>Skypher &#187; Debugging</title>
	<atom:link href="http://skypher.com/index.php/category/debugging/feed/" rel="self" type="application/rss+xml" />
	<link>http://skypher.com</link>
	<description>The blog for absolutely nothing!</description>
	<lastBuildDate>Sat, 19 Nov 2011 22:09:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JIT Debugging 32-bit applications on 64-bit Windows</title>
		<link>http://skypher.com/index.php/2009/08/27/jit-debugging-32-bit-applications-on-64-bit-windows/</link>
		<comments>http://skypher.com/index.php/2009/08/27/jit-debugging-32-bit-applications-on-64-bit-windows/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 08:08:19 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Registry]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=176</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>I found that using the x64 <a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx">Debugging Tools</a> to debug x86 applications on 64-bit windows can lead to all kinds of problems. I recently installed both the x64 as well as the x86 Debugging Tools side-by-side on my system, so I can use the x86 debuggers for 32-bit applications and this seems to solve all my problems. Setting up just-in-time debugging to use the x86 debugger for 32-bit applications and the x64 debugger for 64-bit applications can be done through using regedit.exe. On x64 versions of windows, the &#8220;<TT>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug</TT>&#8221; key is used for JIT debugging 64-bit applications and the &#8220;<TT>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug</TT>&#8221; key is used for 32-bit applications. This means you can set one to the x64 debugger and the other to the x86 debugger. Here&#8217;s is an example .reg file that does exactly this:</p>
<p><CODE><br />
Windows Registry Editor Version 5.00<br />
&nbsp;<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]<br />
&#8220;Debugger&#8221;=&#8221;\&#8221;C:\\Program Files\\Debugging Tools for Windows (x64)\\windbg.exe\&#8221; -p %ld -e %ld -g&#8221;<br />
&nbsp;<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]<br />
&#8220;Debugger&#8221;=&#8221;\&#8221;C:\\Program Files (x86)\\Debugging Tools for Windows (x86)\\windbg.exe\&#8221; -p %ld -e %ld -g&#8221;<br />
</CODE></p>
<p>This sample file can be downloaded <a href="http://skypher.com/SkyLined/download/registry/AeDebug%20-%20WinDbg%20x86-x64.reg">here</a>.</p>
<p>In <a href="http://skypher.com/index.php/2009/01/05/windbg-explorer-integration/">a previous post</a>, I described how to create explorer integration for WinDbg. If you have both the x86 and the x64 Debugging Tools installed, you may want to be able to choose which debugger you open an application with. This can be achieve by creating two entries, one for the x86 debugger and one for the x64 debugger. Here is an example .reg file that does this:</p>
<p><CODE><br />
Windows Registry Editor Version 5.00<br />
&nbsp;<br />
[HKEY_CLASSES_ROOT\exefile\shell\WinDbg x86]<br />
&nbsp;<br />
[HKEY_CLASSES_ROOT\exefile\shell\WinDbg x86\command]<br />
&#8220;IsolatedCommand&#8221;=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,\<br />
  46,00,69,00,6c,00,65,00,73,00,28,00,78,00,38,00,36,00,29,00,25,00,5c,00,44,\<br />
  00,65,00,62,00,75,00,67,00,67,00,69,00,6e,00,67,00,20,00,54,00,6f,00,6f,00,\<br />
  6c,00,73,00,20,00,66,00,6f,00,72,00,20,00,57,00,69,00,6e,00,64,00,6f,00,77,\<br />
  00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,77,00,69,00,6e,00,64,00,\<br />
  62,00,67,00,2e,00,65,00,78,00,65,00,22,00,20,00,2d,00,6f,00,20,00,2d,00,73,\<br />
  00,66,00,6c,00,61,00,67,00,73,00,20,00,30,00,78,00,38,00,30,00,30,00,33,00,\<br />
  30,00,32,00,33,00,33,00,20,00,2d,00,57,00,20,00,53,00,6b,00,79,00,4c,00,69,\<br />
  00,6e,00,65,00,64,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00<br />
@=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,\<br />
  00,65,00,73,00,28,00,78,00,38,00,36,00,29,00,25,00,5c,00,44,00,65,00,62,00,\<br />
  75,00,67,00,67,00,69,00,6e,00,67,00,20,00,54,00,6f,00,6f,00,6c,00,73,00,20,\<br />
  00,66,00,6f,00,72,00,20,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,\<br />
  28,00,78,00,38,00,36,00,29,00,5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,2e,\<br />
  00,65,00,78,00,65,00,22,00,20,00,2d,00,6f,00,20,00,2d,00,73,00,66,00,6c,00,\<br />
  61,00,67,00,73,00,20,00,30,00,78,00,38,00,30,00,30,00,33,00,30,00,32,00,33,\<br />
  00,33,00,20,00,2d,00,57,00,20,00,53,00,6b,00,79,00,4c,00,69,00,6e,00,65,00,\<br />
  64,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00<br />
&nbsp;<br />
[HKEY_CLASSES_ROOT\exefile\shell\WinDbg x64]<br />
&nbsp;<br />
[HKEY_CLASSES_ROOT\exefile\shell\WinDbg x64\command]<br />
&#8220;IsolatedCommand&#8221;=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,\<br />
  46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,44,00,65,00,62,00,75,00,67,00,67,\<br />
  00,69,00,6e,00,67,00,20,00,54,00,6f,00,6f,00,6c,00,73,00,20,00,66,00,6f,00,\<br />
  72,00,20,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,28,00,78,00,36,\<br />
  00,34,00,29,00,5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,2e,00,65,00,78,00,\<br />
  65,00,22,00,20,00,2d,00,6f,00,20,00,2d,00,73,00,66,00,6c,00,61,00,67,00,73,\<br />
  00,20,00,30,00,78,00,38,00,30,00,30,00,33,00,30,00,32,00,33,00,33,00,20,00,\<br />
  2d,00,57,00,20,00,53,00,6b,00,79,00,4c,00,69,00,6e,00,65,00,64,00,20,00,22,\<br />
  00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00<br />
@=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,\<br />
  00,65,00,73,00,25,00,5c,00,44,00,65,00,62,00,75,00,67,00,67,00,69,00,6e,00,\<br />
  67,00,20,00,54,00,6f,00,6f,00,6c,00,73,00,20,00,66,00,6f,00,72,00,20,00,57,\<br />
  00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,28,00,78,00,36,00,34,00,29,00,\<br />
  5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,2e,00,65,00,78,00,65,00,22,00,20,\<br />
  00,2d,00,6f,00,20,00,2d,00,73,00,66,00,6c,00,61,00,67,00,73,00,20,00,30,00,\<br />
  78,00,38,00,30,00,30,00,33,00,30,00,32,00,33,00,33,00,20,00,2d,00,57,00,20,\<br />
  00,53,00,6b,00,79,00,4c,00,69,00,6e,00,65,00,64,00,20,00,22,00,25,00,31,00,\<br />
  22,00,20,00,25,00,2a,00,00,00<br />
</CODE><br />
(Note: these entries also add specific command-line options that I like to use &#8211; you can use regedit.exe to remove or change them to whatever you want).</p>
<p>This sample file can be downloaded <a href="http://skypher.com/SkyLined/download/registry/exefile%20-%20WinDbg%20x86-x64.reg">here</a>. If you installed my previous implementation of explorer integration, you may want to delete the &#8220;<TT>HKEY_CLASSES_ROOT\exefile\shell\WinDbg</TT>&#8221; key to remove it. Otherwise you&#8217;ll have three WinDbg options to choose from, two of which are duplicates and do exactly the same thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2009/08/27/jit-debugging-32-bit-applications-on-64-bit-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinDbg explorer integration</title>
		<link>http://skypher.com/index.php/2009/01/05/windbg-explorer-integration/</link>
		<comments>http://skypher.com/index.php/2009/01/05/windbg-explorer-integration/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 09:16:57 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[regedit]]></category>
		<category><![CDATA[WinDbg]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=82</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>You can execute any .exe file (and link to .exe file, with arguments) running under WinDbg by right clicking it and selecting &#8220;WinDbg&#8221; by adding the following to your registry:</p>
<p>Create the key &#8220;<TT>HKEY_CLASSES_ROOT\exefile\shell\WinDbg\command</TT>&#8221; and set the default value to a REG_EXPAND_SZ with this value:<br />
<CODE><br />
&#8220;%ProgramFiles%\Debugging Tools for Windows (x64)\windbg.exe&#8221; -o -W <em>[Your workspace]</em> &#8220;%1&#8243; %*<br />
&nbsp;<br />
</CODE><br />
-or-<br />
<CODE><br />
&#8220;%ProgramFiles%\Debugging Tools for Windows (x86)\windbg.exe&#8221; -o -W[Your workspace] &#8221;%1&#8243; %*<br />
&nbsp;<br />
</CODE></p>
<div>(Choose the  x64 or x86 version depending on your OS).</div>
<div>The option &#8220;<TT>-W <em>[Your workspace]</em></TT>&#8221; tells Windbg to use a specific workspace and &#8220;-o&#8221; option tells WinDbg to also debug child processes started by the .exe. You can omit both options if you prefer.</div>
<p>Here&#8217;s an example .reg file for x64 that uses the &#8220;SkyLined&#8221; workspace, you can use it to get started and modify the key using regedit to fit your needs. It can be downloaded <a href="http://skypher.com/SkyLined/download/registry/windbg%20explorer%20integration.reg">here</a>:<br />
<CODE><br />
Windows Registry Editor Version 5.00<br />
&nbsp;<br />
[HKEY_CLASSES_ROOT\exefile\shell\WinDbg]<br />
&nbsp;<br />
[HKEY_CLASSES_ROOT\exefile\shell\WinDbg\command]<br />
@=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,\<br />
6c,00,65,00,73,00,25,00,5c,00,44,00,65,00,62,00,75,00,67,00,67,00,69,00,6e,\<br />
00,67,00,20,00,54,00,6f,00,6f,00,6c,00,73,00,20,00,66,00,6f,00,72,00,20,00,\<br />
57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,28,00,78,00,36,00,34,00,29,\<br />
00,5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,2e,00,65,00,78,00,65,00,22,00,\<br />
20,00,2d,00,6f,00,20,00,2d,00,57,00,20,00,53,00,6b,00,79,00,4c,00,69,00,6e,\<br />
00,65,00,64,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00<br />
&nbsp;<br />
</CODE></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2009/01/05/windbg-explorer-integration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

