Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/svd/src/mapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl DeviceMapper {
&data_memory,
Some(memory_info.segment_flags),
);

if !added_memory {
log::error!(
"Failed to add memory for peripheral block! {} @ 0x{:x}",
Expand All @@ -183,7 +183,7 @@ impl DeviceMapper {
);
}
}

view.add_segment(memory_info.segment);
view.add_section(memory_info.section);

Expand Down
8 changes: 5 additions & 3 deletions plugins/svd/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ impl LoadSettings {
"default" : Self::ADD_BACKING_REGIONS_DEFAULT,
"description" : "Whether to add backing regions. Backing regions allow you to write to the underlying memory of a view, but will take up space in the BNDB.",
});
bn_settings
.register_setting_json(Self::ADD_BACKING_REGIONS_SETTING, add_backing_region_props.to_string());

bn_settings.register_setting_json(
Self::ADD_BACKING_REGIONS_SETTING,
add_backing_region_props.to_string(),
);

let add_bitfields_props = json!({
"title" : "Add Bitfields",
"type" : "boolean",
Expand Down
9 changes: 9 additions & 0 deletions rust/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,15 @@ impl Function {
}
}

pub fn variable_type(&self, var: &Variable) -> Option<Conf<Ref<Type>>> {
let raw_var = BNVariable::from(var);
let result = unsafe { BNGetVariableType(self.handle, &raw_var) };
match result.type_.is_null() {
false => Some(Conf::<Ref<Type>>::from_owned_raw(result)),
true => None,
}
}

pub fn high_level_il(&self, full_ast: bool) -> Result<Ref<HighLevelILFunction>, ()> {
unsafe {
let hlil_ptr = BNGetFunctionHighLevelIL(self.handle);
Expand Down
Loading