Hi!

On Sun, Jul 08, 2007 at 08:20:49PM +0100, Pedro Alves wrote:
> Hi all,
> 
> Here goes the v2 of the seh giga macros.  Wear sunglasses.
> 
> * __finally blocks don't eat the exception anymore.
> 
> * The filter in __except (filter), is now really an
>   expression, thanks to gcc's preprocessor varargs (__VA_ARGS__).
> 
> * Nested blocks work for the testcase included.  I didn't
>   test anything else but what is there.
> 
> * The __seh_restore_context function is about my second or third
>   attempt to write ARM assembly.  I've written about 20 or so lines
>   of ARM asm ever.  I'm not even sure it is doing what it is
>   attempting to do.  I'd appreciate if someone would comment in it.
>   The goal is to do something like a longjmp, but to restore the
>   full context including the scratch registers and the Psr.  It
>   takes a CONTEXT* arg.

I'm guessing you are trying to rerun the original code that caused the
exception?  That isn't possible - once you've done a longjmp back to a
calling function, you can't go back to where you were in a nested
function.

For finally, what I think you want to do is longjmp to the next
exception handler in the stack.  I hadn't originally thought of doing
it that way, but it would probably be pretty easy.

Also, strictly speaking, you aren't supposed to run any finally blocks
unless there is an except handler that will ultimately handle the
exception.

> * I'm sure it is full of bugs.  Reports welcome, and patches
>   more even so.

I think __seh_push_handler and __seh_start_handler are not called in
the right places.  See my earlier email.

Note that I think what haret has now is fine.  So, I'm just following
along out of curiosity.

Cheers,
-Kevin

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to