|
LLDB mainline
|
This class manages the storage and detection of register type information. More...
#include <RegisterTypeDetector_arm64.h>
Classes | |
| class | DetectedTypesHolder |
| struct | RegisterEntry |
Public Member Functions | |
| void | DetectTypes (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| For the registers listed in this class, detect which fields are present and build types for those. | |
| void | UpdateRegisterInfo (const RegisterInfo *reg_info, uint32_t num_regs) |
| Add the type information of any registers named in this class, to the relevant RegisterInfo instances. | |
| bool | HasDetected () const |
| Returns true if field detection has been run at least once. | |
Private Types | |
| using | DetectorFn |
Private Member Functions | |
| const RegisterType * | DetectCPSRType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectFPSRType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectFPCRType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectMTECtrlType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectSVCRType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectFPMRType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectGCSFeaturesType (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| const RegisterType * | DetectPOREL0Type (uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3) |
| template<typename T, typename... Args> | |
| const T * | MakeType (Args &&...args) |
Private Attributes | |
| struct lldb_private::Arm64RegisterTypeDetector::RegisterEntry | m_registers [8] |
| bool | m_has_detected = false |
| class lldb_private::Arm64RegisterTypeDetector::DetectedTypesHolder | m_detected_types |
This class manages the storage and detection of register type information.
The same register may have different fields on different CPUs. This class abstracts out the field detection process so we can use it on live processes and core files.
The way to use this class is:
This must be done in that order, and you should ensure that if multiple threads will reference the information, a mutex is used to make sure only one calls DetectTypes.
Definition at line 35 of file RegisterTypeDetector_arm64.h.
|
private |
Definition at line 57 of file RegisterTypeDetector_arm64.h.
|
private |
Definition at line 238 of file RegisterTypeDetector_arm64.cpp.
References HWCAP2_BTI, HWCAP2_MTE, HWCAP_DIT, HWCAP_SSBS, and MakeType().
|
private |
Definition at line 168 of file RegisterTypeDetector_arm64.cpp.
References HWCAP2_AFP, HWCAP2_EBF16, HWCAP_ASIMDHP, HWCAP_FPHP, and MakeType().
|
private |
Definition at line 78 of file RegisterTypeDetector_arm64.cpp.
References HWCAP2_FPMR, and MakeType().
|
private |
Definition at line 214 of file RegisterTypeDetector_arm64.cpp.
References MakeType().
|
private |
Definition at line 105 of file RegisterTypeDetector_arm64.cpp.
References HWCAP_GCS, and MakeType().
|
private |
Definition at line 137 of file RegisterTypeDetector_arm64.cpp.
References HWCAP2_MTE, HWCAP3_MTE_STORE_ONLY, and MakeType().
|
private |
Definition at line 37 of file RegisterTypeDetector_arm64.cpp.
References HWCAP2_POE, and MakeType().
|
private |
Definition at line 119 of file RegisterTypeDetector_arm64.cpp.
References HWCAP2_SME, and MakeType().
| void Arm64RegisterTypeDetector::DetectTypes | ( | uint64_t | hwcap, |
| uint64_t | hwcap2, | ||
| uint64_t | hwcap3 ) |
For the registers listed in this class, detect which fields are present and build types for those.
Must be called before UpdateRegisterInfos. If called more than once, fields will be redetected each time from scratch. If the target would not have this register at all, no type is produced.
Definition at line 290 of file RegisterTypeDetector_arm64.cpp.
References m_has_detected, and m_registers.
|
inline |
Returns true if field detection has been run at least once.
Definition at line 51 of file RegisterTypeDetector_arm64.h.
References m_has_detected.
|
inlineprivate |
Definition at line 103 of file RegisterTypeDetector_arm64.h.
References m_detected_types.
Referenced by DetectCPSRType(), DetectFPCRType(), DetectFPMRType(), DetectFPSRType(), DetectGCSFeaturesType(), DetectMTECtrlType(), DetectPOREL0Type(), and DetectSVCRType().
| void Arm64RegisterTypeDetector::UpdateRegisterInfo | ( | const RegisterInfo * | reg_info, |
| uint32_t | num_regs ) |
Add the type information of any registers named in this class, to the relevant RegisterInfo instances.
Note that this will be done with a pointer to the instance of this class that you call this on, so the lifetime of that instance must be at least that of the register info.
Definition at line 297 of file RegisterTypeDetector_arm64.cpp.
References m_has_detected, m_registers, and lldb_private::RegisterInfo::register_type.
|
private |
Referenced by MakeType().
|
private |
Definition at line 101 of file RegisterTypeDetector_arm64.h.
Referenced by DetectTypes(), HasDetected(), and UpdateRegisterInfo().
|
private |
Referenced by DetectTypes(), and UpdateRegisterInfo().