summaryrefslogtreecommitdiff
path: root/view
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-12-07 15:03:44 -0500
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-12-10 17:35:19 -0500
commit501fe3ec7a63a534fca3926a5fc4267f6886f089 (patch)
tree0e3e64fcef0a3180950f3e8fb3758ebcbf5d02e7 /view
parent7090d904513c3e80321bb6a8aba9c3b37d809bac (diff)
[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.
Diffstat (limited to 'view')
-rw-r--r--view/minidump/src/command.rs2
-rw-r--r--view/minidump/src/view.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/view/minidump/src/command.rs b/view/minidump/src/command.rs
index 818b1c59..81629f55 100644
--- a/view/minidump/src/command.rs
+++ b/view/minidump/src/command.rs
@@ -8,7 +8,7 @@ use binaryninja::binary_view::{BinaryView, BinaryViewBase, BinaryViewExt};
pub fn print_memory_information(bv: &BinaryView) {
debug!("Printing memory information");
if let Some(minidump_bv) = bv.parent_view() {
- if let Ok(read_buffer) = minidump_bv.read_buffer(0, minidump_bv.len() as usize) {
+ if let Some(read_buffer) = minidump_bv.read_buffer(0, minidump_bv.len() as usize) {
if let Ok(minidump_obj) = Minidump::read(read_buffer.get_data()) {
if let Ok(memory_info_list) = minidump_obj.get_stream::<MinidumpMemoryInfoList>() {
let mut memory_info_list_writer = Vec::new();
diff --git a/view/minidump/src/view.rs b/view/minidump/src/view.rs
index ff85fe07..413fafa1 100644
--- a/view/minidump/src/view.rs
+++ b/view/minidump/src/view.rs
@@ -117,7 +117,9 @@ impl MinidumpBinaryView {
fn init(&self) -> BinaryViewResult<()> {
let parent_view = self.parent_view().ok_or(())?;
- let read_buffer = parent_view.read_buffer(0, parent_view.len() as usize)?;
+ let read_buffer = parent_view
+ .read_buffer(0, parent_view.len() as usize)
+ .ok_or(())?;
if let Ok(minidump_obj) = Minidump::read(read_buffer.get_data()) {
// Architecture, platform information