Re: Refdbg and GObject 2.6.x



On Mon, Jan 24, 2005 at 12:07:58AM -0800, Josh Green wrote:
> Hello, I'm the author of refdbg (http://refdbg.sourceforge.net), a
> GObject reference count debugger.  Recently a user notified me that it
> doesn't work with glib 2.6.x.  Refdbg works by using LD_PRELOAD to
> override the following functions in GObject:
> 
> g_object_newv
> g_type_free_instance
> g_object_ref
> g_object_unref
> 
> It seems with glib 2.6.x the first two functions (g_object_newv and
> g_type_free_instance), do not get overridden, while g_object_ref/unref
> do.  I was hoping that someone could give me some hints on why this is
> happening.  Tips on debugging the LD_PRELOAD process or a better method
> of catching calls to these functions would also be appreciated.

I'm afraid calls to these functions inside GLib itself
cannot be overriden by LD_PRELOAD (or any other run-time
method) any more.  See

    http://bugzilla.gnome.org/show_bug.cgi?id=145519

for discussion.

Calls to the latter two usually appear outside GLib (in Gtk+
or user code) while to the former two inside GLib itself --
this explains the observed difference.

Yeti


--
Dynamic IP address is not a crime.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]