src/hotspot/cpu/x86/macroAssembler_x86.cpp
changeset 58103 689a80d20550
parent 57893 49fea19f0726
child 58421 6fc57e391539
equal deleted inserted replaced
58102:b2a4b22f8cf2 58103:689a80d20550
   425     // This is the value of eip which points to where verify_oop will return.
   425     // This is the value of eip which points to where verify_oop will return.
   426     if (os::message_box(msg, "Execution stopped, print registers?")) {
   426     if (os::message_box(msg, "Execution stopped, print registers?")) {
   427       print_state32(rdi, rsi, rbp, rsp, rbx, rdx, rcx, rax, eip);
   427       print_state32(rdi, rsi, rbp, rsp, rbx, rdx, rcx, rax, eip);
   428       BREAKPOINT;
   428       BREAKPOINT;
   429     }
   429     }
   430   } else {
   430   }
   431     ttyLocker ttyl;
   431   fatal("DEBUG MESSAGE: %s", msg);
   432     ::tty->print_cr("=============== DEBUG MESSAGE: %s ================\n", msg);
       
   433   }
       
   434   // Don't assert holding the ttyLock
       
   435     assert(false, "DEBUG MESSAGE: %s", msg);
       
   436   ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
       
   437 }
   432 }
   438 
   433 
   439 void MacroAssembler::print_state32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip) {
   434 void MacroAssembler::print_state32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip) {
   440   ttyLocker ttyl;
   435   ttyLocker ttyl;
   441   FlagSetting fs(Debugging, true);
   436   FlagSetting fs(Debugging, true);
   890     // XXX correct this offset for amd64
   885     // XXX correct this offset for amd64
   891     // This is the value of eip which points to where verify_oop will return.
   886     // This is the value of eip which points to where verify_oop will return.
   892     if (os::message_box(msg, "Execution stopped, print registers?")) {
   887     if (os::message_box(msg, "Execution stopped, print registers?")) {
   893       print_state64(pc, regs);
   888       print_state64(pc, regs);
   894       BREAKPOINT;
   889       BREAKPOINT;
   895       assert(false, "start up GDB");
       
   896     }
   890     }
   897     ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
   891   }
   898   } else {
   892   fatal("DEBUG MESSAGE: %s", msg);
   899     ttyLocker ttyl;
       
   900     ::tty->print_cr("=============== DEBUG MESSAGE: %s ================\n",
       
   901                     msg);
       
   902     assert(false, "DEBUG MESSAGE: %s", msg);
       
   903   }
       
   904 }
   893 }
   905 
   894 
   906 void MacroAssembler::print_state64(int64_t pc, int64_t regs[]) {
   895 void MacroAssembler::print_state64(int64_t pc, int64_t regs[]) {
   907   ttyLocker ttyl;
   896   ttyLocker ttyl;
   908   FlagSetting fs(Debugging, true);
   897   FlagSetting fs(Debugging, true);