diff options
Diffstat (limited to 'mps/code/protxcpp.c')
| -rw-r--r-- | mps/code/protxcpp.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/mps/code/protxcpp.c b/mps/code/protxcpp.c index 44c95b25b7f..5a7c2a237b8 100644 --- a/mps/code/protxcpp.c +++ b/mps/code/protxcpp.c | |||
| @@ -31,8 +31,6 @@ | |||
| 31 | #include <signal.h> | 31 | #include <signal.h> |
| 32 | #include <sys/ucontext.h> | 32 | #include <sys/ucontext.h> |
| 33 | 33 | ||
| 34 | #include <stdio.h> /* DO NOT SUBMIT */ | ||
| 35 | |||
| 36 | SRCID(protxcpp, "$Id$"); | 34 | SRCID(protxcpp, "$Id$"); |
| 37 | 35 | ||
| 38 | /* The previously-installed signal action, as returned by */ | 36 | /* The previously-installed signal action, as returned by */ |
| @@ -70,31 +68,6 @@ static void sigHandle(int sig, siginfo_t *info, void *contextArg) | |||
| 70 | 68 | ||
| 71 | ucontext = contextArg; | 69 | ucontext = contextArg; |
| 72 | 70 | ||
| 73 | { | ||
| 74 | int i; | ||
| 75 | fprintf(stderr, "sigHandle.\n"); | ||
| 76 | |||
| 77 | for(i=0; i < sizeof *info; ++i) { | ||
| 78 | fprintf(stderr, "%02x", ((unsigned char *)info)[i]); | ||
| 79 | } | ||
| 80 | fprintf(stderr, "\n"); | ||
| 81 | fprintf(stderr, "signo: %d, code %d, addr %p\n", | ||
| 82 | info->si_signo, info->si_code, info->si_addr); | ||
| 83 | |||
| 84 | fprintf(stderr, "ucontext:\n"); | ||
| 85 | for(i=0; i < sizeof *ucontext; ++i) { | ||
| 86 | fprintf(stderr, "%02x ", ((unsigned char *)ucontext)[i]); | ||
| 87 | } | ||
| 88 | fprintf(stderr, "\n"); | ||
| 89 | fprintf(stderr, "uc_mcontext:\n"); | ||
| 90 | for(i=0; i< sizeof ucontext->uc_mcontext; ++i) { | ||
| 91 | fprintf(stderr, "%02x ", ((unsigned char *)&ucontext->uc_mcontext)[i]); | ||
| 92 | } | ||
| 93 | fprintf(stderr, "\n"); | ||
| 94 | fprintf(stderr, "uc_mcontext->es.dar: %08lx\n", | ||
| 95 | (unsigned long)ucontext->uc_mcontext->es.dar); | ||
| 96 | } | ||
| 97 | |||
| 98 | /* On OS X the si_code field does't appear to be useful. Protection | 71 | /* On OS X the si_code field does't appear to be useful. Protection |
| 99 | * faults appear as SIGBUS signals, and the only documented code for | 72 | * faults appear as SIGBUS signals, and the only documented code for |
| 100 | * SIGBUS is BUS_ADRALN (invalid address alignment) which is what | 73 | * SIGBUS is BUS_ADRALN (invalid address alignment) which is what |
| @@ -124,9 +97,7 @@ static void sigHandle(int sig, siginfo_t *info, void *contextArg) | |||
| 124 | 97 | ||
| 125 | /* MutatorFaultContext parameter is a dummy parameter for this */ | 98 | /* MutatorFaultContext parameter is a dummy parameter for this */ |
| 126 | /* implementation */ | 99 | /* implementation */ |
| 127 | fprintf(stderr, "access: base: %08x mode: %08x\n", (unsigned)base, mode); | ||
| 128 | if(ArenaAccess(base, mode, NULL)) { | 100 | if(ArenaAccess(base, mode, NULL)) { |
| 129 | fprintf(stderr, "returning\n"); | ||
| 130 | return; | 101 | return; |
| 131 | } | 102 | } |
| 132 | } | 103 | } |
| @@ -134,8 +105,6 @@ static void sigHandle(int sig, siginfo_t *info, void *contextArg) | |||
| 134 | /* The exception was not handled by any known protection structure, */ | 105 | /* The exception was not handled by any known protection structure, */ |
| 135 | /* so throw it to the previously installed handler. */ | 106 | /* so throw it to the previously installed handler. */ |
| 136 | 107 | ||
| 137 | fprintf(stderr, "Throwing to %08x\n", (unsigned)sigNext.sa_sigaction); | ||
| 138 | |||
| 139 | /* @@ This is really weak. | 108 | /* @@ This is really weak. |
| 140 | * Need to implement rest of the contract of sigaction */ | 109 | * Need to implement rest of the contract of sigaction */ |
| 141 | (*sigNext.sa_sigaction)(sig, info, contextArg); | 110 | (*sigNext.sa_sigaction)(sig, info, contextArg); |