From 1c93b0554ea03416d7d45e04f59b610f0821bd7d Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Tue, 20 Jan 2015 17:36:41 +0100 Subject: [PATCH] Bug 1123607 - ARM simulator should crash when it hits a breakpoint. r=h4writer --- js/src/jit/arm/Simulator-arm.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/src/jit/arm/Simulator-arm.cpp b/js/src/jit/arm/Simulator-arm.cpp index 007d15ca5765..1a1a9804ecce 100644 --- a/js/src/jit/arm/Simulator-arm.cpp +++ b/js/src/jit/arm/Simulator-arm.cpp @@ -2717,9 +2717,14 @@ Simulator::decodeType01(SimInstruction *instr) break; } case 7: { // BKPT - ArmDebugger dbg(this); - printf("Simulator hit BKPT.\n"); - dbg.debug(); + fprintf(stderr, "Simulator hit BKPT.\n"); + if (getenv("ARM_SIM_DEBUGGER")) { + ArmDebugger dbg(this); + dbg.debug(); + } else { + fprintf(stderr, "Use ARM_SIM_DEBUGGER=1 to enter the builtin debugger.\n"); + MOZ_CRASH("ARM simulator breakpoint"); + } break; } default: