summaryrefslogtreecommitdiff
path: root/plugins/idb_import/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/idb_import/src')
-rw-r--r--plugins/idb_import/src/lib.rs9
-rw-r--r--plugins/idb_import/src/types.rs8
2 files changed, 7 insertions, 10 deletions
diff --git a/plugins/idb_import/src/lib.rs b/plugins/idb_import/src/lib.rs
index c554831d..46acfd42 100644
--- a/plugins/idb_import/src/lib.rs
+++ b/plugins/idb_import/src/lib.rs
@@ -198,7 +198,7 @@ pub fn import_til_section(
if let TranslateTypeResult::Translated(bn_ty)
| TranslateTypeResult::PartiallyTranslated(bn_ty, _) = &ty.ty
{
- if !debug_info.add_type(ty.name.as_utf8_lossy(), bn_ty, &[/* TODO */]) {
+ if !debug_info.add_type(&ty.name.as_utf8_lossy(), bn_ty, &[/* TODO */]) {
error!("Unable to add type `{}`", ty.name.as_utf8_lossy())
}
}
@@ -209,7 +209,7 @@ pub fn import_til_section(
if let TranslateTypeResult::Translated(bn_ty)
| TranslateTypeResult::PartiallyTranslated(bn_ty, _) = &ty.ty
{
- if !debug_info.add_type(ty.name.as_utf8_lossy(), bn_ty, &[/* TODO */]) {
+ if !debug_info.add_type(&ty.name.as_utf8_lossy(), bn_ty, &[/* TODO */]) {
error!("Unable to fix type `{}`", ty.name.as_utf8_lossy())
}
}
@@ -239,10 +239,7 @@ fn parse_id0_section_info(
} = info;
// TODO set comments to address here
for function in &bv.functions_containing(addr) {
- function.set_comment_at(
- addr,
- String::from_utf8_lossy(&comments.join(&b"\n"[..])).to_string(),
- );
+ function.set_comment_at(addr, &String::from_utf8_lossy(&comments.join(&b"\n"[..])));
}
let bnty = ty
diff --git a/plugins/idb_import/src/types.rs b/plugins/idb_import/src/types.rs
index 7b4ca675..b3c9bea0 100644
--- a/plugins/idb_import/src/types.rs
+++ b/plugins/idb_import/src/types.rs
@@ -335,7 +335,7 @@ impl<F: Fn(usize, usize) -> Result<(), ()>> TranslateIDBTypes<'_, F> {
format!("bitfield_{}_{}", offset + start_idx, offset + (i - 1))
};
let field = field_from_bytes(bytes);
- struct_builder.append(&field, name, MemberAccess::NoAccess, MemberScope::NoScope);
+ struct_builder.append(&field, &name, MemberAccess::NoAccess, MemberScope::NoScope);
};
for (i, member) in members {
@@ -423,7 +423,7 @@ impl<F: Fn(usize, usize) -> Result<(), ()>> TranslateIDBTypes<'_, F> {
.as_ref()
.map(|name| name.as_utf8_lossy().to_string())
.unwrap_or_else(|| format!("member_{i}"));
- structure.append(&mem, name, MemberAccess::NoAccess, MemberScope::NoScope);
+ structure.append(&mem, &name, MemberAccess::NoAccess, MemberScope::NoScope);
}
if let Some(start_idx) = first_bitfield_seq {
let members_bitrange = &ty_struct.members[start_idx..];
@@ -470,7 +470,7 @@ impl<F: Fn(usize, usize) -> Result<(), ()>> TranslateIDBTypes<'_, F> {
.as_ref()
.map(|name| name.as_utf8_lossy().to_string())
.unwrap_or_else(|| format!("member_{i}"));
- structure.append(&mem, name, MemberAccess::NoAccess, MemberScope::NoScope);
+ structure.append(&mem, &name, MemberAccess::NoAccess, MemberScope::NoScope);
}
let str_ref = structure.finalize();
@@ -492,7 +492,7 @@ impl<F: Fn(usize, usize) -> Result<(), ()>> TranslateIDBTypes<'_, F> {
.as_ref()
.map(|name| name.as_utf8_lossy().to_string())
.unwrap_or_else(|| format!("member_{i}"));
- eb.insert(name, member.value);
+ eb.insert(&name, member.value);
}
Type::enumeration(
&eb.finalize(),