Index: lldb/packages/Python/lldbsuite/test/lldbutil.py =================================================================== --- lldb/packages/Python/lldbsuite/test/lldbutil.py +++ lldb/packages/Python/lldbsuite/test/lldbutil.py @@ -235,7 +235,7 @@ elif enum == lldb.eStateSuspended: return "suspended" else: - raise Exception("Unknown StateType enum") + raise Exception("Unknown StateType enum: " + str(enum)) def stop_reason_to_str(enum): @@ -889,7 +889,17 @@ test.assertFalse(error.Fail(), "Process launch failed: %s" % (error.GetCString())) - test.assertEqual(process.GetState(), lldb.eStateStopped) + def processStateInfo(process): + # If 'exited', print exit code and extracted description. + if process.state == lldb.eStateExited: + return ("Exit code/status: " + str(process.GetExitStatus()) + ": " + + "Exit description: " + str(process.exit_description)) + return "" + + if process.state != lldb.eStateStopped: + test.fail("Test process is not stopped at breakpoint, but instead in" + + " state '" + state_type_to_str(process.state) + "'. " + + processStateInfo(process)) # Frame #0 should be at our breakpoint. threads = get_threads_stopped_at_breakpoint(