From fb893038862ad045d8ad1c624e0e954042a2f01a Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 15 May 2024 13:15:04 -0400 Subject: DWARF Import : Add support for variable arguments --- rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs') diff --git a/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs index 537051c8..4db125c4 100644 --- a/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs +++ b/rust/examples/dwarf/dwarf_import/src/dwarfdebuginfo.rs @@ -47,6 +47,7 @@ pub(crate) struct FunctionInfoBuilder { pub(crate) address: Option, pub(crate) parameters: Vec>, pub(crate) platform: Option>, + pub(crate) variable_arguments: bool, } impl FunctionInfoBuilder { @@ -188,6 +189,7 @@ impl DebugInfoBuilder { return_type: Option, address: Option, parameters: Vec>, + variable_arguments: bool, ) { // Raw names should be the primary key, but if they don't exist, use the full name // TODO : Consider further falling back on address/architecture @@ -211,6 +213,7 @@ impl DebugInfoBuilder { address, parameters, platform: None, + variable_arguments, }); } } @@ -325,10 +328,7 @@ impl DebugInfoBuilder { }) .collect(); - // TODO : Handle - let variable_parameters = false; - - binaryninja::types::Type::function(&return_type, ¶meters, variable_parameters) + binaryninja::types::Type::function(&return_type, ¶meters, function.variable_arguments) } fn commit_functions(&self, debug_info: &mut DebugInfo) { -- cgit v1.3.1