<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments on: Reference count debugging with gdb</title>
	<atom:link href="http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/feed/" rel="self" type="application/rss+xml" />
	<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/</link>
	<description>Ramblings on computers…</description>
	<lastBuildDate>Fri, 20 Jan 2012 21:19:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Arun Raghavan</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1037</link>
		<dc:creator>Arun Raghavan</dc:creator>
		<pubDate>Wed, 14 Jul 2010 05:34:58 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1037</guid>
		<description>Just for completeness - the point of using the watchpoint is that most hardware supports this construct, so it works a lot faster.</description>
		<content:encoded><![CDATA[<p>Just for completeness - the point of using the watchpoint is that most hardware supports this construct, so it works a lot faster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arun Raghavan</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1036</link>
		<dc:creator>Arun Raghavan</dc:creator>
		<pubDate>Wed, 14 Jul 2010 05:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1036</guid>
		<description>Maybe I got what you&#039;re doing wrong, but I usually set a watchpoint on the object&#039;s refcount. Something like:


p object (fugly, but this makes a gdb variable, say $1, with the address of object, so your watchpoint is not tied to the symbol &#039;object&#039;)
watch ((GObject*)$1)-&gt;ref_count
</description>
		<content:encoded><![CDATA[<p>Maybe I got what you're doing wrong, but I usually set a watchpoint on the object's refcount. Something like:</p>
<p>p object (fugly, but this makes a gdb variable, say $1, with the address of object, so your watchpoint is not tied to the symbol 'object')<br />
watch ((GObject*)$1)-&gt;ref_count</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reference count debugging with systemtap — drboblog</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1033</link>
		<dc:creator>Reference count debugging with systemtap — drboblog</dc:creator>
		<pubDate>Tue, 13 Jul 2010 22:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1033</guid>
		<description>[...] got some really helpful comments on yesterday&#8217;s post about reference count debugging with gdb which enabled me to get [...]</description>
		<content:encoded><![CDATA[<p>[...] got some really helpful comments on yesterday&#8217;s post about reference count debugging with gdb which enabled me to get [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wielaard</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1028</link>
		<dc:creator>Mark Wielaard</dc:creator>
		<pubDate>Tue, 13 Jul 2010 08:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1028</guid>
		<description>The soon to be released SystemTap 1.3 should at least print the &quot;module&quot; (share library name) of the last frame of the backtrace (plus address of course). That way you can at least see why SystemTap couldn&#039;t unwind further. As Frank says then you could provide SystemTap with that shared library hint through -d. Also 1.3 has --ldd which makes SystemTap pick up everything ldd knows about a program. There were also a couple of plain bug fixes in the unwinder that should improve the output.

If that isn&#039;t enough maybe we can teach systemtap about pkg-config files to pick up which shared libraries are likely to be used in a gnome program. Or is there some other hints about dynamically loaded libraries that systemtap should know about?</description>
		<content:encoded><![CDATA[<p>The soon to be released SystemTap 1.3 should at least print the "module" (share library name) of the last frame of the backtrace (plus address of course). That way you can at least see why SystemTap couldn't unwind further. As Frank says then you could provide SystemTap with that shared library hint through -d. Also 1.3 has --ldd which makes SystemTap pick up everything ldd knows about a program. There were also a couple of plain bug fixes in the unwinder that should improve the output.</p>
<p>If that isn't enough maybe we can teach systemtap about pkg-config files to pick up which shared libraries are likely to be used in a gnome program. Or is there some other hints about dynamically loaded libraries that systemtap should know about?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Withnall</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1027</link>
		<dc:creator>Philip Withnall</dc:creator>
		<pubDate>Tue, 13 Jul 2010 07:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1027</guid>
		<description>That&#039;s good to hear; I look forward to being able to use them. Thanks for all the great work on systemtap.</description>
		<content:encoded><![CDATA[<p>That's good to hear; I look forward to being able to use them. Thanks for all the great work on systemtap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Withnall</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1026</link>
		<dc:creator>Philip Withnall</dc:creator>
		<pubDate>Tue, 13 Jul 2010 07:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1026</guid>
		<description>gdb couldn&#039;t find the symbol when I tried that (and I had compiled GLib with --enable-debug=yes). :-(</description>
		<content:encoded><![CDATA[<p>gdb couldn't find the symbol when I tried that (and I had compiled GLib with --enable-debug=yes). <img src='http://tecnocode.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Otte</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1025</link>
		<dc:creator>Benjamin Otte</dc:creator>
		<pubDate>Tue, 13 Jul 2010 07:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1025</guid>
		<description>You can compile glib with --enable-debug and then set the g_trap_object_ref variable in gdb. That&#039;ll make glib do the breakpoints for you. See http://git.gnome.org/browse/glib/tree/gobject/gobject.c#n2483 for detais.</description>
		<content:encoded><![CDATA[<p>You can compile glib with --enable-debug and then set the g_trap_object_ref variable in gdb. That'll make glib do the breakpoints for you. See <a href="http://git.gnome.org/browse/glib/tree/gobject/gobject.c#n2483" rel="nofollow">http://git.gnome.org/browse/glib/tree/gobject/gobject.c#n2483</a> for detais.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Ch. Eigler</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1024</link>
		<dc:creator>Frank Ch. Eigler</dc:creator>
		<pubDate>Tue, 13 Jul 2010 01:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1024</guid>
		<description>&quot;[systemtap] worked, in that my probes were correctly run and correctly highlighted each reference/dereference of the class I was interested in, but printing a backtrace only extended to the g_object_ref()/g_object_unref()  call, and no further.&quot;

Some major improvements to backtracing are coming soon to stap land.  It&#039;s possible though that the only thing you were lacking were some &#039;-d /path/to/shlib -d /bin/foo&#039; options to preload unwind data into the systemtap probe module.</description>
		<content:encoded><![CDATA[<p>"[systemtap] worked, in that my probes were correctly run and correctly highlighted each reference/dereference of the class I was interested in, but printing a backtrace only extended to the g_object_ref()/g_object_unref()  call, and no further."</p>
<p>Some major improvements to backtracing are coming soon to stap land.  It's possible though that the only thing you were lacking were some '-d /path/to/shlib -d /bin/foo' options to preload unwind data into the systemtap probe module.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Buck</title>
		<link>http://tecnocode.co.uk/2010/07/12/reference-count-debugging-with-gdb/comment-page-1/#comment-1023</link>
		<dc:creator>Joe Buck</dc:creator>
		<pubDate>Tue, 13 Jul 2010 01:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://tecnocode.co.uk/?p=359#comment-1023</guid>
		<description>It&#039;s an old technique.  The trick is to try to figure out how to choose the breakpoints so that gdb runs as little as possible, since it&#039;s slow.  If there is a breakpoint with a condition, gdb wakes up every time, checks the condition, and restarts the program if it isn&#039;t satisfied, which can be expensive (though it&#039;s a lot faster than doing it by hand). Enabling and disabling breakpoints can sometimes help.</description>
		<content:encoded><![CDATA[<p>It's an old technique.  The trick is to try to figure out how to choose the breakpoints so that gdb runs as little as possible, since it's slow.  If there is a breakpoint with a condition, gdb wakes up every time, checks the condition, and restarts the program if it isn't satisfied, which can be expensive (though it's a lot faster than doing it by hand). Enabling and disabling breakpoints can sometimes help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.306 seconds -->

