projects
/
mate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nativeMaschine: s/unsigned int/ptrdiff_t/g
[mate.git]
/
ffi
/
trap.c
diff --git
a/ffi/trap.c
b/ffi/trap.c
index 1058004a1046afe6432f82fbceb9ab3b4194066a..301f2060ce47f5252bb4d2dfd73112efa069d9a7 100644
(file)
--- a/
ffi/trap.c
+++ b/
ffi/trap.c
@@
-1,5
+1,6
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stddef.h>
#include "../debug.h"
#include "../debug.h"
@@
-21,7
+22,7
@@
#include <sys/ucontext.h>
#include <sys/ucontext.h>
-
unsigned int mateHandler(unsigned int, unsigned int, unsigned int, unsigned in
t);
+
ptrdiff_t mateHandler(ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_
t);
#ifdef DBG_TRAP
#define dprintf(args...) do { printf (args); } while (0);
#ifdef DBG_TRAP
#define dprintf(args...) do { printf (args); } while (0);
@@
-33,13
+34,13
@@
void chandler(int nSignal, siginfo_t *info, void *ctx)
{
mcontext_t *mctx = &((ucontext_t *) ctx)->uc_mcontext;
{
mcontext_t *mctx = &((ucontext_t *) ctx)->uc_mcontext;
-
unsigned int eip = (unsigned in
t) mctx->gregs[REG_EIP];
-
unsigned int eax = (unsigned in
t) mctx->gregs[REG_EAX];
-
unsigned int ebx = (unsigned in
t) mctx->gregs[REG_EBX];
-
unsigned int esp = (unsigned in
t) mctx->gregs[REG_ESP];
+
ptrdiff_t eip = (ptrdiff_
t) mctx->gregs[REG_EIP];
+
ptrdiff_t eax = (ptrdiff_
t) mctx->gregs[REG_EAX];
+
ptrdiff_t ebx = (ptrdiff_
t) mctx->gregs[REG_EBX];
+
ptrdiff_t esp = (ptrdiff_
t) mctx->gregs[REG_ESP];
dprintf("trap: type %d, eip 0x%08x, eax 0x%08x, ebx 0x%08x, "
"esp 0x%08x, *esp 0x%08x\n", nSignal, eip,
dprintf("trap: type %d, eip 0x%08x, eax 0x%08x, ebx 0x%08x, "
"esp 0x%08x, *esp 0x%08x\n", nSignal, eip,
- eax, ebx, esp, *(
unsigned in
t*) esp);
+ eax, ebx, esp, *(
ptrdiff_
t*) esp);
mctx->gregs[REG_EIP] = mateHandler(eip, eax, ebx, esp);
}
mctx->gregs[REG_EIP] = mateHandler(eip, eax, ebx, esp);
}