8230762: Change MacroAssembler::debug32/64 to use fatal instead of assert
Always call fatal from debug32/64 to also crash in product build as a follow-up to JDK-8225653. Reviewed-by: roland, thartmann
This commit is contained in:
parent
ec5451c117
commit
9c145fa1cd
@ -2557,13 +2557,8 @@ void MacroAssembler::debug64(char* msg, int64_t pc, int64_t regs[])
|
||||
tty->print_cr("r31 = 0x%016lx", regs[31]);
|
||||
BREAKPOINT;
|
||||
}
|
||||
ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
|
||||
} else {
|
||||
ttyLocker ttyl;
|
||||
::tty->print_cr("=============== DEBUG MESSAGE: %s ================\n",
|
||||
msg);
|
||||
assert(false, "DEBUG MESSAGE: %s", msg);
|
||||
}
|
||||
fatal("DEBUG MESSAGE: %s", msg);
|
||||
}
|
||||
|
||||
void MacroAssembler::push_call_clobbered_registers() {
|
||||
|
@ -598,6 +598,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
BLOCK_COMMENT("call MacroAssembler::debug");
|
||||
__ mov(rscratch1, CAST_FROM_FN_PTR(address, MacroAssembler::debug64));
|
||||
__ blr(rscratch1);
|
||||
__ hlt(0);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
@ -427,13 +427,8 @@ void MacroAssembler::debug32(int rdi, int rsi, int rbp, int rsp, int rbx, int rd
|
||||
print_state32(rdi, rsi, rbp, rsp, rbx, rdx, rcx, rax, eip);
|
||||
BREAKPOINT;
|
||||
}
|
||||
} else {
|
||||
ttyLocker ttyl;
|
||||
::tty->print_cr("=============== DEBUG MESSAGE: %s ================\n", msg);
|
||||
}
|
||||
// Don't assert holding the ttyLock
|
||||
assert(false, "DEBUG MESSAGE: %s", msg);
|
||||
ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
|
||||
fatal("DEBUG MESSAGE: %s", msg);
|
||||
}
|
||||
|
||||
void MacroAssembler::print_state32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip) {
|
||||
@ -892,15 +887,9 @@ void MacroAssembler::debug64(char* msg, int64_t pc, int64_t regs[]) {
|
||||
if (os::message_box(msg, "Execution stopped, print registers?")) {
|
||||
print_state64(pc, regs);
|
||||
BREAKPOINT;
|
||||
assert(false, "start up GDB");
|
||||
}
|
||||
ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
|
||||
} else {
|
||||
ttyLocker ttyl;
|
||||
::tty->print_cr("=============== DEBUG MESSAGE: %s ================\n",
|
||||
msg);
|
||||
assert(false, "DEBUG MESSAGE: %s", msg);
|
||||
}
|
||||
fatal("DEBUG MESSAGE: %s", msg);
|
||||
}
|
||||
|
||||
void MacroAssembler::print_state64(int64_t pc, int64_t regs[]) {
|
||||
|
@ -710,8 +710,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ pusha(); // push registers (eip = return address & msg are already pushed)
|
||||
BLOCK_COMMENT("call MacroAssembler::debug");
|
||||
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, MacroAssembler::debug32)));
|
||||
__ popa();
|
||||
__ ret(3 * wordSize); // pop arguments
|
||||
__ hlt();
|
||||
return start;
|
||||
}
|
||||
|
||||
|
@ -1129,10 +1129,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ andptr(rsp, -16); // align stack as required by ABI
|
||||
BLOCK_COMMENT("call MacroAssembler::debug");
|
||||
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, MacroAssembler::debug64)));
|
||||
__ mov(rsp, r12); // restore rsp
|
||||
__ popa(); // pop registers (includes r12)
|
||||
__ ret(4 * wordSize); // pop caller saved stuff
|
||||
|
||||
__ hlt();
|
||||
return start;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user