summaryrefslogtreecommitdiff
path: root/architecture.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2020-04-24 14:06:45 -0400
committerPeter LaFosse <peter@vector35.com>2020-04-25 14:24:02 -0400
commit8947d620ff982ac5a40e925cce5d95637618a688 (patch)
treebb0f01643ac4ecb81ba87277b4fa0088a6e31f2b /architecture.cpp
parent38fcbfcf6eac86e8191667d5cabc467f6ee48579 (diff)
Add GetDisplayStringForInteger API
Diffstat (limited to 'architecture.cpp')
-rw-r--r--architecture.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/architecture.cpp b/architecture.cpp
index 09ef2013..42323a6c 100644
--- a/architecture.cpp
+++ b/architecture.cpp
@@ -2159,6 +2159,16 @@ void ArchitectureHook::Register(BNCustomArchitecture* callbacks)
}
+string DisassemblyTextRenderer::GetDisplayStringForInteger(Ref<BinaryView> binaryView, BNIntegerDisplayType type,
+ uint64_t value, size_t inputWidth)
+{
+ char* str = BNGetDisplayStringForInteger(binaryView->GetObject(), type, value, inputWidth);
+ string s(str);
+ BNFreeString(str);
+ return s;
+}
+
+
DisassemblyTextRenderer::DisassemblyTextRenderer(Function* func, DisassemblySettings* settings)
{
m_object = BNCreateDisassemblyTextRenderer(func->GetObject(), settings ? settings->GetObject() : nullptr);