Skip to content

Commit 106155b

Browse files
committed
[Rust] Move architecture module code into more reasonable files
To keep backwards compatibility for commonly referenced code we re-export them within the architecture module. Also does some light refactoring of some newly added APIs to keep them more consistent with other parts of the codebase.
1 parent 2860314 commit 106155b

File tree

21 files changed

+1671
-1571
lines changed

21 files changed

+1671
-1571
lines changed

arch/riscv/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ use binaryninja::relocation::{Relocation, RelocationHandlerExt};
99
use binaryninja::{
1010
add_optional_plugin_dependency, architecture,
1111
architecture::{
12-
llvm_assemble, Architecture, ArchitectureExt, CoreArchitecture, CustomArchitectureHandle,
13-
ImplicitRegisterExtend, InstructionInfo, LlvmServicesCodeModel, LlvmServicesDialect,
14-
LlvmServicesRelocMode, Register as Reg, RegisterInfo, UnusedFlag, UnusedRegisterStack,
15-
UnusedRegisterStackInfo,
12+
Architecture, ArchitectureExt, CoreArchitecture, CustomArchitectureHandle,
13+
ImplicitRegisterExtend, InstructionInfo, Register as Reg, RegisterInfo, UnusedFlag,
14+
UnusedRegisterStack, UnusedRegisterStackInfo,
1615
},
1716
binary_view::{BinaryView, BinaryViewExt},
1817
calling_convention::{register_calling_convention, CallingConvention, ConventionBuilder},
1918
custom_binary_view::{BinaryViewType, BinaryViewTypeExt},
2019
disassembly::{InstructionTextToken, InstructionTextTokenKind},
2120
function::Function,
2221
function_recognizer::FunctionRecognizer,
22+
llvm::{llvm_assemble, LlvmServicesCodeModel, LlvmServicesDialect, LlvmServicesRelocMode},
2323
rc::Ref,
2424
relocation::{
2525
CoreRelocationHandler, CustomRelocationHandlerHandle, RelocationHandler, RelocationInfo,

plugins/dwarf/dwarfdump/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
// limitations under the License.
1414

1515
use binaryninja::{
16+
architecture::BranchType,
1617
binary_view::{BinaryView, BinaryViewExt},
1718
command::{register_command, Command},
1819
disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenKind},
19-
flowgraph::{BranchType, EdgeStyle, FlowGraph, FlowGraphNode, FlowGraphOption},
20+
flowgraph::{EdgeStyle, FlowGraph, FlowGraphNode, FlowGraphOption},
2021
};
2122
use dwarfreader::is_valid;
2223

rust/examples/flowgraph.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use binaryninja::interaction::handler::{
77
};
88
use binaryninja::interaction::{MessageBoxButtonResult, MessageBoxButtonSet, MessageBoxIcon};
99
use binaryninja::{
10+
architecture::BranchType,
1011
binary_view::{BinaryView, BinaryViewExt},
1112
disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenKind},
12-
flowgraph::{BranchType, EdgePenStyle, FlowGraph, ThemeColor},
13+
flowgraph::{EdgePenStyle, FlowGraph, ThemeColor},
1314
};
1415

1516
pub struct GraphPrinter;

0 commit comments

Comments
 (0)