this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

This gets JRE 8's HotSpot running

+34 -4
+33 -3
src/kernel/emulation/linux/signal/sigaction.c
··· 117 117 copyreg(r11); copyreg(r12); copyreg(r13); copyreg(r14); copyreg(r15); copyreg(rip); 118 118 copyreg(cs); copyreg(fs); copyreg(gs); 119 119 bm->ss.rflags = lc->uc_mcontext.gregs.efl; 120 - #else 120 + 121 + #elif defined(__i386__) 121 122 copyreg(eax); copyreg(ebx); copyreg(ecx); copyreg(edx); copyreg(edi); copyreg(esi); 122 123 copyreg(ebp); copyreg(esp); 123 124 copyreg(eip); copyreg(cs); copyreg(ds); copyreg(es); copyreg(fs); copyreg(gs); 124 125 bm->ss.eflags = lc->uc_mcontext.gregs.efl; 125 126 bm->ss.ss = 0; 127 + #else 128 + # warning Missing code for current arch 126 129 #endif 127 130 128 131 #undef copyreg 129 132 } 130 133 134 + static void mcontext_bsd_to_linux(const struct bsd_mcontext* bm, struct linux_mcontext* lm) 135 + { 136 + #define copyreg(__name) lm->gregs.__name = bm->ss.__name 137 + 138 + #ifdef __x86_64__ 139 + copyreg(rax); copyreg(rbx); copyreg(rcx); copyreg(rdx); copyreg(rdi); copyreg(rsi); 140 + copyreg(rbp); copyreg(rsp); copyreg(r8); copyreg(r9); copyreg(r10); 141 + copyreg(r11); copyreg(r12); copyreg(r13); copyreg(r14); copyreg(r15); copyreg(rip); 142 + copyreg(cs); copyreg(fs); copyreg(gs); 143 + lm->gregs.efl = bm->ss.rflags; 144 + #elif defined(__i386__) 145 + copyreg(eax); copyreg(ebx); copyreg(ecx); copyreg(edx); copyreg(edi); copyreg(esi); 146 + copyreg(ebp); copyreg(esp); 147 + copyreg(eip); copyreg(cs); copyreg(ds); copyreg(es); copyreg(fs); copyreg(gs); 148 + lm->gregs.efl = bm->ss.eflags; 149 + #else 150 + # warning Missing code for current arch 151 + #endif 152 + 153 + } 154 + 131 155 void handler_linux_to_bsd(int linux_signum, struct linux_siginfo* info, void* ctxt) 132 156 { 133 157 int bsd_signum; ··· 145 169 binfo.si_code = info->si_code; 146 170 binfo.si_pid = info->si_pid; 147 171 binfo.si_uid = info->si_uid; 172 + binfo.si_addr = info->si_addr; 173 + binfo.si_val_ptr = (void*) info->si_value; 148 174 149 - // TODO: The following 3 exist on Linux, but it's a mess to extract them 175 + // TODO: The following exist on Linux, but it's a mess to extract them 150 176 binfo.si_status = 0; 151 - binfo.si_addr = 0; 152 177 binfo.si_band = 0; 153 178 } 154 179 ··· 169 194 // __simple_printf("Handling signal %d\n", linux_signum); 170 195 171 196 sig_handlers[linux_signum](bsd_signum, info ? &binfo : NULL, (lc != NULL) ? &bc : NULL); 197 + 198 + if (lc != NULL) 199 + { 200 + mcontext_bsd_to_linux(bc.uc_mcontext, &lc->uc_mcontext); 201 + } 172 202 173 203 // __simple_printf("Signal handled\n"); 174 204 }
+1 -1
src/kernel/emulation/linux/signal/sigaltstack.h
··· 4 4 struct bsd_stack 5 5 { 6 6 void* ss_sp; 7 - int ss_size; 7 + unsigned long ss_size; 8 8 int ss_flags; 9 9 }; 10 10