Mac OS X Support : Signals support

Pierre d'Herbemont stegefin at free.fr
Wed May 7 13:51:25 CDT 2003


On Wednesday, May 7, 2003, at 08:36 PM, Pierre d'Herbemont wrote:

>
> On Tuesday, May 6, 2003, at 12:42 AM, Alexandre Julliard wrote:
>
>> "Pierre d'Herbemont" <stegefin at free.fr> writes:
>>
>>> Hi,
>>> This patch add in signal_powerpc.c of ntdll support for darwin 
>>> signal.
>>
>> You should define a set of macros or inline functions to access the
>> sigcontext structure fields, instead of duplicating the whole handler
>> functions. For an example, check how the i386 code is doing it.
>>
>
> Ok, thanks :)
>
> Here is the correction, Hope it will be ok...
>
>
> ChangeLog:
> Add Signal support for Darwin and PowerPC.
>

I forgot to include a patch for "include/winnt.h" needed by the new 
version of "dlls/ntdll/signal_powerpc.c".

ChangeLog:
Add Dar, Dsisr and Trap registers for the PowerPC CONTEXT structure.

-------------- next part --------------
Index: include/winnt.h
===================================================================
RCS file: /home/wine/wine/include/winnt.h,v
retrieving revision 1.157
diff -u -r1.157 winnt.h
--- include/winnt.h	10 Apr 2003 00:19:25 -0000	1.157
+++ include/winnt.h	7 May 2003 18:48:06 -0000
@@ -892,7 +892,10 @@
     DWORD Ctr;
 
     DWORD ContextFlags;
-    DWORD Fill[3];
+    
+    DWORD Dar;   /* Fault registers for coredump */
+    DWORD Dsisr; 
+    DWORD Trap;  /* number of powerpc exception taken */
 
     /* These are selected by CONTEXT_DEBUG_REGISTERS */
     DWORD Dr0;
@@ -1632,7 +1635,11 @@
 extern inline struct _TEB * WINAPI NtCurrentTeb(void)
 {
     struct _TEB *teb;
+# ifdef __darwin__
+    __asm__("\tmr %0, r13" : "=r" (teb));
+# else
     __asm__("\tmr %0, 2" : "=r" (teb));
+# endif
     return teb;
 }
 #else
-------------- next part --------------


Thanks :)

Pierre


More information about the wine-patches mailing list