<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Gdb patches</title>
	<atom:link href="http://reverse.put.as/2009/08/26/gdb-patches/feed/" rel="self" type="application/rss+xml" />
	<link>http://reverse.put.as/2009/08/26/gdb-patches/</link>
	<description>Reverse Engineering for fun and pleasure!</description>
	<lastBuildDate>Sat, 04 Feb 2012 02:28:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15228</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Sun, 20 Feb 2011 10:58:52 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15228</guid>
		<description>Very well! Part of the reversing effort is searching, reading and thinking. That&#039;s why it&#039;s fun!</description>
		<content:encoded><![CDATA[<p>Very well! Part of the reversing effort is searching, reading and thinking. That&#8217;s why it&#8217;s fun!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15219</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Sun, 20 Feb 2011 03:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15219</guid>
		<description>Dear fG!

After some googling I found out how to patch and compile gdb, using the Snow Leopard 10.6.6 (Build 10J567) darwinbuild.

I followed your instructions to build gdb from source, then I unpacked the &quot;gdb-1344.tar.gz&quot;, patched with your &quot;all_patches.patch&quot; file, and I packed it again as &quot;gdb-1344.tar.&quot;

So I issued a &quot;darwinbuild -nochroot gdb&quot; command and it compiled like a charm!

Now I&#039;m able to take advantage of all your output improvements on gdb :-) 

By the way, I love how gdb now displays the raw bytes in x/i and disassemble commands!

Thanks a lot once more for all your attention and help. Now I&#039;m already making some progresses in my reversing efforts.

I&#039;ll keep you posted how it goes ;-)

Regards,

Neo</description>
		<content:encoded><![CDATA[<p>Dear fG!</p>
<p>After some googling I found out how to patch and compile gdb, using the Snow Leopard 10.6.6 (Build 10J567) darwinbuild.</p>
<p>I followed your instructions to build gdb from source, then I unpacked the &#8220;gdb-1344.tar.gz&#8221;, patched with your &#8220;all_patches.patch&#8221; file, and I packed it again as &#8220;gdb-1344.tar.&#8221;</p>
<p>So I issued a &#8220;darwinbuild -nochroot gdb&#8221; command and it compiled like a charm!</p>
<p>Now I&#8217;m able to take advantage of all your output improvements on gdb <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>By the way, I love how gdb now displays the raw bytes in x/i and disassemble commands!</p>
<p>Thanks a lot once more for all your attention and help. Now I&#8217;m already making some progresses in my reversing efforts.</p>
<p>I&#8217;ll keep you posted how it goes <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Regards,</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15207</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Sat, 19 Feb 2011 17:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15207</guid>
		<description>Dear fG!

I start gdb using &quot;sudo gdb&quot;, then I issue &quot;exec-file ./example&quot; command and gdb gives me the output &quot;unable to read unknown load command 0×80000022&quot;. 

Maybe we can try another approach. I&#039;ve been able to compile gdb with darwin build following your instructions.

I can play around with your example file and with other programs as well, but I really want to apply your patches to display raw bytes in x/i and disassemble commands. 

Inside /usr/libexec/gdb I issue:

sudo patch -p2 gdb-i386-apple-darwin all_patches.patch

But I receive this output:

patching file gdb-i386-apple-darwin
Hunk #1 FAILED at 1905.
Hunk #2 FAILED at 1955.
Hunk #3 FAILED at 1993.
Hunk #4 FAILED at 2017.
Hunk #5 FAILED at 2068.
Hunk #6 FAILED at 2096.
6 out of 6 hunks FAILED -- saving rejects to file gdb-i386-apple-darwin.rej
can&#039;t find file to patch at input line 177
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
&#124;diff -r b4b157088bc8 gdb-768/src/gdb/disasm.c
&#124;--- a/gdb-768/src/gdb/disasm.c	Wed Aug 12 10:58:48 2009 +0100
&#124;+++ b/gdb-768/src/gdb/disasm.c	Wed Aug 26 15:09:04 2009 +0100
--------------------------
File to patch: 

How can I properly apply your all_patches.patch?

Thanks again for your patience!

Neo</description>
		<content:encoded><![CDATA[<p>Dear fG!</p>
<p>I start gdb using &#8220;sudo gdb&#8221;, then I issue &#8220;exec-file ./example&#8221; command and gdb gives me the output &#8220;unable to read unknown load command 0×80000022&#8243;. </p>
<p>Maybe we can try another approach. I&#8217;ve been able to compile gdb with darwin build following your instructions.</p>
<p>I can play around with your example file and with other programs as well, but I really want to apply your patches to display raw bytes in x/i and disassemble commands. </p>
<p>Inside /usr/libexec/gdb I issue:</p>
<p>sudo patch -p2 gdb-i386-apple-darwin all_patches.patch</p>
<p>But I receive this output:</p>
<p>patching file gdb-i386-apple-darwin<br />
Hunk #1 FAILED at 1905.<br />
Hunk #2 FAILED at 1955.<br />
Hunk #3 FAILED at 1993.<br />
Hunk #4 FAILED at 2017.<br />
Hunk #5 FAILED at 2068.<br />
Hunk #6 FAILED at 2096.<br />
6 out of 6 hunks FAILED &#8212; saving rejects to file gdb-i386-apple-darwin.rej<br />
can&#8217;t find file to patch at input line 177<br />
Perhaps you used the wrong -p or &#8211;strip option?<br />
The text leading up to this was:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
|diff -r b4b157088bc8 gdb-768/src/gdb/disasm.c<br />
|&#8212; a/gdb-768/src/gdb/disasm.c	Wed Aug 12 10:58:48 2009 +0100<br />
|+++ b/gdb-768/src/gdb/disasm.c	Wed Aug 26 15:09:04 2009 +0100<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
File to patch: </p>
<p>How can I properly apply your all_patches.patch?</p>
<p>Thanks again for your patience!</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15196</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Fri, 18 Feb 2011 23:51:13 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15196</guid>
		<description>Just re-tested the example and it&#039;s ok for me.
How did you started gdb? And the next steps?

This shouldn&#039;t have an impact but try to execute the following commands:
sudo chown root:procmod /usr/libexec/gdb/gdb-i386-apple-darwin
sudo chmod g+s /usr/libexec/gdb/gdb-i386-apple-darwin

This should fix permissions for gdb binary (but the problem shouldn&#039;t be originated in this).</description>
		<content:encoded><![CDATA[<p>Just re-tested the example and it&#8217;s ok for me.<br />
How did you started gdb? And the next steps?</p>
<p>This shouldn&#8217;t have an impact but try to execute the following commands:<br />
sudo chown root:procmod /usr/libexec/gdb/gdb-i386-apple-darwin<br />
sudo chmod g+s /usr/libexec/gdb/gdb-i386-apple-darwin</p>
<p>This should fix permissions for gdb binary (but the problem shouldn&#8217;t be originated in this).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15164</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Thu, 17 Feb 2011 17:17:38 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15164</guid>
		<description>Dear fG!

Following your beginners-tutorial-II.txt, I&#039;ve been able to write and compile the example.c program, but under gdb I receive this message:

gdb$ exec-file ./example

unable to read unknown load command 0x80000022

And this is my gdb configuration is:

-rwxrwsr-x  1 Neo-Mac  procmod  3051328 Feb 16 20:03 /usr/libexec/gdb/gdb-i386-apple-darwin

Is any else that I must do make gdb work properly?

Thanks,

Neo</description>
		<content:encoded><![CDATA[<p>Dear fG!</p>
<p>Following your beginners-tutorial-II.txt, I&#8217;ve been able to write and compile the example.c program, but under gdb I receive this message:</p>
<p>gdb$ exec-file ./example</p>
<p>unable to read unknown load command 0&#215;80000022</p>
<p>And this is my gdb configuration is:</p>
<p>-rwxrwsr-x  1 Neo-Mac  procmod  3051328 Feb 16 20:03 /usr/libexec/gdb/gdb-i386-apple-darwin</p>
<p>Is any else that I must do make gdb work properly?</p>
<p>Thanks,</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15148</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Thu, 17 Feb 2011 01:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15148</guid>
		<description>Thanks fG! 

Now all is working.

I&#039;ll let you know how things are going.

Neo</description>
		<content:encoded><![CDATA[<p>Thanks fG! </p>
<p>Now all is working.</p>
<p>I&#8217;ll let you know how things are going.</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15147</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Thu, 17 Feb 2011 00:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15147</guid>
		<description>You don&#039;t need to, the binary has all the patches applied.
If you ever want to compile and hack other patches, read http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/</description>
		<content:encoded><![CDATA[<p>You don&#8217;t need to, the binary has all the patches applied.<br />
If you ever want to compile and hack other patches, read <a href="http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/" rel="nofollow">http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15146</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Thu, 17 Feb 2011 00:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15146</guid>
		<description>Just another question.

Now that I have a working copy of your modified gdb binary, how do I apply the &quot;all_patches.patch&quot;?

Thanks,

Neo</description>
		<content:encoded><![CDATA[<p>Just another question.</p>
<p>Now that I have a working copy of your modified gdb binary, how do I apply the &#8220;all_patches.patch&#8221;?</p>
<p>Thanks,</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15145</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Thu, 17 Feb 2011 00:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15145</guid>
		<description>Dear gG!

It WORKED!!!

WOW! What a UNIX lesson! Thanks a bunch!

Sure, I won&#039;t share cracks around. I&#039;ll do it just for fun and for challenges&#039; sake. This is one thing that I always wanted to do, mess around with Assembly. I&#039;m a Mac OS X programmer wanna be and I was kinda bored with my programming tasks routine.

Many, many thanks once more. 

You rule!

Neo</description>
		<content:encoded><![CDATA[<p>Dear gG!</p>
<p>It WORKED!!!</p>
<p>WOW! What a UNIX lesson! Thanks a bunch!</p>
<p>Sure, I won&#8217;t share cracks around. I&#8217;ll do it just for fun and for challenges&#8217; sake. This is one thing that I always wanted to do, mess around with Assembly. I&#8217;m a Mac OS X programmer wanna be and I was kinda bored with my programming tasks routine.</p>
<p>Many, many thanks once more. </p>
<p>You rule!</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15143</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Wed, 16 Feb 2011 23:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15143</guid>
		<description>Ok I replicated your issue and I understand it now :-)
After unpacking, you need to issue the following commands:
&quot;sudo cp /usr/libexec/gdb/gdb-i386-apple-darwin gdb-i386-apple-darwin.orig&quot;
(this will backup the original binary)
&quot;sudo cp gdb-i386-apple-darwin /usr/libexec/gdb/&quot;
(this will copy the unpacked binary over the original, you should the full path to the unpacked binary or position yourself there)
&quot;sudo chmod +x /usr/libexec/gdb/gdb-i386-apple-darwin&quot;
(cp should inherit permissions but to be safe, just readd executable permissions to the new binary)

You need to do this because in reality the gdb command is a script that further calls for the correct binary in that location. Your document problem is because the unpacked binary doesn&#039;t have execution permission (you can verify this by adding the execute permission to that binary &quot;chmod +x binary_name&quot;). This is a security feature of Unix systems :-)

Have fun, don&#039;t spread the cracks ;-)
fG!</description>
		<content:encoded><![CDATA[<p>Ok I replicated your issue and I understand it now <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
After unpacking, you need to issue the following commands:<br />
&#8220;sudo cp /usr/libexec/gdb/gdb-i386-apple-darwin gdb-i386-apple-darwin.orig&#8221;<br />
(this will backup the original binary)<br />
&#8220;sudo cp gdb-i386-apple-darwin /usr/libexec/gdb/&#8221;<br />
(this will copy the unpacked binary over the original, you should the full path to the unpacked binary or position yourself there)<br />
&#8220;sudo chmod +x /usr/libexec/gdb/gdb-i386-apple-darwin&#8221;<br />
(cp should inherit permissions but to be safe, just readd executable permissions to the new binary)</p>
<p>You need to do this because in reality the gdb command is a script that further calls for the correct binary in that location. Your document problem is because the unpacked binary doesn&#8217;t have execution permission (you can verify this by adding the execute permission to that binary &#8220;chmod +x binary_name&#8221;). This is a security feature of Unix systems <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Have fun, don&#8217;t spread the cracks <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
fG!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15142</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Wed, 16 Feb 2011 23:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15142</guid>
		<description>Dear fG!

Thanks for your quick reply. 

What I mean by &quot;Text Document&quot; is that when I hit command + I on the uncompressed bz2 file downloaded from http://reverse.put.as/wp-content/uploads/2009/08/gdb-i386-apple-darwin.bz2, it shows me in the &quot;Kind&quot; of file as being &quot;Document&quot;, instead of &quot;Unix Executable File&quot;. 

I did try to uncompress via Terminal, as you taught me, but the result is the same as double clicking the compressed file, giving me the &quot;Document&quot; kind of file and not a &quot;Unix Executable File&quot;.

If you don&#039;t mind, could you please send me the gdb uncompressed binary to my e-mail address?

By the way, now I&#039;m really exited to get started reverse-engineering under Mac OS X, because you really are a great teacher for beginners, sharing true knowledge. That&#039;s the hacker spirit from the 80&#039;s!

I do appreciate your attention!

Regards,
Neo</description>
		<content:encoded><![CDATA[<p>Dear fG!</p>
<p>Thanks for your quick reply. </p>
<p>What I mean by &#8220;Text Document&#8221; is that when I hit command + I on the uncompressed bz2 file downloaded from <a href="http://reverse.put.as/wp-content/uploads/2009/08/gdb-i386-apple-darwin.bz2" rel="nofollow">http://reverse.put.as/wp-content/uploads/2009/08/gdb-i386-apple-darwin.bz2</a>, it shows me in the &#8220;Kind&#8221; of file as being &#8220;Document&#8221;, instead of &#8220;Unix Executable File&#8221;. </p>
<p>I did try to uncompress via Terminal, as you taught me, but the result is the same as double clicking the compressed file, giving me the &#8220;Document&#8221; kind of file and not a &#8220;Unix Executable File&#8221;.</p>
<p>If you don&#8217;t mind, could you please send me the gdb uncompressed binary to my e-mail address?</p>
<p>By the way, now I&#8217;m really exited to get started reverse-engineering under Mac OS X, because you really are a great teacher for beginners, sharing true knowledge. That&#8217;s the hacker spirit from the 80&#8242;s!</p>
<p>I do appreciate your attention!</p>
<p>Regards,<br />
Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15138</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Wed, 16 Feb 2011 21:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15138</guid>
		<description>Hum.. what do you mean by text file ? It should decompress a binary. Try to decompress via Terminal: bunzip2 gdb-i386-apple-darwin.bz2</description>
		<content:encoded><![CDATA[<p>Hum.. what do you mean by text file ? It should decompress a binary. Try to decompress via Terminal: bunzip2 gdb-i386-apple-darwin.bz2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-15123</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Wed, 16 Feb 2011 16:17:55 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-15123</guid>
		<description>Hi fG!

Thanks for your G-R-E-A-T blog!

When I download the file gdb-i386-apple-darwin.bz2 and decompress it a text document file appears, instead of your binary.

What should a I do?

Thanks!

Neo</description>
		<content:encoded><![CDATA[<p>Hi fG!</p>
<p>Thanks for your G-R-E-A-T blog!</p>
<p>When I download the file gdb-i386-apple-darwin.bz2 and decompress it a text document file appears, instead of your binary.</p>
<p>What should a I do?</p>
<p>Thanks!</p>
<p>Neo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-12489</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Tue, 26 Oct 2010 00:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-12489</guid>
		<description>Thank you :-)

All the credits for gdbinit go to Mammon and all the authors that fixed and added a lot of stuff! I just jumped in and added a few more!</description>
		<content:encoded><![CDATA[<p>Thank you <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>All the credits for gdbinit go to Mammon and all the authors that fixed and added a lot of stuff! I just jumped in and added a few more!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Han Solo</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-12488</link>
		<dc:creator>Han Solo</dc:creator>
		<pubDate>Mon, 25 Oct 2010 22:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-12488</guid>
		<description>fG: your patches absolutely rock...

Just wanted to stop by and say thanks that you share your knowledge and your tools. I absolutely love your Softice derived UI ;-)

And now with IDA being QT based and available with GUI on Mac, I really feel like home.

Kudos...</description>
		<content:encoded><![CDATA[<p>fG: your patches absolutely rock&#8230;</p>
<p>Just wanted to stop by and say thanks that you share your knowledge and your tools. I absolutely love your Softice derived UI <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>And now with IDA being QT based and available with GUI on Mac, I really feel like home.</p>
<p>Kudos&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-5466</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Thu, 28 Jan 2010 18:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-5466</guid>
		<description>Nope. You have to patch and recompile.</description>
		<content:encoded><![CDATA[<p>Nope. You have to patch and recompile.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NeoBetas</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-5411</link>
		<dc:creator>NeoBetas</dc:creator>
		<pubDate>Mon, 25 Jan 2010 08:44:56 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-5411</guid>
		<description>Is there anyways to modified .gdb_init to show the raw bytes instead patching and recompiling?</description>
		<content:encoded><![CDATA[<p>Is there anyways to modified .gdb_init to show the raw bytes instead patching and recompiling?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-4101</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Fri, 23 Oct 2009 21:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-4101</guid>
		<description>The patches work for Snow Leopard without a problem. Someone already left all the required steps to compile it for Snow Leopard :)</description>
		<content:encoded><![CDATA[<p>The patches work for Snow Leopard without a problem. Someone already left all the required steps to compile it for Snow Leopard <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-4100</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 23 Oct 2009 15:19:08 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-4100</guid>
		<description>Also what about patches for Snow Leopard / 64-bit? :)</description>
		<content:encoded><![CDATA[<p>Also what about patches for Snow Leopard / 64-bit? <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-4099</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 23 Oct 2009 15:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-4099</guid>
		<description>Did you file a radar about this? It&#039;s possible that Apple would fix these bugs.</description>
		<content:encoded><![CDATA[<p>Did you file a radar about this? It&#8217;s possible that Apple would fix these bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: x_O</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3864</link>
		<dc:creator>x_O</dc:creator>
		<pubDate>Tue, 15 Sep 2009 23:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3864</guid>
		<description>Nope. That was it. It&#039;s all working now. Thanks fG!</description>
		<content:encoded><![CDATA[<p>Nope. That was it. It&#8217;s all working now. Thanks fG!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3863</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Tue, 15 Sep 2009 23:09:57 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3863</guid>
		<description>$ ls -la /usr/libexec/gdb/gdb-i386-apple-darwin
-rwxr-sr-x  1 root  procmod  3051328 Aug 26 23:31 /usr/libexec/gdb/gdb-i386-apple-darwin

Do you have the s bit set and group procmod ?</description>
		<content:encoded><![CDATA[<p>$ ls -la /usr/libexec/gdb/gdb-i386-apple-darwin<br />
-rwxr-sr-x  1 root  procmod  3051328 Aug 26 23:31 /usr/libexec/gdb/gdb-i386-apple-darwin</p>
<p>Do you have the s bit set and group procmod ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: x_O</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3862</link>
		<dc:creator>x_O</dc:creator>
		<pubDate>Tue, 15 Sep 2009 23:04:21 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3862</guid>
		<description>I backed up the original gdb-i386-apple-darwin to gdb-i386-apple-darwin.orig and copied your patched version to /usr/libexec/gdb/. I load a file in GDB using exec-file and upon executing the &quot;run&quot; command, I too receive the error: &quot;Unable to find Mach task port for process-id 70506: (os/kern) failure (0×5).&quot; The only way I&#039;ve found to get rid of the error is to issue &quot;sudo gdb&quot; instead of just &quot;gdb&quot;. Is there a way to I could run GDB without having to issue the sudo command (to circumvent that error)? I&#039;m running as an Admin account and the file permissions on gdb-i386-apple-darwin (patched version) are the same as the original I backed up.</description>
		<content:encoded><![CDATA[<p>I backed up the original gdb-i386-apple-darwin to gdb-i386-apple-darwin.orig and copied your patched version to /usr/libexec/gdb/. I load a file in GDB using exec-file and upon executing the &#8220;run&#8221; command, I too receive the error: &#8220;Unable to find Mach task port for process-id 70506: (os/kern) failure (0×5).&#8221; The only way I&#8217;ve found to get rid of the error is to issue &#8220;sudo gdb&#8221; instead of just &#8220;gdb&#8221;. Is there a way to I could run GDB without having to issue the sudo command (to circumvent that error)? I&#8217;m running as an Admin account and the file permissions on gdb-i386-apple-darwin (patched version) are the same as the original I backed up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3768</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Thu, 10 Sep 2009 11:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3768</guid>
		<description>Ahhhhhhhhhhhhhhhhh ! That explains... I tried to understand if you had copied it or not. I assumed you did because you tried to change permissions (which now seems like a rather lame assumption since I should have remembered that copy preserves permissions hehehe).

You have to copy the binary because gdb command in reality is a script at /usr/bin/gdb. It does some magic due to different architectures :)</description>
		<content:encoded><![CDATA[<p>Ahhhhhhhhhhhhhhhhh ! That explains&#8230; I tried to understand if you had copied it or not. I assumed you did because you tried to change permissions (which now seems like a rather lame assumption since I should have remembered that copy preserves permissions hehehe).</p>
<p>You have to copy the binary because gdb command in reality is a script at /usr/bin/gdb. It does some magic due to different architectures <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wishi</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3766</link>
		<dc:creator>wishi</dc:creator>
		<pubDate>Thu, 10 Sep 2009 08:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3766</guid>
		<description>I missed something... I didn&#039;t copy the binary to /usr/libexec/gdb/ but just called it directly.
- Debugging as root was/is possible without problems: task_for_pid() by default is only accessible by root (or procmod) (http://developer.apple.com/legacy/mac/library/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/universal_binary_tips.html). 

However I wonder why the binary has to be in a specific path... Anyhow. 

Sorry ;) But I learned something.</description>
		<content:encoded><![CDATA[<p>I missed something&#8230; I didn&#8217;t copy the binary to /usr/libexec/gdb/ but just called it directly.<br />
- Debugging as root was/is possible without problems: task_for_pid() by default is only accessible by root (or procmod) (<a href="http://developer.apple.com/legacy/mac/library/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/universal_binary_tips.html" rel="nofollow">http://developer.apple.com/legacy/mac/library/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/universal_binary_tips.html</a>). </p>
<p>However I wonder why the binary has to be in a specific path&#8230; Anyhow. </p>
<p>Sorry <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  But I learned something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3764</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Wed, 09 Sep 2009 22:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3764</guid>
		<description>I had some free time but I can&#039;t reproduce the bug... I tested with a clean vmware snapshot and replaced original gdb binary with this one and it works... Tried to attach to a running program and it was fine. Tried to run a new program and it was fine... Hummm something is missing ! My Xcode version is 3.1.

Any ideas ? Must find some more free time to try to reproduce this hehehe</description>
		<content:encoded><![CDATA[<p>I had some free time but I can&#8217;t reproduce the bug&#8230; I tested with a clean vmware snapshot and replaced original gdb binary with this one and it works&#8230; Tried to attach to a running program and it was fine. Tried to run a new program and it was fine&#8230; Hummm something is missing ! My Xcode version is 3.1.</p>
<p>Any ideas ? Must find some more free time to try to reproduce this hehehe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonym</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3756</link>
		<dc:creator>anonym</dc:creator>
		<pubDate>Sun, 06 Sep 2009 23:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3756</guid>
		<description>I got the same err on test using your binary:
&quot;Unable to find Mach task port for process-id 70506: (os/kern) failure (0×5).&quot;
whatever i will use your patch and compile it later...

You have a very nice and informative blog!
i know you from the windows world for over 5 years ago.
i am a still reader, but i come twice time almost every day here.
please add the link to wishi&#039;s blog in your &quot;Links&quot; collection. (very nice blog too, wishi!)

Thank you and keep update! :D</description>
		<content:encoded><![CDATA[<p>I got the same err on test using your binary:<br />
&#8220;Unable to find Mach task port for process-id 70506: (os/kern) failure (0×5).&#8221;<br />
whatever i will use your patch and compile it later&#8230;</p>
<p>You have a very nice and informative blog!<br />
i know you from the windows world for over 5 years ago.<br />
i am a still reader, but i come twice time almost every day here.<br />
please add the link to wishi&#8217;s blog in your &#8220;Links&#8221; collection. (very nice blog too, wishi!)</p>
<p>Thank you and keep update! <img src='http://reverse.put.as/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wishi</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3754</link>
		<dc:creator>wishi</dc:creator>
		<pubDate>Sun, 06 Sep 2009 09:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3754</guid>
		<description>I guess I compile that stuff... because for testing reasons I used your binary. Debugging a Debugger: sounds like fun! ;)</description>
		<content:encoded><![CDATA[<p>I guess I compile that stuff&#8230; because for testing reasons I used your binary. Debugging a Debugger: sounds like fun! <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fG!</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3752</link>
		<dc:creator>fG!</dc:creator>
		<pubDate>Sat, 05 Sep 2009 20:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3752</guid>
		<description>Hello,

Thank you for the compliment :) Are you using the binary I provided or compiled it yourself (knowing your blog I would bet on this hehehe) ? I had that same error when I compiled gdb from Apple package out of the source. To compile correctly you need to refer to this process http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/ . You have to use darwinbuild. If you I can upload my image with my building environment.

Keep up the good work with your blog :)

fG!</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thank you for the compliment <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Are you using the binary I provided or compiled it yourself (knowing your blog I would bet on this hehehe) ? I had that same error when I compiled gdb from Apple package out of the source. To compile correctly you need to refer to this process <a href="http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/" rel="nofollow">http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/</a> . You have to use darwinbuild. If you I can upload my image with my building environment.</p>
<p>Keep up the good work with your blog <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>fG!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wishi</title>
		<link>http://reverse.put.as/2009/08/26/gdb-patches/comment-page-1/#comment-3751</link>
		<dc:creator>wishi</dc:creator>
		<pubDate>Sat, 05 Sep 2009 10:35:53 +0000</pubDate>
		<guid isPermaLink="false">http://reverse.put.as/?p=442#comment-3751</guid>
		<description>Hi ;)

You&#039;ve got a very interesting blog. Especially optimizing the Apple Dev Tools to be more reversing friendly is a kewl project. However I gave this a try and it doesn&#039;t work:

gdb$ r
Unable to find Mach task port for process-id 70506: (os/kern) failure (0x5).
gdb$ quit

Even if:

wishi@dawn ~/patched
% sudo chgrp procmod gdb-i386-apple-darwin 

wishi@dawn ~/patched
% sudo chmod 2755 gdb-i386-apple-darwin 

You don&#039;t get it working. Maybe I miss something crucial?</description>
		<content:encoded><![CDATA[<p>Hi <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>You&#8217;ve got a very interesting blog. Especially optimizing the Apple Dev Tools to be more reversing friendly is a kewl project. However I gave this a try and it doesn&#8217;t work:</p>
<p>gdb$ r<br />
Unable to find Mach task port for process-id 70506: (os/kern) failure (0&#215;5).<br />
gdb$ quit</p>
<p>Even if:</p>
<p>wishi@dawn ~/patched<br />
% sudo chgrp procmod gdb-i386-apple-darwin </p>
<p>wishi@dawn ~/patched<br />
% sudo chmod 2755 gdb-i386-apple-darwin </p>
<p>You don&#8217;t get it working. Maybe I miss something crucial?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

