diff options
| author | Rusty Wagner <rusty@vector35.com> | 2015-12-29 16:11:53 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2015-12-29 16:11:53 -0500 |
| commit | 88c7de7a9d390d2e99d14d1ce6837729a69e900d (patch) | |
| tree | 0b54a2508723ae416a1b9011bad346590b36c8b0 /binaryview.cpp | |
| parent | 73d4094f1d3f666c30f7533231261eb375cef6e8 (diff) | |
Show cross references for entire range when selecting multiple bytes
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index f2090185..721adcba 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -803,6 +803,26 @@ vector<ReferenceSource> BinaryView::GetCodeReferences(uint64_t addr) } +vector<ReferenceSource> BinaryView::GetCodeReferences(uint64_t addr, uint64_t len) +{ + size_t count; + BNReferenceSource* refs = BNGetCodeReferencesInRange(m_view, addr, len, &count); + + vector<ReferenceSource> result; + for (size_t i = 0; i < count; i++) + { + ReferenceSource src; + src.func = new Function(BNNewFunctionReference(refs[i].func)); + src.arch = new CoreArchitecture(refs[i].arch); + src.addr = refs[i].addr; + result.push_back(src); + } + + BNFreeCodeReferences(refs, count); + return result; +} + + Ref<Symbol> BinaryView::GetSymbolByAddress(uint64_t addr) { BNSymbol* sym = BNGetSymbolByAddress(m_view, addr); |
