From 64d041d11ddd2062166f79636389544ccffa422a Mon Sep 17 00:00:00 2001 From: kat Date: Fri, 6 Jan 2023 12:24:21 -0500 Subject: Integrate Enum IntegerDisplayType, Add MetadataChoiceDialog --- function.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'function.cpp') diff --git a/function.cpp b/function.cpp index 0e6728d5..41109dea 100644 --- a/function.cpp +++ b/function.cpp @@ -1773,6 +1773,23 @@ void Function::SetIntegerConstantDisplayType( } +Ref Function::GetIntegerConstantDisplayTypeEnumType( + Architecture* arch, uint64_t instrAddr, uint64_t value, size_t operand) +{ + BNType* apiType = BNGetIntegerConstantDisplayTypeEnumerationType(m_object, arch->GetObject(), instrAddr, value, operand); + if (apiType) + return new Type(BNNewTypeReference(apiType)); + return nullptr; +} + + +void Function::SetIntegerConstantDisplayTypeEnumType( + Architecture* arch, uint64_t instrAddr, uint64_t value, size_t operand, Ref type) +{ + BNSetIntegerConstantDisplayTypeEnumerationType(m_object, arch->GetObject(), instrAddr, value, operand, type->m_object); +} + + BNHighlightColor Function::GetInstructionHighlight(Architecture* arch, uint64_t addr) { return BNGetInstructionHighlight(m_object, arch->GetObject(), addr); -- cgit v1.3.1