From 1973b852a1ffc2ea3e050d078a6f2b9933c199a1 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 10 Apr 2025 16:39:26 -0400 Subject: Fix function type construction leaking in Rust API --- plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs | 2 +- plugins/idb_import/src/lib.rs | 2 +- plugins/pdb-ng/src/parser.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs index 672bdf68..604867f5 100644 --- a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs +++ b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs @@ -581,7 +581,7 @@ impl DebugInfoBuilder { for function in self.functions() { // let calling_convention: Option>> = None; - debug_info.add_function(DebugFunctionInfo::new( + debug_info.add_function(&DebugFunctionInfo::new( function.full_name.clone(), function.full_name.clone(), // TODO : This should eventually be changed, but the "full_name" should probably be the unsimplified version, and the "short_name" should be the simplified version...currently the symbols view shows the full version, so changing it here too makes it look bad in the UI function.raw_name.clone(), diff --git a/plugins/idb_import/src/lib.rs b/plugins/idb_import/src/lib.rs index 70bbf07c..c554831d 100644 --- a/plugins/idb_import/src/lib.rs +++ b/plugins/idb_import/src/lib.rs @@ -269,7 +269,7 @@ fn parse_id0_section_info( if bnty.is_none() { error!("Unable to convert the function type at {addr:#x}",) } - if !debug_info.add_function(DebugFunctionInfo::new( + if !debug_info.add_function(&DebugFunctionInfo::new( None, None, label.map(str::to_string), diff --git a/plugins/pdb-ng/src/parser.rs b/plugins/pdb-ng/src/parser.rs index 101b8868..783a8a2d 100644 --- a/plugins/pdb-ng/src/parser.rs +++ b/plugins/pdb-ng/src/parser.rs @@ -261,7 +261,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> { address, &name.raw_name, type_ ) }); - self.debug_info.add_function(DebugFunctionInfo::new( + self.debug_info.add_function(&DebugFunctionInfo::new( Some(name.short_name.unwrap_or(name.raw_name.clone())), Some(name.full_name.unwrap_or(name.raw_name.clone())), Some(name.raw_name), -- cgit v1.3.1