582 // point to garbage if entry point in an nmethod is corrupted. Leave
583 // this at the end, and hope for the best.
584 address pc = (address)uc->REG_PC;
585 st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc);
586 print_hex_dump(st, pc - 32, pc + 32, sizeof(char));
587 st->cr();
588 }
589
590
591 void os::print_register_info(outputStream *st, const void *context) {
592 if (context == NULL) return;
593
594 const CONTEXT* uc = (const CONTEXT*)context;
595
596 st->print_cr("Register to memory mapping:");
597 st->cr();
598
599 // this is only for the "general purpose" registers
600
601 #ifdef AMD64
602 st->print("RAX="); print_location(st, uc->Rax);
603 st->print("RBX="); print_location(st, uc->Rbx);
604 st->print("RCX="); print_location(st, uc->Rcx);
605 st->print("RDX="); print_location(st, uc->Rdx);
606 st->print("RSP="); print_location(st, uc->Rsp);
607 st->print("RBP="); print_location(st, uc->Rbp);
608 st->print("RSI="); print_location(st, uc->Rsi);
609 st->print("RDI="); print_location(st, uc->Rdi);
610 st->print("R8 ="); print_location(st, uc->R8);
611 st->print("R9 ="); print_location(st, uc->R9);
612 st->print("R10="); print_location(st, uc->R10);
613 st->print("R11="); print_location(st, uc->R11);
614 st->print("R12="); print_location(st, uc->R12);
615 st->print("R13="); print_location(st, uc->R13);
616 st->print("R14="); print_location(st, uc->R14);
617 st->print("R15="); print_location(st, uc->R15);
618 #else
619 st->print("EAX="); print_location(st, uc->Eax);
620 st->print("EBX="); print_location(st, uc->Ebx);
621 st->print("ECX="); print_location(st, uc->Ecx);
622 st->print("EDX="); print_location(st, uc->Edx);
623 st->print("ESP="); print_location(st, uc->Esp);
624 st->print("EBP="); print_location(st, uc->Ebp);
625 st->print("ESI="); print_location(st, uc->Esi);
626 st->print("EDI="); print_location(st, uc->Edi);
627 #endif
628
629 st->cr();
630 }
631
632 extern "C" int SpinPause () {
633 #ifdef AMD64
634 return 0 ;
635 #else
636 // pause == rep:nop
637 // On systems that don't support pause a rep:nop
638 // is executed as a nop. The rep: prefix is ignored.
|
582 // point to garbage if entry point in an nmethod is corrupted. Leave
583 // this at the end, and hope for the best.
584 address pc = (address)uc->REG_PC;
585 st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc);
586 print_hex_dump(st, pc - 32, pc + 32, sizeof(char));
587 st->cr();
588 }
589
590
591 void os::print_register_info(outputStream *st, const void *context) {
592 if (context == NULL) return;
593
594 const CONTEXT* uc = (const CONTEXT*)context;
595
596 st->print_cr("Register to memory mapping:");
597 st->cr();
598
599 // this is only for the "general purpose" registers
600
601 #ifdef AMD64
602 st->print("RIP="); print_location(st, uc->Rip);
603 st->print("RAX="); print_location(st, uc->Rax);
604 st->print("RBX="); print_location(st, uc->Rbx);
605 st->print("RCX="); print_location(st, uc->Rcx);
606 st->print("RDX="); print_location(st, uc->Rdx);
607 st->print("RSP="); print_location(st, uc->Rsp);
608 st->print("RBP="); print_location(st, uc->Rbp);
609 st->print("RSI="); print_location(st, uc->Rsi);
610 st->print("RDI="); print_location(st, uc->Rdi);
611 st->print("R8 ="); print_location(st, uc->R8);
612 st->print("R9 ="); print_location(st, uc->R9);
613 st->print("R10="); print_location(st, uc->R10);
614 st->print("R11="); print_location(st, uc->R11);
615 st->print("R12="); print_location(st, uc->R12);
616 st->print("R13="); print_location(st, uc->R13);
617 st->print("R14="); print_location(st, uc->R14);
618 st->print("R15="); print_location(st, uc->R15);
619 #else
620 st->print("EIP="); print_location(st, uc->Eip);
621 st->print("EAX="); print_location(st, uc->Eax);
622 st->print("EBX="); print_location(st, uc->Ebx);
623 st->print("ECX="); print_location(st, uc->Ecx);
624 st->print("EDX="); print_location(st, uc->Edx);
625 st->print("ESP="); print_location(st, uc->Esp);
626 st->print("EBP="); print_location(st, uc->Ebp);
627 st->print("ESI="); print_location(st, uc->Esi);
628 st->print("EDI="); print_location(st, uc->Edi);
629 #endif
630
631 st->cr();
632 }
633
634 extern "C" int SpinPause () {
635 #ifdef AMD64
636 return 0 ;
637 #else
638 // pause == rep:nop
639 // On systems that don't support pause a rep:nop
640 // is executed as a nop. The rep: prefix is ignored.
|