|
libclues
Linux C++ Tracing Library
|
Base class for ABI specific register data. More...
#include <RegisterData.hxx>
Public Types | |
| using | register_t = REGISTER_T |
| using | SystemCallPars = std::array<register_t, NUM_SYSCALL_PARS> |
| This type is used to return the values of all system call parameter values in order of occurrence. | |
Static Public Attributes | |
| static constexpr auto | NUM_SYSCALL_PARS = _NUM_SYSCALL_PARS |
Base class for ABI specific register data.
This family of data structures relates to the PTRACE_GETREGSET operation. Specializations of this type exist for each supported ABI.
Regarding the different system call ABIs man(2) syscall is helpful.
The exact data structures returned from the kernel are not well documented and can be looked up in the kernel headers. We are duplicating these data structures in these classes, since we need to be able to support multiple ABIs in the same binary (e.g. I386 emulation on X86_64), and the compilation environment provides us with no way to obtain the definitions for ABIs/architectures other than our own.
REGISTER_T relates to the primitive type stored in a register. NUM_SYSCALL_PARS defines the maximum number of system call parameters that can be passed on the target ABI.
By contract each derived type needs to implement a set of functions like:
Definition at line 40 of file RegisterData.hxx.
| using clues::RegisterData< REGISTER_T, _NUM_SYSCALL_PARS >::register_t = REGISTER_T |
Definition at line 47 of file RegisterData.hxx.
| using clues::RegisterData< REGISTER_T, _NUM_SYSCALL_PARS >::SystemCallPars = std::array<register_t, NUM_SYSCALL_PARS> |
This type is used to return the values of all system call parameter values in order of occurrence.
Definition at line 49 of file RegisterData.hxx.
|
staticconstexpr |
Definition at line 43 of file RegisterData.hxx.