diff options
| author | Rusty Wagner <rusty@vector35.com> | 2020-04-28 17:13:54 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2020-04-28 17:17:46 -0400 |
| commit | ce385dc73e2d264fc2404c75b060a8a42486e27b (patch) | |
| tree | d5e4650935f414799a6b61f9cd22f047b7d0cfee /binaryninjacore.h | |
| parent | e2c1b6123769e9eb185ddb23c2f7131ed6e593e8 (diff) | |
Add system register list to architectures.
Global registers are commonly used for module data pointers in
architectures, which are global in nature but should still be eliminated
in high level ILs once the data pointers have been resolved. This means
there needs to be an additional type of global register for those that
should never be eliminated in any way, such as an MSR register or other
registers that contain important system state with side effects. To
allow for this, a list of system registers can be supplied by the
archtiecture.
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index b1a615f5..97cdf853 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -1456,6 +1456,7 @@ extern "C" uint32_t (*getStackPointerRegister)(void* ctxt); uint32_t (*getLinkRegister)(void* ctxt); uint32_t* (*getGlobalRegisters)(void* ctxt, size_t* count); + uint32_t* (*getSystemRegisters)(void* ctxt, size_t* count); char* (*getRegisterStackName)(void* ctxt, uint32_t regStack); uint32_t* (*getAllRegisterStacks)(void* ctxt, size_t* count); @@ -2673,6 +2674,7 @@ __attribute__ ((format (printf, 1, 2))) BNArchitecture* base, BNCustomArchitecture* arch); BINARYNINJACOREAPI void BNAddArchitectureRedirection(BNArchitecture* arch, BNArchitecture* from, BNArchitecture* to); BINARYNINJACOREAPI BNArchitecture* BNRegisterArchitectureHook(BNArchitecture* base, BNCustomArchitecture* arch); + BINARYNINJACOREAPI void BNFinalizeArchitectureHook(BNArchitecture* base); BINARYNINJACOREAPI char* BNGetArchitectureName(BNArchitecture* arch); BINARYNINJACOREAPI BNEndianness BNGetArchitectureEndianness(BNArchitecture* arch); @@ -2730,6 +2732,8 @@ __attribute__ ((format (printf, 1, 2))) BINARYNINJACOREAPI uint32_t BNGetArchitectureLinkRegister(BNArchitecture* arch); BINARYNINJACOREAPI uint32_t* BNGetArchitectureGlobalRegisters(BNArchitecture* arch, size_t* count); BINARYNINJACOREAPI bool BNIsArchitectureGlobalRegister(BNArchitecture* arch, uint32_t reg); + BINARYNINJACOREAPI uint32_t* BNGetArchitectureSystemRegisters(BNArchitecture* arch, size_t* count); + BINARYNINJACOREAPI bool BNIsArchitectureSystemRegister(BNArchitecture* arch, uint32_t reg); BINARYNINJACOREAPI uint32_t BNGetArchitectureRegisterByName(BNArchitecture* arch, const char* name); BINARYNINJACOREAPI char* BNGetArchitectureRegisterStackName(BNArchitecture* arch, uint32_t regStack); |
