Re: Exception Handling...
From: David Reeve (dree4456_at_big-pond.net.au)
Date: 06/29/04
- Next message: Leslie: "Memory mapping with dynamic array?"
- Previous message: Mytskidis Georgios: "AV in dbrtl70.bpl and rtl70.bpl"
- In reply to:(deleted message) nobody_at_noplace.not: "Re: Exception Handling..."
- Next in thread: nobody_at_noplace.not: "Re: Exception Handling..."
- Reply:(deleted message) nobody_at_noplace.not: "Re: Exception Handling..."
- Reply: Rob Kennedy: "Re: Exception Handling..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jun 2004 10:00:42 GMT
<nobody@noplace.not> wrote in message
news:otc1e0dscufp2gss0nh2llfckjits5pmat@4ax.com...
> On Sun, 27 Jun 2004 15:22:24 GMT, "David Reeve" <dree4456@big-pond.net.au>
>
Laura,
I'm up to my neck in crocodiles so won't have a lot of time for this until
the weekend. I would like to get to the stage where I can invoke the OS SEH
mechanism by dropping in some assembler. Not that this is something I have
any need for, just curiosity. Commercial imperative puts me firmly in the OO
bloatware camp :-), and that's not because I've got my arm held up my back.
Like you, my background is in low level and procedural stuff, but I just
love the way I can take an abstract notion and make it a real engineering
entity based on good ole TObject. But, it's also very good to gain as much
understanding of the OS as one possibly can so let's go .....
> If I am reading this correctly...
>
> When you set up try/except:
>
>
> Try // 1 pushes SEH pointer to 4 on the stack
and links this exception record to the top of the exception chain
> // 2 falls through to your_code
>
> your_code;
unlinks exception record and cleans stack
>
> except // 3 jump to the more_code if no exception
> // 4 On exception does HandleAnyException
> // 5 On return goes to your_fixups.
>
> your_fixups;
>
> end; // 6 calls DoneExcept in system.pas
> // 7 goes to more_code if exception handled
>
> more_code;
>
>
This is a basic framework, but doesn't cover things like what happens if the
exception isn't handled? Not to mention all the exception filtration stuff.
>
> When you set up try/finally:
>
> Try // 1 pushes SEH pointer to 6 on the stack.
> // 2 falls though to your_code
>
> your_code;
>
> finally // 3 places address of more_code on the stack
> // 4 if no exception falls through to do_anyway
>
> do_anyway;
>
> // 5 jump to more_code if no exception
> end; // 6 on exception does HandleFinally in system.pas
> // 7 jumps to D0_anyway
>
>
> more_code;
>
>
I've had a quick step through this, and it seems to be much as you say.
However, I haven't looked very closely.
Dave
- Next message: Leslie: "Memory mapping with dynamic array?"
- Previous message: Mytskidis Georgios: "AV in dbrtl70.bpl and rtl70.bpl"
- In reply to:(deleted message) nobody_at_noplace.not: "Re: Exception Handling..."
- Next in thread: nobody_at_noplace.not: "Re: Exception Handling..."
- Reply:(deleted message) nobody_at_noplace.not: "Re: Exception Handling..."
- Reply: Rob Kennedy: "Re: Exception Handling..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|