diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-30 16:39:32 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-05-30 19:17:10 -0400 |
| commit | 68b00cdf45551ba64c4f7217963055fc5a1a0cc4 (patch) | |
| tree | f6bdef06bc02d16596bdf62870c8a1cfafe49859 /rust/src/language_representation.rs | |
| parent | 77ab5e812af200b8e3bca0aac31d5fe0f638fba3 (diff) | |
[Rust] Express expression vs instruction index for MLIL and HLIL APIs
This was done to fix unintended behavior using an instruction or expression index in place of the other.
Fixes https://github.com/Vector35/binaryninja-api/issues/6897
Diffstat (limited to 'rust/src/language_representation.rs')
| -rw-r--r-- | rust/src/language_representation.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rust/src/language_representation.rs b/rust/src/language_representation.rs index 536203fe..6008ec0c 100644 --- a/rust/src/language_representation.rs +++ b/rust/src/language_representation.rs @@ -10,7 +10,7 @@ use crate::binary_view::BinaryView; use crate::disassembly::{DisassemblySettings, DisassemblyTextLine}; use crate::function::{Function, HighlightColor}; use crate::high_level_il::token_emitter::HighLevelILTokenEmitter; -use crate::high_level_il::{HighLevelILFunction, HighLevelInstructionIndex}; +use crate::high_level_il::{HighLevelExpressionIndex, HighLevelILFunction}; use crate::line_formatter::CoreLineFormatter; use crate::rc::{Array, CoreArrayProvider, CoreArrayProviderInner, Ref, RefCountable}; use crate::string::{BnString, IntoCStr}; @@ -57,7 +57,7 @@ pub trait LanguageRepresentationFunction: Send + Sync { fn expr_text( &self, il: &HighLevelILFunction, - expr_index: HighLevelInstructionIndex, + expr_index: HighLevelExpressionIndex, tokens: &HighLevelILTokenEmitter, settings: &DisassemblySettings, as_full_ast: bool, @@ -68,14 +68,14 @@ pub trait LanguageRepresentationFunction: Send + Sync { fn begin_lines( &self, il: &HighLevelILFunction, - expr_index: HighLevelInstructionIndex, + expr_index: HighLevelExpressionIndex, tokens: &HighLevelILTokenEmitter, ); fn end_lines( &self, il: &HighLevelILFunction, - expr_index: HighLevelInstructionIndex, + expr_index: HighLevelExpressionIndex, tokens: &HighLevelILTokenEmitter, ); @@ -281,7 +281,7 @@ impl CoreLanguageRepresentationFunction { pub fn expr_text( &self, il: &HighLevelILFunction, - expr_index: HighLevelInstructionIndex, + expr_index: HighLevelExpressionIndex, settings: &DisassemblySettings, as_full_ast: bool, precedence: OperatorPrecedence, @@ -306,7 +306,7 @@ impl CoreLanguageRepresentationFunction { pub fn linear_lines( &self, il: &HighLevelILFunction, - expr_index: HighLevelInstructionIndex, + expr_index: HighLevelExpressionIndex, settings: &DisassemblySettings, as_full_ast: bool, ) -> Array<DisassemblyTextLine> { |
