532 }
533
534 // Sometimes the register windows are not properly flushed.
535 if(uc->uc_mcontext.gwins != NULL) {
536 ::handle_unflushed_register_windows(uc->uc_mcontext.gwins);
537 }
538
539 // unmask current signal
540 sigset_t newset;
541 sigemptyset(&newset);
542 sigaddset(&newset, sig);
543 sigprocmask(SIG_UNBLOCK, &newset, NULL);
544
545 // Determine which sort of error to throw. Out of swap may signal
546 // on the thread stack, which could get a mapping error when touched.
547 address addr = (address) info->si_addr;
548 if (sig == SIGBUS && info->si_code == BUS_OBJERR && info->si_errno == ENOMEM) {
549 vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "Out of swap space to map in thread stack.");
550 }
551
552 VMError err(t, sig, pc, info, ucVoid);
553 err.report_and_die();
554
555 ShouldNotReachHere();
556 }
557
558 void os::print_context(outputStream *st, void *context) {
559 if (context == NULL) return;
560
561 ucontext_t *uc = (ucontext_t*)context;
562 st->print_cr("Registers:");
563
564 st->print_cr(" G1=" INTPTR_FORMAT " G2=" INTPTR_FORMAT
565 " G3=" INTPTR_FORMAT " G4=" INTPTR_FORMAT,
566 uc->uc_mcontext.gregs[REG_G1],
567 uc->uc_mcontext.gregs[REG_G2],
568 uc->uc_mcontext.gregs[REG_G3],
569 uc->uc_mcontext.gregs[REG_G4]);
570 st->print_cr(" G5=" INTPTR_FORMAT " G6=" INTPTR_FORMAT
571 " G7=" INTPTR_FORMAT " Y=" INTPTR_FORMAT,
572 uc->uc_mcontext.gregs[REG_G5],
573 uc->uc_mcontext.gregs[REG_G6],
|
532 }
533
534 // Sometimes the register windows are not properly flushed.
535 if(uc->uc_mcontext.gwins != NULL) {
536 ::handle_unflushed_register_windows(uc->uc_mcontext.gwins);
537 }
538
539 // unmask current signal
540 sigset_t newset;
541 sigemptyset(&newset);
542 sigaddset(&newset, sig);
543 sigprocmask(SIG_UNBLOCK, &newset, NULL);
544
545 // Determine which sort of error to throw. Out of swap may signal
546 // on the thread stack, which could get a mapping error when touched.
547 address addr = (address) info->si_addr;
548 if (sig == SIGBUS && info->si_code == BUS_OBJERR && info->si_errno == ENOMEM) {
549 vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "Out of swap space to map in thread stack.");
550 }
551
552 VMError::report_and_die(t, sig, pc, info, ucVoid);
553
554 ShouldNotReachHere();
555 }
556
557 void os::print_context(outputStream *st, void *context) {
558 if (context == NULL) return;
559
560 ucontext_t *uc = (ucontext_t*)context;
561 st->print_cr("Registers:");
562
563 st->print_cr(" G1=" INTPTR_FORMAT " G2=" INTPTR_FORMAT
564 " G3=" INTPTR_FORMAT " G4=" INTPTR_FORMAT,
565 uc->uc_mcontext.gregs[REG_G1],
566 uc->uc_mcontext.gregs[REG_G2],
567 uc->uc_mcontext.gregs[REG_G3],
568 uc->uc_mcontext.gregs[REG_G4]);
569 st->print_cr(" G5=" INTPTR_FORMAT " G6=" INTPTR_FORMAT
570 " G7=" INTPTR_FORMAT " Y=" INTPTR_FORMAT,
571 uc->uc_mcontext.gregs[REG_G5],
572 uc->uc_mcontext.gregs[REG_G6],
|