DebugServer2
Loading...
Searching...
No Matches
RegistersDescriptors.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#ifndef __DebugServer2_Architecture_RegistersDescriptors_h
12#define __DebugServer2_Architecture_RegistersDescriptors_h
13
14#include "DebugServer2/Base.h"
15
16#define USE_DESCRIPTORS(ARCH) \
17 namespace ds2 { \
18 namespace Architecture { \
19 using ds2::Architecture::ARCH::GDB; \
20 using ds2::Architecture::ARCH::LLDB; \
21 } \
22 }
23
24#if defined(ARCH_ARM)
25#include "DebugServer2/Architecture/ARM/RegistersDescriptors.h"
26USE_DESCRIPTORS(ARM);
27#elif defined(ARCH_ARM64)
28#include "DebugServer2/Architecture/ARM64/RegistersDescriptors.h"
29USE_DESCRIPTORS(ARM64);
30#elif defined(ARCH_X86)
31#include "DebugServer2/Architecture/X86/RegistersDescriptors.h"
32USE_DESCRIPTORS(X86);
33#elif defined(ARCH_X86_64)
34#include "DebugServer2/Architecture/X86_64/RegistersDescriptors.h"
35USE_DESCRIPTORS(X86_64);
36#else
37#error "Architecture not supported."
38#endif
39
40#undef USE_DESCRIPTORS
41
42#endif // !__DebugServer2_Architecture_RegistersDescriptors_h