From 1699c71999d29d32aba5c9f8fea193a661a4b02b Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Wed, 27 Nov 2024 12:15:23 -0500 Subject: Add line formatter API and a generic line formatter plugin --- lang/rust/pseudorust.cpp | 8 ++++---- lang/rust/pseudorust.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'lang/rust') diff --git a/lang/rust/pseudorust.cpp b/lang/rust/pseudorust.cpp index 837a7932..a1f7defe 100644 --- a/lang/rust/pseudorust.cpp +++ b/lang/rust/pseudorust.cpp @@ -7,9 +7,9 @@ using namespace std; using namespace BinaryNinja; -PseudoRustFunction::PseudoRustFunction( - Architecture* arch, Function* owner, HighLevelILFunction* highLevelILFunction) : - LanguageRepresentationFunction(arch, owner, highLevelILFunction), m_highLevelIL(highLevelILFunction) +PseudoRustFunction::PseudoRustFunction(LanguageRepresentationFunctionType* type, Architecture* arch, Function* owner, + HighLevelILFunction* highLevelILFunction) : + LanguageRepresentationFunction(type, arch, owner, highLevelILFunction), m_highLevelIL(highLevelILFunction) { } @@ -2814,7 +2814,7 @@ PseudoRustFunctionType::PseudoRustFunctionType(): LanguageRepresentationFunction Ref PseudoRustFunctionType::Create(Architecture* arch, Function* owner, HighLevelILFunction* highLevelILFunction) { - return new PseudoRustFunction(arch, owner, highLevelILFunction); + return new PseudoRustFunction(this, arch, owner, highLevelILFunction); } diff --git a/lang/rust/pseudorust.h b/lang/rust/pseudorust.h index a2ab9584..96e656c2 100644 --- a/lang/rust/pseudorust.h +++ b/lang/rust/pseudorust.h @@ -59,7 +59,8 @@ protected: virtual void EndLines(const BinaryNinja::HighLevelILInstruction& instr, BinaryNinja::HighLevelILTokenEmitter& tokens) override; public: - PseudoRustFunction(BinaryNinja::Architecture* arch, BinaryNinja::Function* owner, BinaryNinja::HighLevelILFunction* highLevelILFunction); + PseudoRustFunction(BinaryNinja::LanguageRepresentationFunctionType* type, BinaryNinja::Architecture* arch, + BinaryNinja::Function* owner, BinaryNinja::HighLevelILFunction* highLevelILFunction); std::string GetAnnotationStartString() const override; std::string GetAnnotationEndString() const override; -- cgit v1.3.1