1 //===-- State.cpp -----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // Other libraries and framework includes
14 #include "lldb/Core/State.h"
18 using namespace lldb_private;
21 lldb_private::StateAsCString (StateType state)
25 case eStateInvalid: return "invalid";
26 case eStateUnloaded: return "unloaded";
27 case eStateConnected: return "connected";
28 case eStateAttaching: return "attaching";
29 case eStateLaunching: return "launching";
30 case eStateStopped: return "stopped";
31 case eStateRunning: return "running";
32 case eStateStepping: return "stepping";
33 case eStateCrashed: return "crashed";
34 case eStateDetached: return "detached";
35 case eStateExited: return "exited";
36 case eStateSuspended: return "suspended";
38 static char unknown_state_string[64];
39 snprintf(unknown_state_string, sizeof (unknown_state_string), "StateType = %i", state);
40 return unknown_state_string;
44 lldb_private::GetPermissionsAsCString (uint32_t permissions)
49 case ePermissionsWritable: return "-w-";
50 case ePermissionsReadable: return "r--";
51 case ePermissionsExecutable: return "--x";
52 case ePermissionsReadable |
53 ePermissionsWritable: return "rw-";
54 case ePermissionsReadable |
55 ePermissionsExecutable: return "r-x";
56 case ePermissionsWritable |
57 ePermissionsExecutable: return "-wx";
58 case ePermissionsReadable |
59 ePermissionsWritable |
60 ePermissionsExecutable: return "rwx";
68 lldb_private::StateIsRunningState (StateType state)
92 lldb_private::StateIsStoppedState (StateType state, bool must_exist)
111 case eStateSuspended: