This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tasks (exception round-up)


On Tuesday 29 July 2008 21:00:21, Tom Tromey wrote:
> Tom> * Exceptions.  Look at the existing longjmp stuff, come up with
> Tom> an estimate for the new work.
>
> Phil> Can you elaborate a little more on this. I was hoping it would become
> Phil> clearer as I investigated.
>
> gdb has some existing code to handle setjmp/longjmp "properly".
> Unfortunately I think this code doesn't work on Linux, due to a
> security feature of glibc; but if you can scare up a Solaris box or
> something you might be able to play around with it.
>

You can set LD_POINTER_GUARD=0 in the environment to avoid
pointer mangling, then things will work.  What still does not
work even without pointer mangling, is GDB ignoring setjmp/longjmp
sequences that land in frames inner to the current stepping
frame.  The "longjmp if going outer" feature.

If you're curious, there were several threads on gdb-patches list
about longjmp handling a few months back.

This was the last time I tried to make it happen, but it was
never finished:
 http://sourceware.org/ml/gdb-patches/2008-05/msg00516.html

Another earlier attempt, which accesses internal glibc date
to get to pointer unmangling, idea based on an another longjmp
patch from Jan Kratochvil:
 http://sourceware.org/ml/gdb-patches/2008-04/msg00162.html

You may or may not have some version of Jan's patch in your
trees, I don't know.

Unless supporting sjlj c++ exception models, it doesn't seem like
making longjmp handling fly is a requirement.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]