<?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"
	>
<channel>
	<title>Comments on: Catching float- and struct-returning messages to nil</title>
	<atom:link href="http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/</link>
	<description>The Omni Mouth: standing outside your bedroom window playing \"In Your Eyes\" since 2006.</description>
	<pubDate>Mon, 13 Oct 2008 00:45:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Tom Bunch</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-43808</link>
		<dc:creator>Tom Bunch</dc:creator>
		<pubDate>Thu, 22 Mar 2007 21:55:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-43808</guid>
		<description>I found that this was breaking on a lot of methods I couldn't do anything about, so I looked up my backtrace and found

#0  0x90a573a0 in objc_msgSend_stret ()
#1  0x933c98be in -[NSView rectPreservedDuringLiveResize] ()

which led me to making my breakpoint conditional:

b *0x90a573a0 if *(void **)$esp != 0x933c98be

On intel.  On ppc, your return address is is $lr instead of *$esp.</description>
		<content:encoded><![CDATA[<p>I found that this was breaking on a lot of methods I couldn&#8217;t do anything about, so I looked up my backtrace and found</p>
<p>#0  0&#215;90a573a0 in objc_msgSend_stret ()<br />
#1  0&#215;933c98be in -[NSView rectPreservedDuringLiveResize] ()</p>
<p>which led me to making my breakpoint conditional:</p>
<p>b *0&#215;90a573a0 if *(void **)$esp != 0&#215;933c98be</p>
<p>On intel.  On ppc, your return address is is $lr instead of *$esp.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wim</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-40171</link>
		<dc:creator>Wim</dc:creator>
		<pubDate>Tue, 13 Mar 2007 09:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-40171</guid>
		<description>If you want something less fragile, you can set the _objc_nilReceiver variable to something non-nil, and messages sent to nil will be delivered to that object instead. The difficulty is that the same object is used for all kinds of messages, so the receiver had better have the right method signature for any given selector --- you can't dispatch based on the selector, because it'll be in the second or third argument register depending on whether it was a non-struct-returning or struct-returning call in the first place. (And id-returning messages to nil are harmless, well-defined, and very common.) I found it easier to just scan the objc_msgSend_stret assembly for the jump and break there.</description>
		<content:encoded><![CDATA[<p>If you want something less fragile, you can set the _objc_nilReceiver variable to something non-nil, and messages sent to nil will be delivered to that object instead. The difficulty is that the same object is used for all kinds of messages, so the receiver had better have the right method signature for any given selector &#8212; you can&#8217;t dispatch based on the selector, because it&#8217;ll be in the second or third argument register depending on whether it was a non-struct-returning or struct-returning call in the first place. (And id-returning messages to nil are harmless, well-defined, and very common.) I found it easier to just scan the objc_msgSend_stret assembly for the jump and break there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Maxwell</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-40038</link>
		<dc:creator>Adam Maxwell</dc:creator>
		<pubDate>Mon, 12 Mar 2007 17:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-40038</guid>
		<description>Sadly, I have only PPC machines (no objc_msgSend_fpret), but I caught a few objc_msgSend_stret cases with this.  Thanks!</description>
		<content:encoded><![CDATA[<p>Sadly, I have only PPC machines (no objc_msgSend_fpret), but I caught a few objc_msgSend_stret cases with this.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-40003</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 12 Mar 2007 14:38:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-40003</guid>
		<description>Having a symbol would be nice; it's pretty trivial to find the address, but you have to remember to update your .gdbinit in the first place.

The symbol under 10.5 is liable to change, but &lt;code&gt;x/i&lt;/code&gt; will let you fine it quickly.</description>
		<content:encoded><![CDATA[<p>Having a symbol would be nice; it&#8217;s pretty trivial to find the address, but you have to remember to update your .gdbinit in the first place.</p>
<p>The symbol under 10.5 is liable to change, but <code>x/i</code> will let you fine it quickly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tsai - Blog - Catching Float- and Struct-returning Messages to nil</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-39996</link>
		<dc:creator>Michael Tsai - Blog - Catching Float- and Struct-returning Messages to nil</dc:creator>
		<pubDate>Mon, 12 Mar 2007 14:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-39996</guid>
		<description>[...] Tim Wood shows what to put in your gdbinit so that you can catch when your code incorrectly sends a message nil. [...]</description>
		<content:encoded><![CDATA[<p>[...] Tim Wood shows what to put in your gdbinit so that you can catch when your code incorrectly sends a message nil. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DV Henkel-Wallace</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-39944</link>
		<dc:creator>DV Henkel-Wallace</dc:creator>
		<pubDate>Mon, 12 Mar 2007 10:25:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-39944</guid>
		<description>I don't _like_ it as it's fragile, but then again, so are such bugs....  Probably it's as good an approach as you'll ever get.  What's the location under 10.5?  That's the risk of putting it in your .gdbinit

This is pain enough to make it worth Apple's while to export a symbol for you.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t _like_ it as it&#8217;s fragile, but then again, so are such bugs&#8230;.  Probably it&#8217;s as good an approach as you&#8217;ll ever get.  What&#8217;s the location under 10.5?  That&#8217;s the risk of putting it in your .gdbinit</p>
<p>This is pain enough to make it worth Apple&#8217;s while to export a symbol for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-39871</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Mon, 12 Mar 2007 03:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.omnigroup.com/2007/03/11/catching-float-and-struct-returning-messages-to-nil/#comment-39871</guid>
		<description>Cool! I like it.</description>
		<content:encoded><![CDATA[<p>Cool! I like it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
