On Mon, Nov 30, 2009 at 12:53:53PM +0200, Kalev Lember wrote:
> On 11/30/2009 12:19 PM, Richard W.M. Jones wrote:
> > On Mon, Nov 30, 2009 at 11:56:46AM +0200, Kalev Lember wrote:
> >> To work around that, upstream mingw has a patch to annotate
> >> functions which support unwinding with SEH with
> >> __attribute__((seh_aware)). I've tested that patch and it really
> >> does fix binary compatibility with binaries produced by Visual
> >> Studio.
> >
> > I'm not quite sure I understand this bit - which functions
> > need to be annotated?
> 
> Lets say we have function a() in a.dll (compiled with mingw), b() in 
> b.dll (compiled with Visual Studio) and main() in c.exe (compiled with 
> mingw). c.exe is linked against b.dll, and b.dll is linked against 
> a.dll. Now if an exception is thrown in a() and rethrown in b(), then 
> b() prototype in header file has to be annotated like this to make it 
> possible to catch it in main() in c.exe:
> 
> void b() __attribute__((seh_aware));
> 
> MinGW unwinder supports unwinding either DWARF2 or SEH, but the runtime 
> has no way of knowing whether a function supports unwinding with SEH. 
> The patch is a workaround to add seh_aware attribute to foreign (SEH) 
> function declarations. MinGW release notes [3] explain that it's only a 
> temporary measure and future versions of w32api will have a way of doing 
> it automatically.
> 
> [3] http://sourceforge.net/project/shownotes.php?release_id=691876

It certainly sounds like a hack ...  But I know even less about this
than anyone else on this thread, so I'll shut up.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
_______________________________________________
fedora-mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/fedora-mingw

Reply via email to