Kevin Brown <[EMAIL PROTECTED]> writes:
> Ludovic Brenta wrote:
>> I don't think -gnatE buys you anything, as GNAT's default, static
>> elaboration model is more strict. 
>
> Is the static elaboration model always in force?  That is, if I use
> -gnatE, do I get both static *and* dynamic elaboration checks?  That
> would be preferable, IMO.

No, you get one or the other: static by default, dynamic with -gnatE.
They are incompatible, since their purpose is to find an elaboration
order, and two different elaboration orders don't make sense in the
same program :) The static model is better anyway.

If you would like to push GPS to its limits, maybe try:

 package Binder is
    for Default_Switches ("Ada") use ("-p");
 end Binder;

This causes the binder to try and find the *worst* possible
elaboration order, i.e. the one that *maximises* the chances to get a
Program_Error during elaboration.  If GPS survives that, then it's
really good :)

> And the end result?  It still crashes, but it doesn't smash the stack
> while doing so like it did before.  And using the "new file" button
> actually works.

Aha!  Progress!  Congratulations!  Was that with 3.1.3 or with 4.0.0?
If 4.0.0, I'll try to apply the patches too and see if they improve
things.  Could you send the full patch?

> Debugging under gdb doesn't work with the -gstabs+ option because
> the debugger isn't able to access any of the stack-allocated objects
> in the Ada code.  See:
>
>    http://www.mail-archive.com/osg-users@openscenegraph.net/msg04734.html
>
> I switched gps.gpr over to -ggdb and all is well on that front now.

Great.  -gstabs+ was only necessary when debugging with the old
gnat-gdb 5.3; the new gdb 6.4 understands GCC's new format for
debugging information, DWARF2 (see #274164).

> It's currently crashing in a free that's being called from
> glib.convert.locale_from_utf8().  I'm in the process of compiling up
> libgtkada2-2.8.1 with full debugging.

Maybe you should consider linking statically with libgtkada2.a, it
already contains debugging information.  You don't have to recompile
the world.

-- 
Ludovic Brenta.



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

Reply via email to