summaryrefslogtreecommitdiff
path: root/view/minidump/src
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-02-14 23:35:40 -0500
committerMason Reed <mason@vector35.com>2025-02-24 20:08:01 -0500
commita87f4888eddf804baed4df3de3ac81d737d78ed3 (patch)
tree0fa5c8ad295e0cc5eaab2a6157e30ea1b39fe976 /view/minidump/src
parent57d04f2f88adad219e5d526b05bfea88de4818bd (diff)
Implement Rust MemoryMap
Also split out SegmentFlags and fix some UB with the section creation
Diffstat (limited to 'view/minidump/src')
-rw-r--r--view/minidump/src/view.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/view/minidump/src/view.rs b/view/minidump/src/view.rs
index 0683030f..ff85fe07 100644
--- a/view/minidump/src/view.rs
+++ b/view/minidump/src/view.rs
@@ -2,7 +2,7 @@ use std::collections::HashMap;
use std::ops::Range;
use binaryninja::section::Section;
-use binaryninja::segment::Segment;
+use binaryninja::segment::{Segment, SegmentFlags};
use log::{debug, error, info, warn};
use minidump::format::MemoryProtection;
use minidump::{
@@ -244,13 +244,16 @@ impl MinidumpBinaryView {
segment_memory_protection.executable,
);
+ let segment_flags = SegmentFlags::new()
+ .readable(segment_memory_protection.readable)
+ .writable(segment_memory_protection.writable)
+ .executable(segment_memory_protection.executable);
+
self.add_segment(
Segment::builder(segment.mapped_addr_range.clone())
.parent_backing(segment.rva_range.clone())
.is_auto(true)
- .readable(segment_memory_protection.readable)
- .writable(segment_memory_protection.writable)
- .executable(segment_memory_protection.executable),
+ .flags(segment_flags),
);
} else {
error!(