1 //===-- State.h -------------------------------------------------*- 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 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_State_h_
11 #define liblldb_State_h_
15 // Other libraries and framework includes
17 #include "lldb/lldb-private.h"
19 namespace lldb_private {
21 //------------------------------------------------------------------
22 /// Converts a StateType to a C string.
25 /// The StateType object to convert.
28 /// A NULL terminated C string that describes \a state. The
29 /// returned string comes from constant string buffers and does
30 /// not need to be freed.
31 //------------------------------------------------------------------
33 StateAsCString (lldb::StateType state);
35 //------------------------------------------------------------------
36 /// Check if a state represents a state where the process or thread
40 /// The StateType enumeration value
43 /// \b true if the state represents a process or thread state
44 /// where the process or thread is running, \b false otherwise.
45 //------------------------------------------------------------------
47 StateIsRunningState (lldb::StateType state);
49 //------------------------------------------------------------------
50 /// Check if a state represents a state where the process or thread
51 /// is stopped. Stopped can mean stopped when the process is still
52 /// around, or stopped when the process has exited or doesn't exist
53 /// yet. The \a must_exist argument tells us which of these cases is
57 /// The StateType enumeration value
59 /// @param[in] must_exist
60 /// A boolean that indicates the thread must also be alive
61 /// so states like unloaded or exited won't return true.
64 /// \b true if the state represents a process or thread state
65 /// where the process or thread is stopped. If \a must_exist is
66 /// \b true, then the process can't be exited or unloaded,
67 /// otherwise exited and unloaded or other states where the
68 /// process no longer exists are considered to be stopped.
69 //------------------------------------------------------------------
71 StateIsStoppedState (lldb::StateType state, bool must_exist);
74 GetPermissionsAsCString (uint32_t permissions);
76 } // namespace lldb_private
78 #endif // liblldb_State_h_