On Monday 19 May 2003 05:14 pm, Ulrich Weigand wrote:
Gregory Turner wrote:
Possible goals are:
achieve real "SEH"-style syntax, that is, no bloody __ENDTRY macro.
fix "break"
fix "return" from try/finally blocks.
These are certainly interesting goals, but they appear to be hard to achieve without compiler support ...
heh, so they are :(
Anyhow, I'll take a look at the dwarf2 goodies, maybe I'll decide that it's do-able, but more trouble than its worth... either way, I intend to make some kind of patch out of this whole investigation, as I am pretty darn sure I can at least fix one of the forementioned deficiencies, maybe even two, without making any major sacrifices.
I don't quite see how dwarf2 unwinding fits into this. Is this just to be able to avoid the setjmp?
maybe it doesn't. I was thinking along the lines of using the unwind information to mark various places in the stack, or for dynamically generating bits of machine code... who knows, just "fishing", really.
Note that g++ exception handling with dwarf2 works quite different from MSVC exception handling -- the former hooks exception processing into the dwarf2 frame 'personality' routines, while the latter uses the exception frame chain anchored in the TEB ...
Ideally, some compiler will emerge which would generate the same undocumented unwind tables used by msvc to do it... that way tryblocks from native dlls and wine dlls, and MSVC++ and XYZ++ exceptions could all get along swimmingly... however, I was only trying to get the syntax to do the right thing in wine code, hoping I would find it to be a simpler exercise...
FYI, after a somewhat extensive investigation, and nagging the hell out of Alexandre and wine-devel, I've pretty much given up on anything other than compiler support.