Kevin Brown <[EMAIL PROTECTED]> writes:
> I modified the Contents_Access finalization code to configure the
> debug pool to not raise exceptions and instead to print out the
> various information it can when encountering this error.  The end
> result looks like this:

Be careful: Virtual_File is particularly nasty; it is an Ada
controlled object, but GPS also stores its address (not access) in a
"boxed" GObject.  As a result there are two copies of Finalize and two
copies of Adjust; one is called from Ada and the other from glib, as a
callback.  It is important to modify both versions of Adjust and
Finalize.

See

vfs.adb:1167: procedure Finalize (File : in out Virtual_File) is
vfs.adb:1176: procedure Adjust (File : in out Virtual_File) is
vfs.adb:1309: function Virtual_File_Boxed_Copy
vfs.adb:1325: procedure Virtual_File_Boxed_Free (Boxed : System.Address) is

The latter two are passed as callbacks to glib in
VFS.Get_Virtual_File_Type.

> So I'm tempted to file another bug, this one against libgnat-4.1,
> stating that we need to compile a debug version (that would land in
> /usr/lib/debug) so that it's possible to set breakpoints within
> library functions.  We should do so for the various libgtkada-2.8
> libraries as well, but libgnat is by far the most important in this
> regard.

Try to link statically against
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/adalib/libgnat.a, it already
contains debugging symbols.

-- 
Ludovic Brenta.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to