Ludovic Brenta wrote:
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.

In this case, all I wanted to do was to call GNAT.Debug_Pool.Configure(). Ideally, I'd want to call it only once at program initialization time, but I don't know how to do that from within vfs.adb, so I settled on calling it from the finalization code.

But regardless, thanks for the heads-up. Hopefully I won't have to modify the finalization code to do anything real, but if I do then I'll keep what you said in mind.

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.

OK, I'll try that. But even so, it shouldn't be necessary to do that when we have a perfectly good mechanism (/usr/lib/debug) that is used by many libraries already and which is easier to use (just add /usr/lib/debug to LD_LIBRARY_PATH). So I'm still inclined to file the bug...



--
Kevin Brown                                           [EMAIL PROTECTED]


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

Reply via email to