/* * Copyright 2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #include "UiUtils.h" /*static*/ const char* UiUtils::ThreadStateToString(int state, int stoppedReason) { switch (state) { case THREAD_STATE_RUNNING: return "Running"; case THREAD_STATE_STOPPED: break; case THREAD_STATE_UNKNOWN: default: return "?"; } // thread is stopped -- get the reason switch (stoppedReason) { case THREAD_STOPPED_DEBUGGER_CALL: return "Call"; case THREAD_STOPPED_EXCEPTION: return "Exception"; case THREAD_STOPPED_BREAKPOINT: case THREAD_STOPPED_WATCHPOINT: case THREAD_STOPPED_SINGLE_STEP: case THREAD_STOPPED_DEBUGGED: case THREAD_STOPPED_UNKNOWN: default: return "Debugged"; } }