libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
traits.hxx
1#pragma once
2
3// clues
4#include <clues/regs/i386.hxx>
5#include <clues/regs/x86_64.hxx>
6#include <clues/regs/aarch64.hxx>
7#include <clues/types.hxx>
8
9namespace clues {
10
12template <ABI abi>
15
19 using type = std::nullptr_t;
20 static_assert(abi == ABI{-1}, "no traits are defined for this ABI yet");
21};
22
23template <>
24struct RegisterDataTraits<ABI::I386> {
25 using type = RegisterDataI386;
26};
27
28template <>
29struct RegisterDataTraits<ABI::X86_64> {
30 using type = RegisterDataX64;
31};
32
33template <>
35 using type = RegisterDataX32;
36};
37
38template <>
39struct RegisterDataTraits<ABI::AARCH64> {
40 using type = RegisterDataAARCH64;
41};
42
43} // end ns
ABI
System Call ABI.
Definition types.hxx:62
@ X32
X86_64 with 32-bit pointers.
Definition types.hxx:66
Native register data for the aarch64 ABI.
Definition aarch64.hxx:14
Native register data for the I386 32-bit X86 ABI.
Definition i386.hxx:15
Traits which will be overridden by template specializations per ABI.
Definition traits.hxx:13
std::nullptr_t type
Definition traits.hxx:19