DebugServer2
Loading...
Searching...
No Matches
CPUState.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
13#include "DebugServer2/Types.h"
14
15#define CPUSTATE_H_INTERNAL
16
17#if defined(ARCH_ARM)
18#include "DebugServer2/Architecture/ARM/CPUState.h"
19#elif defined(ARCH_ARM64)
20#include "DebugServer2/Architecture/ARM/CPUState.h"
21#include "DebugServer2/Architecture/ARM64/CPUState.h"
22#elif defined(ARCH_X86)
23#include "DebugServer2/Architecture/X86/CPUState.h"
24#elif defined(ARCH_X86_64)
25#include "DebugServer2/Architecture/X86/CPUState.h"
26#include "DebugServer2/Architecture/X86_64/CPUState.h"
27#elif defined(ARCH_RISCV)
28#include "DebugServer2/Architecture/RISCV/CPUState.h"
29#else
30#error "Architecture not supported."
31#endif
32
33#undef CPUSTATE_H_INTERNAL
34
35namespace ds2 {
36namespace Architecture {
37#if defined(ARCH_ARM)
38using ARM::CPUState;
39#elif defined(ARCH_ARM64)
40using ARM64::CPUState;
41#elif defined(ARCH_X86)
42using X86::CPUState;
43#elif defined(ARCH_X86_64)
44using X86_64::CPUState;
45#elif defined(ARCH_RISCV)
46using RISCV::CPUState;
47#else
48#error "Architecture not supported."
49#endif
50} // namespace Architecture
51} // namespace ds2