codegen: handle exceptions of a method
[mate.git] / ffi / trap.c
index 4c291cf70d8c7e1dfd90f324d3da55e32269b846..f6281d013ad770c7a23aebdebcaa284049dbca98 100644 (file)
@@ -2,8 +2,6 @@
 #include <stdlib.h>
 #include <stddef.h>
 
-#include "../debug.h"
-
 /* TODO(bernhard): use {u,}int* types */
 
 #define __USE_GNU
@@ -45,7 +43,7 @@ void chandler(int nSignal, siginfo_t *info, void *ctx)
                        "esp 0x%08x, *esp 0x%08x, *(ebp+8) 0x%08x\n", nSignal, eip,
                        eax, ebx, esp, *(ptrdiff_t*) esp, *(ptrdiff_t *) (ebp + 8));
 
-       ptrdiff_t ret = mateHandler(eip, eax, ebx, esp, esi);
+       ptrdiff_t ret = mateHandler(eip, eax, ebx, esi, esp);
        if (ret == -1) {
                dprintf("regdump @ EIP: 0x%08x\n", regs[REG_EIP]);
                dprintf("\tEAX: 0x%08lx EBX: 0x%08lx ECX: 0x%08lx EDX: 0x%08lx\n",