diff options
| author | Rusty Wagner <rusty@vector35.com> | 2015-05-19 03:24:43 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2015-05-19 03:24:43 -0400 |
| commit | 8a1b1bb5e3bd19dd50787bdb9616de56fea8ce00 (patch) | |
| tree | dea0b13e0c05a31198edc757d0bcbde85d6238ff /binaryview.cpp | |
| parent | a4461126be25670aa4339e269270f5107b99439a (diff) | |
Quick patches in right click menu
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 173e3e06..d0274f95 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -750,6 +750,60 @@ void BinaryView::UndefineSymbol(Symbol* sym) } +bool BinaryView::IsNeverBranchPatchAvailable(Architecture* arch, uint64_t addr) +{ + return BNIsNeverBranchPatchAvailable(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::IsAlwaysBranchPatchAvailable(Architecture* arch, uint64_t addr) +{ + return BNIsAlwaysBranchPatchAvailable(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::IsInvertBranchPatchAvailable(Architecture* arch, uint64_t addr) +{ + return BNIsInvertBranchPatchAvailable(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::IsSkipAndReturnZeroPatchAvailable(Architecture* arch, uint64_t addr) +{ + return BNIsSkipAndReturnZeroPatchAvailable(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::IsSkipAndReturnValuePatchAvailable(Architecture* arch, uint64_t addr) +{ + return BNIsSkipAndReturnValuePatchAvailable(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::ConvertToNop(Architecture* arch, uint64_t addr) +{ + return BNConvertToNop(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::AlwaysBranch(Architecture* arch, uint64_t addr) +{ + return BNAlwaysBranch(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::InvertBranch(Architecture* arch, uint64_t addr) +{ + return BNInvertBranch(m_view, arch->GetArchitectureObject(), addr); +} + + +bool BinaryView::SkipAndReturnValue(Architecture* arch, uint64_t addr, uint64_t value) +{ + return BNSkipAndReturnValue(m_view, arch->GetArchitectureObject(), addr, value); +} + + BinaryData::BinaryData(FileMetadata* file): BinaryView(BNCreateBinaryDataView(file->GetFileObject())) { } |
