DebugServer2
Loading...
Searching...
No Matches
Constants.h
1//
2// Copyright (c) 2014-present, Facebook, Inc.
3// All rights reserved.
4//
5// This source code is licensed under the University of Illinois/NCSA Open
6// Source License found in the LICENSE file in the root directory of this
7// source tree. An additional grant of patent rights can be found in the
8// PATENTS file in the same directory.
9//
10
11#pragma once
12
13namespace ds2 {
14
15//
16// Endian
17//
18
19enum Endian {
20 kEndianUnknown = 0,
21 kEndianBig = 1,
22 kEndianLittle = 2,
23 kEndianPDP = 3,
24#if defined(ENDIAN_BIG)
25 kEndianNative = kEndianBig,
26#elif defined(ENDIAN_LITTLE)
27 kEndianNative = kEndianLittle,
28#elif defined(ENDIAN_MIDDLE)
29 kEndianNative = kEndianPDP,
30#else
31 kEndianNative = kEndianUnknown,
32#endif
33};
34
35//
36// Memory Protection
37//
38
39enum /*Protection*/ {
40 kProtectionNone = 0,
41 kProtectionExecute = (1 << 0),
42 kProtectionWrite = (1 << 1),
43 kProtectionRead = (1 << 2)
44};
45
46//
47// Open flags
48//
49
50enum OpenFlags {
51 kOpenFlagInvalid = 0,
52 kOpenFlagRead = (1 << 0),
53 kOpenFlagWrite = (1 << 1),
54 kOpenFlagAppend = (1 << 2),
55 kOpenFlagTruncate = (1 << 3),
56 kOpenFlagNonBlocking = (1 << 4),
57 kOpenFlagCreate = (1 << 5),
58 kOpenFlagNewOnly = (1 << 6),
59 kOpenFlagNoFollow = (1 << 7),
60 kOpenFlagCloseOnExec = (1 << 8)
61};
62} // namespace ds2